Here's a nice script that I use from Simply Linux
and Crux linux.
It should work for you and any distro.
It is where the fun begins.
Every computer is not created equal. What works for me might not work for you. The command lines are the same, but the kernel configurations are not. Find out as much about your computer hardware as possible. Things like makes and models are helpful in configuring Linux.
First, you write a little script for compiling and recompiling kernel. You'll definitely need it a couple of times or more. The script will automate all the compiling processes and save you time. The date and ls commands let you know when the compilation is done and if it is done thoroughly. If the compilation breaks, you won't get new vmlinuz and System.map files. Because of the script, you will have to set up /etc/lilo.conf once before the first compilation.
1) Enter "pico /bin/compkern" and enter as follows:
make dep && make clean bzImage modules modules_install
cp arch/i386/boot/bzImage /vmlinuz
cp System.map /
2) Exit & save
3) Enter "chmod 700 /bin/compkern"
4) Enter "pico /etc/lilo.conf" and edit as follows:
Note: Replace hda1 with the right one. Assuming the computer has only one CD drive or burner.
5) Exit & save
6) Enter "compkern" to fire Linux Kernel Config up ( Note: To back out of it, hit CTRL-C )