Ubuntu kernel compiling preparation

In every ubuntu version, there is always a chance to recompile the kernel. Like I did today. But like any other ubuntu program, you need to online and get the preparation file first. These are what necessary to recompile ubuntu.

1. file preparation.
#sudo apt-get install linux-kernel-dev fakeroot build-essential makedumpfile ncurses-dev kernel-package

2. get the latest kernel in http://www.kernel.org.
extract it to /usr/src by
#tar xvfj linux-kernel.tar.bz2
#tar xvfz linux-kernel.tar.gz

3. enter to /usr/src/linux-kernel
4. sudo su (as root enter the password)
5. edit the configuration menu for your hardware
#make menuconfig

6. after finish editin the config, save it.
7. compile the configuration, this could take hours depend on your computer speed.
#make kpkg-clean
#make all
#fakeroot make-kpkg –initrd –append-to-version –custom kernel_image kernel_headers

8. install it to /boot
#make install

9. edit the grub
#nano /boot/grub/menu.lst
change the necessary pointing kernel and restart the computer.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.