If you use a Linux computer, knowing the Linux boot process can help you solve some computer booting errors. In this post, MiniTool Partition Wizard details every stage of the Linux boot process.

To boot a Linux computer, the PC should go through the following processes.

1. BIOS POST

Like Windows booting process, the first step of the Linux boot process is also the BIOS POST. When a Linux computer is powered on, the firmware built in ROM will be woken up. Then, it will do POST to check hardware like CPU, RAM, motherboard, hard drive, etc. If no component fails, the PC will go to the next stage.

Glossary of Terms – What Is BIOS?

2. MBR

In this step, BIOS will first find the bootable device. After finding the bootable device, it will go to the first sector of the device to read the MBR. MBR will tell the BIOS the location of GRUB (GRand Unified Bootloader). And then the GRUB will be loaded to RAM for running. Now, BIOS has turned the control of the computer over to GRUB.

What Is Master Boot Record (MBR)? Definition & How To Use

3. GRUB

The GRUB has OS information recorded. It will find and load the OS kernel into memory to execute. Now GRUB has turned the computer control over to the kernel, which is often referred to as the core of any operating system.

At the same time, GRUB will also load initrd/initramfs into RAM for running. The initrd/initramfs file is actually a virtual root file system, which has directories such as bin, lib, lib64, sys, var, etc, sysroot, dev, proc, tmp, etc. Its function is to establish a connection between the kernel and the real root file system.

[Solved] How to Fix GRUB Load Errors and Recover Data?

3. Kernel

The kernel will do the following things:

  • Detect the hardware
  • Load the driver of the root file system through the initrd/initramfs file
  • Mount the root file system in read-write mode
  • And run /sbin/init to complete the system initialization

4. Init

In this stage, the init process will execute the /etc/rc.d/rcS.conf script to call /etc/rc.d/rc.sysinit. This process will do the following things:

  1. Get the network environment
  2. Mount the device
  3. Boot screen Plymouth
  4. Determine whether to enable SELinux
  5. Display the welcome screen
  6. Initialize the hardware
  7. Load user-defined modules
  8. Configure the parameters of the kernel
  9. Set the host name
  10. Sync memory
  11. Initialize device mapper and related devices
  12. Initialize the software disk array (RAID)
  13. Initialize the file system function of LVM
  14. Check the disk file system (fsck)
  15. Set disk quota
  16. Re-mount the system disk in read-write mode
  17. Update quota (not necessary)
  18. Start the system virtual random number generator
  19. Configure the machine (not necessary)
  20. Clear temporary files during the boot process
  21. Create an ICE directory
  22. Start the swap partition
  23. Write the boot information into the /var/log/dmesg file

After executing /etc/rc.d/rc.sysinit, the init will execute /etc/inittab to determine the system operating level. Linux has preset seven run levels (0-6). Generally speaking, 0 is shutdown, 1 is single-user mode (that is, maintenance mode), and 6 is restart. As for run level 2-5, they are multi-user modes (that is, normal mode).

After this step is completed, you can log into your computer for using the Linux OS.

  • linkedin
  • reddit