Pages

May 14, 2011

Linux:Boot Process[LILO]


When a PC is booted it starts running a program called BIOS- will be residing in EEPROM .
BIOS program will try to read the boot sector which will be residing either in Hard drive/
Floppy.
I have considered LILO boot loader .More recently GRUB which a clown of LILO has taken over it.More details of GRUB in a seperate post.

LILO[LInux LOader] is the program that Linux systems typically use to give users a choice of operating systems to run. It is usually installed in the boot sector which is also called the master boot record
This program will attempt to read the operating system from the disk and run it. 

Some of the features of LILO include the following: 
  • It is independent of the file system. You can use LILO with DOS, UNIX, OS/2, and Windows NT. 
  • It can replace the master boot record on your hard drive.
  • It can use up to 16 different boot images on several partitions on your hard drive. Each image can be protected by a password. 
  • It provides support for boot-sector, map-file, and boot images to reside on different disks or partitions. 
Snap of  liloconfig 
boot=/dev/hda 
map=/boot/map 
install=/boot/boot.b 
prompt 
timeout=50 #timeout period for the user to press the TAB key
default=rhl #default to run
image=/vmlinuz # Location of kernel 
root=/dev/hda2 # Location of root partition 
label=linux # Name of OS (for the LILO boot menu)
other=/dev/hda1 
label=dos 
table=/dev/hda
In this lilo.conf file, you can see two different kernels that can be booted from /dev/hda. The first image is the default image, called vmlinuz. The other image is labeled DOS for the DOS partition
  • The kernel will try to mount the root filesystem. The location of the filesystem is configurable at compilation time, with the rdev program, or with LILO. The filesystem type is detected automatically. If mounting the root filesystem fails, the kernel will panic and halt the system. The root filesystem is usually mounted read-only so that the filesystem can be checked while it is mounted. This feature can also be modified using the rdev program. It is not advised to check a filesystem already mounted as read-write.
  • The kernel starts the program "init" which becomes process number 1. Init will start the rest of the system.
  • If you have made any modification to lilo conifguration file use "lilo -v" to read the changes and modify the boot sector

    No comments: