To config, build, and install new kernel on Ubuntu 10.04 follow these steps:
cd to the directory with the kernel source tree (assuming this is
~/linux
):cd ~/linux
Copy your current kernel configuration to the source tree:
cp /boot/config-2.6.32-32-generic .config
Config additional options (here I just accept defaults):
yes '' | make oldconfig
Now you can change some options, if you don't want defaults. On my machine I chose '
Processor family
' = 'Core 2
' and 'Preemption model
' = 'Preemptible kernel
'. To do this run:make menuconfig
and chose options that you like. You can press
?
on any option and there will be short description.Build the kernel:
make -j4 > /dev/null
change
4
to the (number_of_physical_cores_on_your_machine * 2), this will make building of the kernel a lot faster. Don't be afraid of> /dev/null
since all the warnings and errors still will be output.Install the new kernel:
sudo -s make INSTALL_MOD_STRIP=1 modules_install
you can just
make modules_install
if you plan to debug the kernelmake install update-initramfs -c -k `make kernelrelease` update-grub exit
This how-to is based on New kernel on Ubuntu 10.04