Linux Boot Process
Article Under Construction
There are 6 stages of a typical Linux boot process
1.BIOS
2.MBR
3.GRUB/LILO
4.Kernel
5.Init
6.Runlevel Programs
1.BIOS:
- Basic Input Output System is the lowest
level interface to peripherals andcontrols the first step of the boot
process.
- BIOS performs some integrity checks and
serches,loads, executes the bootable program. Its OS independent.
- It checks for a bootable media in
CD-ROM,HDD,USB to use to boot the system. you can press a key(F2,F12,F10 depends
on BIOS settings on the system) during the BIOS start-up to change the
boot sequence. Now a days network bootà typically called PXE-boot got
more familiar.
- BIOS looks for Master Boot Record(MBR) which starting at the first sector on the first hard drive, loads its contents into memory, and then passes control to MBR.
A Typical BIOS screen would look like as below.
Ø The main Task BIOS performs is POST (
Power On Self Test) Its a quick test of memory , It does the basic check for
fundamental hardwareon your computer.
Ø In side the BIOS list of devices that it
will check in order to see if there is a MBR present on the particular device
or not?
Ø If BIOS didn’t found the MBR i.e. Bootable
Program any of the listed devices in BIOS then BIOS fails to load the MBR
throws an error like bootable media not found !!!
2.MBR(Master Boot Record):
MBR located in the 1st Sector of the bootable disk. Typically /dev/hda (or) /dev/sda which is the size of 512 bytes.
v MBR
Contains the instructions how to load the GRUB boot –loader and how to execute
the GRUB as well. MBR typically contains the Partition table to boot over which
describes the partitions on the disk and sets up the menu.
v In
the default Red Hat Linux configuration GRUB uses the settings in the MBR to
display boot options in a menu which provides access to system.
MBR automatically launches
the boot loader.
3.GRUB/LILO(GRand Unified Bootloader):
1.GRUB(LILO) Boot loader will then ask for
the OS label which will identify which kernel to run and where it is located.
2.GRUB includes 3 stages
Stage 1 : Typically includes MBR(512
bytes)
Stage 1.5 : loads the FS drivers
(ext3,ext4,FAT etc.)
Stage 2
: Which loads the INIT.
3.GRUB displays the splash screen, waits
for few seconds, if you don’t enter anything , it loads the default kernel
image as specified in the grub configuration file.
4.Grub configuration file:/boot/grub/grub.conf(RHEL)
4.Grub configuration file:/boot/grub/grub.conf(RHEL)
[root@www grub]# pwd
/boot/grub
[root@www grub]# ls -l /boot/grub/grub.conf
-rw-------. 1 root root 769 Feb 11 02:13 /boot/grub/grub.conf
[root@www grub]# ls -l /etc/grub.conf
lrwxrwxrwx. 1 root root 22 Feb 11 02:13 /etc/grub.conf -> ../boot/grub/grub.conf
[root@www grub]#
/boot/grub
[root@www grub]# vim grub.conf
Comments
Post a Comment