After you finish compiling, there's a few more steps to go to make your computer boot from the new kernel. You have to copy the new kernel and the new System.map, to your /boot directory, then create a new 'initrd.img' file there.
Then you re-configure /etc/lilo.conf and run 'lilo'.
To make the new 'initrd.img' file, type the commands:
cd /usr/src/linux
mkinitrd ./initrd-2.4.21-0.25mdkcustom.img 2.4.21-0.25mdkcustom
Don't miss the period after the 'mkinitrd' command. This command takes the form:
mkinitrd ./<kernel_version>.img <kernel_version>
The example above shows that you use whatever name you gave your new kernel; in my case it was '2.4.21-0.25mdkcustom'.
In /usr/src/linux you will find a file called 'System.map'. It's a good idea to make a copy of this as System.map-<kernel_version> in /usr/src/linux.
Rename 'vmlinuz', 'initrd.img' and 'System.map' in /boot to 'vmlinuz-old', 'initrd.img-old' and 'System.map-old'. Now copy the new versions of these files into /boot. These steps are completed by:
cp /boot/vmlinuz /boot/vmlinuz-old
cp /boot/intird.img /boot/intird.img-old
cp /boot/System.map /boot/System.map-old
cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz
cp /usr/src/linux/initrd-<kernel_version>.img /boot/initrd.img
cp /usr/src/linux/System.map /boot/System.map
Make a copy of your /etc/lilo.conf as lilo.back, then change your lilo.conf to make it look like this:
#---------start of /etc/lilo.conf---------------
boot=/dev/hda
default="linux"
prompt
timeout=200
vga=788
image=/boot/vmlinuz
label="linux"
root=/dev/hda1
append="devfs=mount hdc=ide-scsi acpi=off quiet"
read-only
image=/boot/vmlinuz-old
label="linux-old"
root=/dev/hda1
append="devfs=mount hdc=ide-scsi acpi=off quiet"
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda1
append="devfs=mount hdc=ide-scsi acpi=off"
read-only
image=/boot/vmlinuz
label="failsafe"
root=/dev/hda1
append="devfs=nomount hdc=ide-scsi acpi=off failsafe"
read-only
other=/dev/fd0
label="floppy"
unsafe
#----------------end of lilo.conf------------------
In this example, the section in bold has been added. You do this by copying the first 'image=' block of your lilo.conf and pasting it directly below, then changing the names in the first two lines to add the '-old' suffix. [I'll clarify this: the idea is not to make your lilo.conf look like the above example; rather, it is to take whatever yours is, and modify it by copying the first block, pasting it underneath with the '-old' names.]
When that is done, type:
lilo
You should now be able to re-boot your computer and be able to select between your new and old kernels.
Source:
http://www.tldp.org/HOWTO/Kernel-HOWTO/index.html
(especially steps 2(Quick Steps), 10(Kernel Files Information) and 15(Appendix A - Creating initrd.img file))