(I have put the text through the official text formatter now! Hopefully this will work for everyone.)

This is a summary I've used before of my own creation. I've added some snippets from the above posts. Please post additions, subtractions, thoughts, improvements. Thanks.

Download the latest kernel sources from ftp.kernel.org, or a mirror.

I do the next step in /tmp - gunzip and tar -zxvf it, if you got the tar.gz

rename your old source tree untar new tree make sure the symbolic link of /usr/src/linux points to new kernel that you just untarred

cd usrsrc rm linux ln -s /usr/src/linux-2.2.NEW /usr/src/linux
(where /usr/src/linux-2.2.NEW is the new kernel directory)

This will leave the old stuff as a backup and out of your way and now the directory of /usr/src/linux points to the right place.

These next two symbolic links are necessary (or at least I was told this from the newsgroups - a long time ago - seems better to do this than not and err on the side of caution. If we don't need them anymore, someone please tell for sure - thanks).

ln -sf /usr/src/linux/include/linux /usr/include/linux

(this creates symbolic links to current installed libraries from new kernel src)

ln -sf /usr/src/linux/include/asm /usr/include/asm

(this create symbolic links to current installed libraries from new kernel src)

And if you have SCSI drives do this to link to the new scsi source.

ln -sf /usr/src/linux/include/scsi /usr/include/scsi

Now use the following to commands to setup and compile your new kernel and modules.

make mrproper
make menuconfig or xconfig or oldconfig
make dep
make clean
make bzImage
make modules
make modules_install

Copy and rename kernel to boot directory The newly compiled kernel is called "bzImage" and will be located in:

/usr/src/linux/arch/i386/boot

Better be more precise here, especially if you have more than one kernel in your /boot directory. If you had vmlinuz as a symbolic link to your old kernel, then "rm -rf vmlinuz".

Now copy or move over the new kernel and rename it vmlinuz-2.2.-x. Then "ln -s vmlinuz-2.2.x vmlinuz" will set you straight with using the new kernel.

Edit lilo.conf

Just make sure that you are pointing to the right kernel in your first lilo boot block stanza.

Run "zlilo" to set the new kernel Or just run /sbin/lilo.

Other symbolic links to change afterwards:

The new system Map found in: /usr/src/linux

Best to "rm -rf System.map" in your /boot directory, then move over the new System.map from the source tree (/usr/src/linux) to the /boot directory. Once it is there, "mv System.map System.map-2.2.x" and then "ln -s System.map-2.2.x System.map". It may seem anal to use symbolic links but this avoids the possibility of nuking the real file rather than the link. That should do it. Reboot and see if things look OK.

Advice provided by: jbowling(at)direct(dot)ca and others at linux.sources.kernel