Wednesday, 19 March 2014

REDHAT LINUX BOOTING PROCEDURE



1. First we power on machine, then BIOS (Basic Input Output System) takes over. BIOS runs POST(Power on Self Test), i.e. BIOS is responsible to check the RAM, Key Board, Storage devices etc.
2.     BIOS find a first bootable device (hard disk). It searches for the Master Boot Record (MBR), and the control transfers to the master boot record. This stage is called Stage 1 GRUB. After Stage 1 GRUB, Stage 1.5 GRUB is consulted, which it is located in the first 30KB hard disk immediately followed byMBR, and it loads the Stage 2 GRUB
3.     Stage 2 GRUB receives the control, and displays the GRUB boot menu for the user, and GRUB load an user selected(or default) kernel image & required kernel modules into the memory and control passes to the kernel phase.
4.     During the kernel phase, it initiates the /sbin/init program, and control passes to init phase
5.     Finally the init process reads the /etc/inittab and starts the /etc/rc.d/rc.sysinit scripts accordingly, and it will reach to appropriate runlevel
NOTE:
1.     The 1st & 2nd boot loaders combined are called Linux Loader (LILO) or Grand Unified Boot loader (GRUB) in the x 86 PC environments as LILO has some disadvantages that were corrected in GRUB. TheLILO is two stage boot loader and the GRUB is three stage boot loader (i.e. 1 (MBR), 1.5, 2)
2.     To check the MBR content, need to run below commands
          # dd if=/dev/hda of=mbr.bin bs=512 count=1
          # od -xa mbr.bin
Here dd command reads the first 512 bytes from /dev/hda, writes them into mbr.bin file, and odcommand prints the binary file in HEXA and ASCII formats


No comments:

Post a Comment