Quote Originally Posted by Hayabusa
decompress and untar the image in /usr/src. For example if you downloaded linux-2.6.3.tar.bz2 when uncompressed you should have a folder for /usr/src/linux/linux-2.6.3
The directory would be /usr/src/linux-2.6.3 after the extraction (tar -xjvf linux-2.6.3.tar.bz) and once done while still in the /usr/src directory.

Code:
ln -s /usr/src/linux-2.6.3 linux
Code:
apt-get install kernel-package libncurses5-dev
(and if building a 2.6.x kernel for the first time you'll want to add module-init-tools to this list as well)
Add to the list the package fakeroot.

[*] in /usr/src/linux-2.6.3/ run the following commands
Code:
make mrproper
make menuconfig
mrproper will insure a clean build and import some settings from your current working kernel. make menuconfig is an ncurses menu where you can go through and unselect/select support for various hardware and such relating to your computer. Once inside menuconfig the commands for adding/removing support are as follows: Y=yes (built-in support) N=no (no support) M=compiles support as a module. When you exit menuconfig say "yes" to saving the changes.
The mrproper is not necessary and you should.

Code:
cd /usr/src/linux
make menuconfig
{*] now that you've trimmed the fat from the kernel we're ready to build it as a package. in /usr/src/linux-2.6.3 run the following commands (as root):

Code:
su
Password:
make-kpkg clean
make-kpkg kernel_image
Never compile a kernel as root that is why the fakeroot package exists and should always be used for that purpose the commands would be in the /usr/src/linux directory.

Code:
fakeroot make-kpkg clean
fakeroot make-kpkg kernel_image
cd ..
su
Password:
dpkg -i kernel-image-2.6.3_10.00.Custom_i386.deb

[*] for some reason /etc/lilo.conf is never updated correctly to add an entry for the new kernel, so we must edit it manually (still as root). Add the following entry to the very bottom of /etc/lilo.conf:
Never happened to me before but I had a strange one last week on my firewall box where depmod would not run on the new kernel and caused an error during the installation I had to run it after booting into the new kernel.

[*]As a footnote if you're compiling ALSA into your kernel for the first time you'll also want to install the following packages:

Code:
apt-get install alsa-base alsa-utils gnome-alsamixer
upon installation fo these you'll be asked which soundcard(s) you want to install sound support for.. gnome-alsamixer is a nice gui tool for the inital umuting you need to do once ALSA is installed.[/list]
Also do not forget to remove the knx-alsa package to get it out of the way and prevent problems in the future.