Open a terminal and work through the following set of commands.
Install these packages
sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5 libncurses5-dev
Run this
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
Create your source directory
mkdir ~/src
cd ~/src
Download and extract your kernel
You can browse for kernels at http://www.kernel.org/pub/linux/kernel/v2.6/ This guide is using kernel 2.6.37.
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.tar.gz
tar xvf linux-2.6.37.tar.gz
cd linux-2.6.37
Configure your Kernel
make menuconfig
Build your Kernel
export CONCURRENCY_LEVEL=3
make-kpkg clean
time fakeroot make-kpkg --initrd kernel-image kernel-headers
General rule, concurrency level = number of processor cores + 1
Install your kernel
cd ~/src
dir
sudo dpkg -i linux-image-2.6.37_2.6.37-10.00.Custom_amd64.deb
sudo dpkg -i linux-headers-2.6.37_2.6.37-10.00.Custom_amd64.deb
Create the initramfs image
sudo update-initramfs -c -k 2.6.37
Update your grub.cfg
sudo update-grub
Reboot your system
Enjoy your new kernel.
This comment has been removed by the author.
ReplyDeleteThanks, this really helped me, I've saved this page to my PC for future use.
ReplyDeleteFailed to create ./debian directory. This message in all cases
ReplyDeleteP, note the date this blog entry was created, Sunday, 6 February 2011
ReplyDeleteA Ubuntu 10.04 installation with updates applied post 2011 may therefore be using an incompatible kernel config file.
Substitute kernel 2.6.37 in the guide with something else, perhaps more recent.
Unfortunately I do not have a 10.04 install atm but out of curiosity I may installing in a VM to test.
Will post back the results.