1. Install these packages
sudo apt-get install kernel-wedge kernel-package libncurses5-dev
2. Run this command
sudo apt-get build-dep --no-install-recommends linux-image-$(uname -r)
3. Create your source directory
mkdir ~/src
cd ~/src
4. Download the Kernel source
apt-get source linux-image-$(uname -r)
5. Configure your Kernel
cd linux-2.6.38
make menuconfig
6. Speed up the build
export CONCURRENCY_LEVEL=3
General rule, concurrency level = number of processor cores + 1
7. Clean up temp files from a previous compile attempt (skip if necessary)
make-kpkg clean
8. Compile your Kernel
time fakeroot make-kpkg --initrd --append-to-version=-tweak kernel-image kernel-headers
You can change -tweak to anything you wish
9. Install your Kernel
cd ~/src
sudo dpkg -i linux-image-2.6.38.2-tweak_2.6.38.2-tweak-10.00.Custom_amd64.deb
sudo dpkg -i linux-headers-2.6.38.2-tweak_2.6.38.2-tweak-10.00.Custom_amd64.deb
10. Reboot
Great post, i used it but found the location to select my kind of processor, is this normal??
ReplyDeleteThank you!
Sorry but I am having trouble understanding your question.
ReplyDeleteIm getting a "E: You must put some 'source' URIs in your sources.list" error. Do you know what I should add to the sources.list file?
ReplyDeleteNevermind, I found them :-) Thanks for the helpful post BTW.
ReplyDeletedeb-src http://us.archive.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ natty-proposed main restricted universe multiverse
Awesome. Most awesome my friend... that was fun for me. I'm a hobbyist and I enjoyed the rather LOOOOONG list of options in step five... couldn't have done it without you bubba!
ReplyDeleteI just had problem of Kernel PANIC:
ReplyDeleteKernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Which I got when I tried to boot into the 'tweak' kernel.
To fix this I had to update initramfs and grub2 using the following commands:
update-initramfs -u -k 2.6.32.46+drm33.20-tweak
(The above kernel version is at /lib/modules
cat /lib/modules would show that)
update-grub2
This solved my problem and I have a recompiled kernel :)
Going by the kernel version Arnold, it seems you are using 10.04 and not 11.04 which this guide is aimed at.
ReplyDeleteWith 10.04 you have to run update-initramfs as you described followed by update-grub.
11.04 does these steps automatically.