Compiling a custom Ubuntu Kernel step by step

I want to list here brefly all steps to compile a custom Ubuntu kernel

  • sudo -s
  • apt-get install kernel-source kernel-package libncurses5-dev fakeroot
  • cd /usr/src
  • tar xvjf tar xjvf linux-source-`uname -r`.tar.bz2
  • ln -s /usr/src/linux-source-2.6.31 linux
  • cd /usr/src/linux
  • cp /boot/config-`uname -r` /usr/src/linux/.config
  • make menuconfig
  • Now you can modify the kernel configuration…
  • make-kpkg clean
  • fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers

After some time you will have debian packages like: linux-image-xxx.deb linux-headers-xxx.deb in /usr/src

Use dpkg -i *.deb to install it, reboot your machine and select them in grub/lilo.

Leave a Reply

Your email address will not be published. Required fields are marked *