Search

Compile the Debian/Ubuntu Kernel - The easy way PDF Print E-mail
User Rating: / 0
PoorBest 
Linux / Unix - Debain
Written by admin   
Wednesday, 16 June 2010 07:17

 

 

 

1) The current Linux source code is always available in both a complete tarball and an incremental patch from the official home of the Linux kernel, http://www.kernel.org.


2) Extract the kernel source to /usr/src/ directory. The kernel tarball is distributed in both GNU zip (gzip) and bzip2 format. Bzip2 is the default and preferred format, as it generally compresses quite a bit better than gzip. The Linux kernel tarball in bzip2 format is named linux-x.y.z.tar.bz2, where x.y.z is the version of that particular release of the kernel source. After downloading the source, uncompressing and untarring it is simple. If your tarball is compressed with bzip2, run

# tar -xvjf linux-x.y.z.tar.bz2

 


3)If it is compressed with GNU zip, run

# tar -xvzf linux-x.y.z.tar.gz


This uncompresses and untars the source to the directory linux-x.y.z.

4)Install the necessary packages for compilation

# apt-get install initramfs-tools fakeroot module-init-tools  libncurses5 libncurses5-dev

5)Configure the kernel


#make menuconfig

#make-kpkg --rootcmd fakeroot --initrd --revision=custom.001 kernel_image kernel_headers




6)Install the kernel by executing the following commands


# dpkg -i ../*.deb



After installing the kernel, GRUB entries in (/boot/grub/menu.lst) are automatically updated and next time we log in we could see the new Kernel in GRUB.




Add this page to your favorite Social Bookmarking websites
 
Last Updated on Saturday, 19 June 2010 08:03
 

Add comment


Security code
Refresh

We have 80 guests online