Booting the kernel

The first step in the (simplified) boot up sequence for Linux is loading the kernel. The kernel image is usually contained in the_/boot_directory. It can go by several different names…

  • bzImage

  • vmlinuz

Sometimes the kernel image will specify the kernel version contained in the image, i.e.bzImage-2.4.18. Very often there is a soft link (like a shortcut) to the most current kernel image in the/boot_directory. It is normally this soft link that is referenced by the boot loader, LILO (or GRUB). The boot loader specifies the “root device” (boot drive), along with the kernel version to be booted. For LILO, this is all controlled by the file/etc/lilo.conf._ Each “image=” section represents a choice in theboot screen. GRUB is a more recent boot loader used by many Linux distributions. The concept is the same. You can look at themanorinfopages for either boot loader for more information.

more /etc/lilo.conf

boot=/dev/hda map=/boot/map

install=/boot/boot.b

prompt timeout=50

image=/boot/vmlinuz-2.4.17 Defines the Linux kernel to boot label=linux_oldMenu choice in LILOroot=/dev/hda3 Where the root file system is foundread-only**

other=/dev/hda1 Defines alternate boot option

label=Win2kMenu choice in LILOtable=/dev/hda

In the case of GRUB, each section beginning with “title” is a choice for booting and can include Linux as well as other operating systems, including Windows. Note again the reference to the kernel location, and the

“root device” (where the root filesystem is located). GRUB starts it’s counting from 0, so where you see “hd0,0” it is referring to the first IDE disk, followed by the first partition. See theinfoormanpage for GRUB.

In the following GRUB example, there will be three different Linux kernel choices offered in the boot menu. They all use the same root file system, but differ in the kernel image loaded from the_/boot_partition.

more /etc/grub.conf

boot=/dev/hda default=0 timeout=10

_splashimage=(hd0,0)/boot/grub/splash.xpm.gz title_Linux (2.4.20) root (hd0,0)

kernel /boot/bzImage-2.4.20 ro root=/dev/hda1 title Linux-enh (2.4.20-xfs-enh) root (hd0,0)

kernel /boot/bzImage-2.4.20-xfs-enh ro root=/dev/hda1 title Linux (2.4.19) root (hd0,0)

kernel /boot/bzImage-2.4.19 ro root=/dev/hda1

Once the system has finished booting, you can see the kernel messages that “fly” past the screen during the booting process with the commanddmesg. Often, this command can be used to find hardware problems, or to see how your suspect drive was detected (geometry, etc). The output can be piped through a paging viewer to make it easier to see:

dmesg | less

results matching ""

    No results matching ""