Modifying the Bootloader For the New Kernel
There are two common Linux kernel bootloaders: GRUB and LILO. GRUB is the one more commonly used in modern distributions, and does some things a little more easily than LILO, but LILO is still seen as well. We'll cover both in this section.
To determine which bootloader your system uses, look in the /boot/ directory. If there is a grub subdirectory:
$ ls -F /boot | grep grub
grub/
then you are using the GRUB program to boot with. If this directory is not present, look for the presence of the /etc/lilo.conf file:
$ ls /etc/lilo.conf
/etc/lilo.conf
If this is present, you are using the LILO program to boot with.
The steps involved in adding a new kernel to each of these programs are different, so follow only the section that corrisponds to the program you are using.
GRUB
To let GRUB know that a new kernel is present, all you need to do is modify the /boot/grub/menu.lst file. For full details on the structure of this file, and all of the different options available, please see the GRUB info pages:
$ info grub
The easiest way to add a new kernel entry to the /boot/grub/menu.lst file is to copy an existing entry. For example, consider the following menu.lst file from a Gentoo system:
timeout 300 default 0 splashimage=(hd0,0)/grub/splash.xpm.gz title 2.6.16.11 root (hd0,0) kernel /bzImage-2.6.16.11 root=/dev/sda2 vga=0x0305 title 2.6.16 root (hd0,0) kernel /bzImage-2.6.16 root=/dev/sda2 vga=0x0305
The line
starting with the word title
defines a new ...
Get Linux Kernel in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.