Have you ever wondered how operating system got loaded in our system?
Don’t worry i will share the knowledge which got!!
It involves mainly six steps as defined below:
- BIOS
- MBR
- GRUB
- Kernel
- Init
- Run level
1.BIOS
BIOS stands for Basic Input Output System which performs POST(Power-On System Testing) operations. When we turn on our system it performs the sanity check of our hardware devices. It looks for boot loader in Master Boot Recorder if it founds it will handover the task to our system else it will throw error
2.MBR
MBR stands for Master Boot Loader which is responsible loading and running GRUB. MBR mostly founds in first sector of bootable device. In most cases, /dev/had or /dev/sda.
3. GRUB
GRUB stands for Grand Unified Boot Loader. When our system turn on it will show splash screen which waits for user input to load the operating system.
If user didn’t selects anything it will load default OS which we have configured in the /boot/grub/grub.conf file.
4. Kernel
Kernel is the heart of every operating systems. In this stage it loads init programs and its process id is always 1. It temporarily mounts the File System until real file system is mounted.
5. Init
In this stage of boot process it will determine the run level with the help of init file at /etc/inittab. Instead, modern Linux systems use systemd to select a run level. The Linux operating system includes seven (7) different run levels.
• 0 — halt
• 1 — single-user mode
• 2 — Multiuser, without NFS
• 3 — Full multiuser mode
• 4 — unused
• 5 — X11
• 6 — reboot
Init will examine and identify the default initlevel from the file “/etc/inittab” in order to load all appropriate programs for the run level.
6. Runlevel
There is only one default run level; it will execute all essential programs for that run level.
• 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/
.