I’ve tried and tried to build my own custom kernel over the past year or so, usually only to stop in frustration because of some small part of the process not working.
This is all different now.
I found out that using the took make-kpkg makes things way easier. In fact I configured, compiled, and installed kernel 2.6.15 in about 30 minutes including the time that it took me to build it.
Here’s the process that I followed to achieve this:
- Get required packages
apt-get install libncurses5-dev fakeroot bzip2 kernel-package
- Get latest kernel package from Kernel.org. The latest one at the time of this post is linux-2.6.15.tar.bz2.
- Decompress the kernel archive (
tar -xjvf linux-2.6.15.tar.bz2)
- Start the kernel configuration tool (
- make-kpkg clean
- fakeroot make-kpkg –initrd –revision=myfirstkernelbuild_v.0.1 kernel_image
- Install the kernel (
dpkg -i kernel-image-2.6.15_myfirstkernelbuild_v.0.1.deb)
- Restart the computer (
I should mention that it was way easier for me to load my existing kernel configuration, which was located at
/boot/config-(kernel version here).
This runs make-kpkg as root, while making it so that initrd can load the kernekl. –revision is just the revision of the kernel, and kernel_image is just the name of the kernel that you’re building.
The output of this command is kernel-image-2.6.15_myfirstkernelbuild_v.0.1.deb
If this process worked the output of
uname -r should be 2.6.15.
Let me know if you have any problems.