Rebuild kernel in Debian

Posted on May 16, 2008
Filed Under Debian |

1. Install the necessary software before compiling the kernel:

apt-get install kernel-package libncurses5-dev fakeroot module-init-tools

2. Download the latest kernel,uncompress it to  /usr/src:

tar -jxvf linux-2.6.25.tar.bz2 -C /usr/src
cd /usr/src/linux-2.6.25
cd /usr/src/
cp /boot/config-2.6.22-3-686 ./

3. make menuconfig

Choose the profile(/usr/src/linux-2.6.25/config-2.6.22-3-686) to the dialog box.

Save and exit. The default configuration will be saved in /usr/src/linux/.config.

4. make-kpkg clean

Compile the new kernel and package the source file into deb file:
fakeroot make-kpkg -revision=mykernel.1.0 kernel_image –initrd

After compiled ,system will generate a deb package in /usr/src directory:
2.6.25_mykernel.1.0_i386.deb
5.  Install this deb package:
dpkg -i linux-image-2.6.10_mykernel.1.0_i386.deb

Tags:

If you enjoyed this post, make sure you subscribe to my RSS feed!

Comments

Leave a Reply