Fundamentals 8 min read

Master Linux Boot Process: 10 Essential Steps Explained

This article breaks down the Linux boot sequence into ten clear stages—from power‑on self‑test and BIOS initialization to loading the kernel, executing init scripts, and finally presenting the login prompt—providing interview‑ready knowledge and detailed explanations for each step.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Master Linux Boot Process: 10 Essential Steps Explained

Linux boot process is a common interview topic; this article offers an overview and a detailed walkthrough of the ten stages, helping readers understand and recount the sequence.

Linux System Boot Process Overview

Linux system boot proceeds through ten steps:

Power‑on self‑test (POST) and BIOS/UEFI initialization.

Read the Master Boot Record (MBR).

Boot loader (e.g., GRUB) presents the boot menu.

Load the kernel image.

Init process reads inittab and sets the runlevel.

Init runs rc.sysinit.

Load kernel modules.

Execute scripts for the selected runlevel.

Run /etc/rc.d/rc.local.

Start /bin/login (or a graphical login manager) to present the login prompt.

Linux System Boot Process Details

1. Power‑on Self‑Test and BIOS/UEFI

After power is applied, the motherboard firmware performs POST, checks CPU, memory, disks, and determines the boot order, preparing hardware for the next stage.

2. Reading the MBR

The first 512 bytes of the disk contain the Master Boot Record, which holds boot code and the partition table. The BIOS loads this sector into memory address 0x7C00 and executes it, starting the first phase of the boot loader.

3. Boot Loader

The boot loader runs before the kernel, initializing hardware and setting up memory mappings. Common loaders include GRUB, LILO, and Syslinux. This article uses GRUB as an example; GRUB reads its configuration file ( menu.lst or grub.lst) to decide which OS to start.

4. Loading the Kernel

GRUB loads the kernel image specified in its configuration, decompresses it (displaying “Uncompressing Linux”), and then calls start_kernel(). The kernel initializes devices and core subsystems, after which a functional Linux environment is ready.

5. Init Reads inittab and Sets Runlevel

The first user‑space program is /sbin/init (or systemd). It reads /etc/inittab to determine the default runlevel, e.g., “:id:5:initdefault:” means runlevel 5 (multi‑user with X‑Window).

0 – Halt

1 – Single‑user mode

2 – Multi‑user without network

3 – Multi‑user with network

4 – Reserved

5 – Multi‑user with network and X‑Window

6 – Reboot

6. Init Executes rc.sysinit

After the runlevel is set, init runs the script /etc/rc.d/rc.sysinit, which configures PATH, network settings ( /etc/sysconfig/network), activates swap, mounts /proc, and performs other essential initialization.

7. Loading Kernel Modules

Init consults /etc/modules.conf or files under /etc/modules.d and uses modprobe to load required kernel modules automatically.

8. Executing Runlevel Scripts

Depending on the chosen runlevel, the system runs the scripts in rc0.d through rc6.d to start services and complete initialization for that level.

9. Running /etc/rc.d/rc.local

This script is executed after all other init scripts, providing a place for user‑defined commands. Example content:

# This script will be executed after all the other init scripts.
# You can put your own initialization stuff in here
if you don’t
# want to do the full Sys V style init stuff.

10. Starting the Login Prompt

The final step launches /sbin/agetty together with /bin/login (or a graphical display manager). After successful authentication, the user receives a shell or desktop session, marking the end of the boot sequence.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxOperating SystemBoot ProcessinitGRUB
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.