Kerenl Compiling In Ubuntu
- Update package database:
apt-get update
- Install all needed packages
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
- Download kernel image (take 2.6.20 as an example)
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
tar xjf linux-2.6.20.tar.bz2
ln -s linux-2.6.20 linux
cd /usr/src/linux
- Configure (copy the current setting as a base)
cp /boot/config-`uname -r` ./.config
make menuconfig
- Build (replace the custom as whatever you want)
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
- Install
dpkg -i linux-image-linux-2.6.20-custom_linux-2.6.20-custom-10.00.Custom_i386.deb
dpkg -i linux-headers-linux-2.6.20-custom_linux-2.6.20-custom-10.00.Custom_i386.deb
- Restart (Choose the kernel in GRUB menu by pressing Esc when booting)
shutdown -r now
- Uninstall (in case of bad luck, need booting with any other kernel)
rm linux-image-linux-2.6.20-custom_linux-2.6.20-custom-10.00.Custom_i386.deb
rm linux-headers-linux-2.6.20-custom_linux-2.6.20-custom-10.00.Custom_i386.deb
apt-get --purge remove linux-image-2.6.20-custom
apt-get --purge remove linux-headers-2.6.20-custom
page revision: 0, last edited: 18 Feb 2008 22:58