Boot Process in Linux

Hello Geeks, Boot Process in Linux is very important topic and a Linux System administrator must know all the steps in the boot process to fix and troubleshoot boot issues.
From powering on the machine till the time we get the login prompt, it goes through several steps. Below info-graphic shows the high-level steps during the boot process.

High Level Steps of Boot Process in Linux 
Now let us see all the steps of boot process in detail


Basic Input/Output System or simply BIOS is the first stage of the boot process. BIOS is stored in the ROM of the motherboard of the system and it is always executed regardless of the operating system installed. BIOS performs the POST – Power-on self-test to detect, initializes and test the connected hardware. POST ensures that all the connected hardware is working fine. Once done with the POST part, next task that BIOS does is to determine the bootable device like cd-rom, hard-disk, USB drive etc. Once BIOS finds a valid bootloader device, it gives control to the first sector of the bootable device or simply loads the master boot record (MBR).

Master Boot record: 

MBR is the first sector of bootable device and it is of 512 bytes. 512 bytes of MBR are divided into three parts.

446 bytes of bootloader that is knows as GRUB, 64 bytes contains the partition table info and 2 bytes for MBR Validation check used for error detection. MBR loads the GRUB2 boot loader into memory and transfers control to it.

GRUB2 bootloader

GRUB2 is default bootloader used from RHEL 7 onwards, replacing the legacy grub of earlier versions. GRUB stands for Grand Unified Boot Loader

Grub menu during boot process

Grub 2 configuration file is located at /boot/grub2/grub.cfg and it takes menu configuration settings from another file that is /etc/default/grub
/boot/grub2/grub.cfg  < Config file >
/etc/default/grub  < Menu Configuration settings >
GRUB2 searches for the compressed kernel image “vmlinuz” in the /boot directory and loads the “vmlinuz” content into memory and extracts the content of initramfs image into a temporary file system (tmpfs)


The function of kernel is to handle and control all the Operating system processes and like memory management, input output devices, task scheduling. Kernel starts the first process that is systemd with pid of 1.
You can check using top command or ps -ef | grep systemd
   1 root      20   0   51788   3912   2496 S   0.0  0.0   5:06.62 systemd
Initrd or initial RAM disk is used to temporarily mount the root file system before the real root file system is mounted. initramfs (Initial RAM file system)  preloads the required block device modules like SCSI, RAID to load the actual file system. Once real file system is mounted, initrd is unmounted.


Systemd  (d at the end refers to daemon – processes that runs in background ) reads from /etc/systemd/system/ to determine the target. Systemd replaces the init process found in the older versions 
Example of /etc/systemd/system/
Description=Multi-User System
Conflicts=rescue.service rescue.service
To find out current target of the system
[root@Master ~]# systemctl get-default
To set the default target run below command
systemctl set-default  refers to run level 3 refers to run level 5

systemd targets

RunlevelTarget UnitsDescription, poweroff.targetShut down and power off the machine, rescue.targetSet up a rescue shell/mode, multi-user.targetNon-graphical multi-user system., Non-graphical multi-user system., multi-user.targetNon-graphical multi-user system., graphical.targetGraphical multi-user system., reboot.targetReboot the system.
systemctl is used for all the service management like service start, stop, enable, disable tasks.
That’s all for the Linux Boot process, i hoped you have understood all the steps during the Linux boot process. Feel free to comment below your thoughts regarding this post.