Sarge uses grub as the boot loader (instead of lilo) and module-init-tools, initrd-tools, procps are already installed, We can compile kernel 2.6 under debian sarge as follows:
1.Installing some necessary tool packages:
#apt-get install kernel-package libncurses5-dev fakeroot bzip2
2. Installing the kernel sources :
Get the latest Linux kernel source (or the kernel source you need) from
http://www.kernel.org/pub/linux/kernel/v2.6/
There I download the kenerl source linux-2.6.16.27.tar.bz2 , move it into the directory /usr/src 。
#cd /usr/src
#tar xjf linux-2.6.16.27.tar.bz2
#cd linux-2.6.16.27
3. configure the kernel
#make menuconfig
#make-kpkg clean
#fakeroot make-kpkg --initrd --revision=custom.1.0 kernel_image
//custom.1.0 is the revision we define for ourself indentification
4. If the compilation stops with an error , then:
#make clean
#make menuconfig
5. Install new kernel image
If no error appears , we will find a new kernel as a debian package called kernel-image-2.6.16.27_custom.1.0_i386.deb under the directory /usr/src。
#cd /usr/src
#ls
#linux-2.6.16.27 kernel-image-2.6.16.27_custom.1.0_i386.deb
#apt-get install mkinitramfs-kpkg mkinitrd yaird
#dpkg –i kernel-image-2.6.16.27_custom.1.0_i386.deb
6. reboot & use the new kernel
This will install new kernel (including a ramdisk) and also update grub. We can now reboot our system, and we should then have a new kernel. Check that by running:
#uname -a
#2.6.16.27
All is OK! ^_^