ubuntu kernel compilation

i got the info from http://howtoforge.com about ubuntu compilation kernel
here are the step : (log in as root by sudo su first)

#rm -f /bin/sh
#ln -s /bin/bash /bin/sh
#apt-get update
#apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
then download the kernel source from www.kernel.org
if you already defined it then type this
#cd /usr/src
#wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.1.tar.bz2
#tar xjf linux-2.6.18.1.tar.bz2
#ln -s linux-2.6.18.1 linux
#cd /usr/src/linux
if you have to compile a patch here’re what to do
#cd /usr/src
#wget http://www.kernel.org/pub/linux/kernel/v2.6/testing/patch-2.6.19-rc4.bz2
#cd /usr/src/linux
#bzip2 -dc /usr/src/patch-2.6.19-rc4.bz2 | patch -p1 –dry-run
#bzip2 -dc /usr/src/patch-2.6.19-rc4.bz2 | patch -p1

#cp /boot/config-`uname -r` ./.config
#make menuconfig

after finished setting the way you want do these
#make-kpkg clean
#fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers

then you will find two deb packages
for example
#dpkg -i linux-image-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
#dpkg -i linux-headers-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb

then restart you comp and find out your new kernel by
#uname -a

i did this for fixing my vga actually.

Leave a Reply

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

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