Compile Debian Linux kernel

Compile Ubuntu kernel

get the tools for building the kernel

apt-get -y install build-essential libncurses5-dev fakeroot kernel-package  linux-source

the kernel source code will be in /usr/src/

go to /usr/src and decompress the kernel

tar -xjf linux-source-2.6.28.tar.bz2

and make a symlink

ln -s /usr/src/linux-source-2.6.28 linux

now go the the kernel menu and select what options do you want to compile in your kernel

make menuconfig

next,  rebuild the kernel

cd /usr/src/linux
fakeroot make-kpkg --initrd --revision=subzero.1.0 kernel_image