During boot-up, boot loaders need to know where the kernel is
(usually in /boot) and which device is the
root-device.
BOOTLOADER → KERNEL → / → /sbin/init
Alternatively, a boot loader can load a RAM disk into memory containing scripts and kernel modules needed to access the root device. This will be the case when the root-device is handled by non-resident (also called dynamic) modules.
BOOTLOADER → INITRD → KERNEL → / → /sbin/init
Table 2.3. Common dynamic modules
ext3 | Third extended filesystem type |
lvm | Logical volume support |
raidx | software raid level x support |
scsi | SCSI support |
The bootloader LILO is installed by
/sbin/lilo (the bootloader mapper or installer) which
in turn reads configuration options from the file
/etc/lilo.conf.
LILO cannot read filesystems, only offsets on the physical disks.
Therefore the mapper will read information from the
/etc/lilo.conf file (e.g
which second stage bootloader to use, which kernel or which initial ram
disk) and will translate this information using a system of maps for LILO
to read at boot time.
The main options in /etc/lilo.conf are specified
here
boot* | where LILO should be installed (/dev/hda is the
MBR) |
install | which second stage to install (boot.b is the
default) |
prompt | give the user a chance to choose an OS to boot |
default | name of the image that will be booted by default |
timeout | used with prompt, causes LILO to pause (units are 1/10 of a sec) |
image* | path to the kernel to boot (one can use other to chain load) |
label* | name of the image. This is the name a user can type at the boot prompt |
root* | the name of the disk device which contains the root filesystem / |
read-only* | mount the root filesystem read-only for fsck to work properly |
append | give kernel parameters for modules that are statically compiled. |
linear/lba3 | these options are mutually exclusive. Both ask LILO to read
the disk using Linear Block Addressing. linear is
typically used for very large disks. lba32 is used
to allow boot time access to data beyond the
first 1024 cylinders |
The GRUB boot loader is installed with the command
grub-install.
Configuration options are stored in the file
/boot/grub/menu.lst or
/boot/grub/grub.conf.
Unlike LILO, GRUB is a small shell that can read certain filesystem.
This allows GRUB to read information in the grub.conf
or menu.lst files.
Main sections in /boot/grub/grub.conf:or menu.lst
General/Global
default | image that will boot by default (the first entry is 0) |
timeout | prompt timeout in seconds |
Image
title | name of the image |
root | where the 2nd stage bootloader and kernel are e.g
(hd0,0) is /dev/hda |
kernel | path for the kernel starting from the previous root e.g
/vmlinuz |
ro | read-only |
root | the filesystem root |
initrd | path to the initial root disk |
It is possible to give parameters at boot time to both LILO and GRUB. Both loaders have a limited interface which can read user input.
Example 2.2. Passing parameters at the GRUB prompt
Once the GRUB boot loader has successfully started you will see the main menu screen with a list of menu titles.
Do the following:
press 'e' to edit a given menu title
scroll down to the line containing 'kernel' and press 'e' again
you can add any options here
to boot with the current options type 'b'. Otherwise just press return to get the unaltered line back
Notice that pressing the ESC key will bring you back to a previous stage. You can navigate back to the main menu this way.
Alternatively the boot loader configuration files
(lilo.conf or grub.conf)
can be used to save these option
Boot loaders can passe the runlevel parameter to init. Once the kernel is loaded, it will start /sbin/init by default which then takes over the booting process.
Common runlevels are s, single,
S, 1, 2,
3, 4, 5
If no parameters are given, init will launch the
default runlevel specified in /etc/inittab.
Kernel options are of the form item=value.
Table 2.4. Common kernel parameters
acpi= | enable/disable ACPI |
init= | tell the kernel which program to start from the root device |
mem= | specify amount of RAM to use |
root= | specify the root device |

![]() | Warning |
|---|---|
The boot loader kernel parameters are passed to the resident
kernel modules only. To pass parameters to non resident modules one can do this using |
In /etc/lilo.conf kernel parameters are declared
with the append option.
Examples
append="pci=bisoirq" append="ram=16M" append="/dev/hdc=ide-scsi" (for CD writers)
During bootup all kernel messages are buffered and dumped to
/var/log/dmesg as soon as filesystems are loaded.
This file can then be read after the system has boot and will contain only information about the booting kernel. Subsequent kernel events are continously looged and can be displayed using the
/bin/dmesg utility.