In this articles, I will tell you about the boot process in Linux. This article is especially for the beginners who are new to Linux.

6 Steps of boot Process

  1. BIOS (Basic Input Output System)
  2. MBR (Master Boot Record)
  3. GRUB (Grand Unified Bootloader)
  4. KERNEl
  5. INIT (Initialization)
  6. RUN LEVELS

1) BIOS (Basic Input Output System)

-> Perform systems integrity checks (Post-Power on Self Test).

-> Searches, Loads and executes the Boot Loader program.

-> Once the Boot Loader program is Detected and loaded into memory, Bios gives control to it.

2) MBR (Master Boot Record)

-> It is located in the first sector of the bootable disk typically /dev/sda or /dev/hda.

-> MBR is 512 Bytes in size.

3) GRUB (Grand Unified Bootloader)

-> If you have multiple kernel images installed on your system, you can choose which one to be executed.

-> GRUB displays a 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.

-> GRUB configuration file is /boot/grub/grub.conf and it contains kernel and initrd image.

4) KERNEL

-> Kernel mounts the root file system as specified on the grub.conf file.

-> Once Kernel starts it operation first thing it does is executing sbin/init process.

-> Initrd is used by the kernel as temporary root file system until kernel mounts the root file system.

5) INIT (Initialization)

-> Look at the /etc/inittab file to decide the Linux run level.

-> Run levels decide which initial programs are loaded at startup.

-> Following are the available run levels

  • 0 – Halts
  • 1 – Single user mood
  • 2 – Multiple users, without NFS
  • 3 – Full multiuser mode
  • 4- Unused
  • 5 – Graphic User Interface (GUI)
  • 6 – Reboot

6) RUN LEVELS

-> Depending on your init level setting, the system will execute the program 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/

-> Under the /etc /rc.d/rc*.d/ directories, youwould see program that starts with S and K.

-> Programs start with S are used during Startup. S for Start up.

-> Programs start with K are used during Shutdown. K for Kill.

-> Then Login prompt will be displaued to enter username and password.

We hope that this article will be beneficial for you if you liked it please give us a thumbs up.