Linux Boot Process:
In the linux we have a 6 level of boot process:
BIOS:
MBR:
GRUB:
KERNEL:
mount the root file system located in /etc/grub.conf
Kernel executes the /sbin/init program
Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
initrd stands for Initial RAM Disk.
INIT:
after that it goes to /etc/inittab file to check the Linux run level.
here are the available run levels in Linux:
0 – halt
1 – Single user mode
2 – Multiuser, without Network file system.
3 – Full multiuser mode
4 – unused (for testing purpose)
5 – X11 (Desktop Environment )
6 – reboot
Typically you would set the default run level to either 3 or 5.
RUNLEVEL:
When the Linux system is booting up, you might see various services getting started. For example, it might say “starting Spool …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
Depending on your default INIT runlevel setting, the system will execute the programs from one of the following directories.
Run level 0 – /etc/rc.d/rc0.d/
Run level 1 – /etc/rc.d/rc1.d/
Run level 2 – /etc/rc.d/rc2.d/
Run level 3 – /etc/rc.d/rc3.d/
Run level 4 – /etc/rc.d/rc4.d/
Run level 5 – /etc/rc.d/rc5.d/
Run level 6 – /etc/rc.d/rc6.d/
In the linux we have a 6 level of boot process:
BIOS:
BIOS stands for Basic Input/Output System.Performs some system integrity checks.Searches, loads, and executes the boot loader programs.
Once the boot loader program is detected and loaded into the memory, BIOS gives the control to it.
MBR:
MBR stands for Master Boot Record.
It is located in the 1st sector of the bootable disk. MBR is less then 512KB in size .
It contains information about GRUB (or LILO in old systems).in simple terms MBR loads and executes the GRUB boot loader.
GRUB:
GRUB stands for Grand Unified Bootloader.
If you have multiple kernel images installed on your system, you can choose which one to be executed.
Grub configuration file is (/boot/grub/grub.conf) (/etc/grub.conf is a link to this).
As you notice from the above info, it contains kernel and initrd image.GRUB just loads and executes Kernel and initrd images.
KERNEL:
mount the root file system located in /etc/grub.conf
Kernel executes the /sbin/init program
Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid.
initrd stands for Initial RAM Disk.
INIT:
after that it goes to /etc/inittab file to check the Linux run level.
here are the available run levels in Linux:
0 – halt
1 – Single user mode
2 – Multiuser, without Network file system.
3 – Full multiuser mode
4 – unused (for testing purpose)
5 – X11 (Desktop Environment )
6 – reboot
Typically you would set the default run level to either 3 or 5.
RUNLEVEL:
When the Linux system is booting up, you might see various services getting started. For example, it might say “starting Spool …. OK”. Those are the runlevel programs, executed from the run level directory as defined by your run level.
Depending on your default INIT runlevel setting, the system will execute the programs from one of the following directories.
Run level 0 – /etc/rc.d/rc0.d/
Run level 1 – /etc/rc.d/rc1.d/
Run level 2 – /etc/rc.d/rc2.d/
Run level 3 – /etc/rc.d/rc3.d/
Run level 4 – /etc/rc.d/rc4.d/
Run level 5 – /etc/rc.d/rc5.d/
Run level 6 – /etc/rc.d/rc6.d/
No comments:
Post a Comment