This section is written by Al Dev
The latest version of this section is at http://www.aldev.8m.com and click on "Quick Steps to recompile linux kernel". Mirror sites are at - http://aldev.webjump.com, angelfire, geocities, virtualave, bizland, theglobe, spree, infoseek, bcity, 50megs. These sites have lots of linux goodies and tips.
A copy of the above web-site is reproduced here -
Kernel re-compile is required in order to make the kernel very lean and which will result in FASTER operating system . It is also required to support any new devices. Note: Below 'bash#' denotes the bash prompt, you should type the commands that appear after the 'bash#' prompt.
bash$ su - root bash# cd /mnt/cdrom/RedHat/RPMS bash# rpm -i kernel-headers*.rpm bash# rpm -i kernel-sources*.rpm bash# rpm -i dev86*.rpm bash# rpm -i bin86*.rpm
bash# man startx bash# startx bash# cd /usr/src/linux bash# make xconfig
bash# man lsmod bash# man insmod bash# man rmmod bash# man depmod
bash# make dep bash# make clean
bash# man less bash# less /usr/src/linux/arch/i386/config.in Type 'h' for help and to navigate press i, j, k, l, h or arrow, page up/down keys.
        bash# cd /usr/src/linux
        bash# man nohup
        bash# nohup make bzImage &  
        bash# tail nohup.out     (.... to monitor the progress) 
This will put the kernel in /usr/src/linux/arch/i386/boot/bzImage 
        bash# man tail 
bash# cp /usr/src/linux/arch/i386/boot/bzImage     /boot/bzImage.myker  
bash# man lilo
bash# man lilo.conf
And edit /etc/lilo.conf file and put these lines - 
        image=/boot/bzImage.myker 
        label=myker 
        root=/dev/hda1 
        read-only 
You can check device name for 'root=' with the command - 
        bash# df   /boot 
bash# lilo bash# lilo -q
bash# rpm -i /mnt/cdrom/contrib/kernel-modules*.rpm ....(For old linux systems which do not have insmod pre-installed) bash# man insmod bash# insmod
bash# cd /usr/src/linux bash# make modules bash# make install_modules
bash# cd /usr/src/linux bash# make bzdisk See also mkbootdisk - bash# rpm -i mkbootdisk*.rpm bash# man mkbootdisk