BIOS -> GRUB -> INIT
1. System powered on and BIOS starts
2. BIOS checks the h/w components RAM,Keyboard,Mouse,HDD etc are connected and properly configured
3. BIOS sets up the environment and then checks the 1st bootable media (CDROM/LAN/HDD etc.)
4. BIOS searches for MBR (Master Boot Record ) in the bootable media
MBR - is of size 512 bytes which stores the bootable code with the partition table and then sets up the menu
5. BOOTCODE is checked - STAGE 1 of GRUB
GRUB - Grand Unified Bootloader -The default boot loader in *NIX based systems
6. Grub stage 1.5 is consulted presenting the Grub menuto user
7. From the menu the OS is selected to boot
Q . Where the menu is stored ? ( /boot/grub/grub.conf)
FACTS : The boot files are stored in /boot/grub
Stage 1 file present here with 512 bytes which sits in bootable mediawhich consults with stage 1.5
Stage 1.5 sets up the appropriate file system i.e. wheather to boot from the
CDROM using iso9660 i.e. iso9660_stage1.5 or from the
FAT file system using fat_stage1.5 or from the
XFS file system using XFS_stage1.5 or from the
EXT2FS /EXT3FS using e2fs_stage1.5
Stage 1.5 provides the drive information which is consulted with from stage 1 to access the File System
8. Grub stage 2 now sets up the environment and calls the INIT process ,which is present in the /sbin (System Binary )
INIT - A special process which sets up the linux environment
The parent process which starts first in a *NIX system with PID 1 and forks other processes .
9. INIT reads a special file /etc/inittab (A Table file ) , which contains system initialization entries
INITTAB - contains initdefault and runlevel entries , RUNLEVEL -
Runlevel is a system state in which some services are started and some are killed according to the need . Runlevel is controlled by the the parent process INIT . Like there are 6 run levels bydefault in any Linux.Unix systems as follows ;
Runlevel 0 init 0 halt used to halt a system
Runlevel 1 - init 1 Single User Mode Used for system maintainnance like backup etc. and in this the network services are stopped and only single user can logged in to a system for the maintainnance .
Runlevel 2 - init 2 Same as runlevel 3 but without NFS
Runlevel 3 init 3 Full multiuser mode with networking but without X11 i.e. GUI is absent .
Runlevel 4 init 4 Reserved for future purpose or u can edit this to create ur own runlevel
Runlevel 5 init 5 Full multiuser with X11 support
Runlevel 6 - init 6 Used for Reboot
This runlevel concept is usually used in all Linux machines as well as Unix machines .
In linux the file /etc/inittab stores the default runlevelin the line
id:1:initdefault
10. Now INIT sets up and boot appropriate runlevel as defined in inittab file .
|