1. Download your kernel source.
2. Unpack your kernel source in /usr/src. This will create a drawer with the kernel version number (i.e. linux-2.4.21).
3. Remove the link 'linux' in /usr/src with rm -i /usr/src/linux
4. Link your latest kernel source to 'linux' by typing 'ln -s /usr/src/linux-2.4.21 /usr/src/linux
5. Back up your modules if you are recompiling the same kernel version. cp /lib/modules/2.4.21 /lib/modules/2.4.21.old
6. make menuconfig and tweak away!
7. To time and compile your kernel (you do want to see how much faster it compiles when you've tweaked it don't you? ;-) use:
date >> kernel.timer; make dep; make clean; make bzImage; make modules; make modules_install; date >> kernel.timer
8. The new kernel (in /usr/src/linux/arch/i386/boot/bzImage) can then be copied to /boot with any name; try something like bzImage-new, just make sure you refer to that in your /etc/lilo.
9. Copy /usr/src/linux/System.map to /boot, again with a different name (i.e. System.map-new), then delete the link System.map (rm -i /boot/System.map) and link to the new one (ln -s /boot/System.map /boot/System.map-new).
10. Edit /etc/lilo.conf, run lilo, reboot and choose your new kernel for testing!
By using symbolic links, you can have a large number of System.map[version] files, just link to the one you want with a symbolic link. Same with the bzImage, once that is made in /usr/src/linux/arch/i386/boot, you can copy it to /boot with any name, and just refer to that in /etc/lilo.conf. The kernel source is totally seperate from /boot and /lib/modules; your system is running from these places, /usr/src/linux is just the area in which you compile your kernel. Hope I havn't confused you further!
OH BTW, my point about timing the kernel, in /usr/src/linux there will be a file called kernel.timer. Use 'cat kernel.timer' to get the time your kernel started compiling and finished compiling. If you do the eaxct same compile again after you load your new kernel, you can see how much faster the process is. Of course you don't need to copy the files again once you have recompiled. Just be satisfied on having speeded you machine up! A very
rough and ready benchmark, but it works for me!