Building the Linux Kernel

Now that we’ve covered the “Whys,” it’s time to roll up our sleeves and actually compile a kernel. If you haven’t done this before, it’s best to do it on a test machine or make a backup of your old kernel just in case. If you use LILO to boot your Linux machine, make a copy of the Linux kernel before compiling a new kernel and make a new entry in your /etc/lilo.conf for the old kernel. It should look something like this:

root=/dev/hda2 
boot=/dev/hda 
install=/boot/boot.b 
map=/boot/map 
vga=normal 
timeout=300 
prompt 
default=Linux 
lba32 

image=/vmlinuz 
      label=Linux 
      read-only 
      initrd=/boot/root.bin 
      root=/dev/hda2 

image=/vmlinuz.old 
        label=Old_Kernel 
        read-only 
        optional 
        root=/dev/hda2 

Then simply run lilo and you’ll have a working ...

Get Linux® Routing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.