Fundamentals 7 min read

Understanding Linux Boot Process: From BIOS to Login on CentOS

This article explains the complete Linux operating system boot sequence using CentOS 6 and CentOS 7 as examples, covering BIOS initialization, GRUB, kernel loading, runlevels, systemd, and final login steps in a clear, step‑by‑step manner.

Open Source Linux
Open Source Linux
Open Source Linux
Understanding Linux Boot Process: From BIOS to Login on CentOS

Preface

In the previous chapter we covered several concepts related to operating system startup; now we explore the full Linux OS boot process.

Note: This article is a learning note from studying Linux, with parts referenced from the book "Exposure: Linux Enterprise Operations Practice".

Linux Operating System Boot Process

This article uses the CentOS series as an example to detail the Linux boot sequence.

02 CentOS 6 Boot Process

1. Load BIOS When the computer powers on, BIOS performs a power‑on self‑test and selects the boot device (usually the hard disk).

2. Read MBR After BIOS, the system reads the MBR on the selected disk to locate the bootloader.

3. GRUB Boot Select the kernel to boot or enter single‑user mode for password reset.

4. Load Kernel The kernel is loaded into memory, displaying "OK, booting the kernel"; start_kernel() initializes devices and the core environment.

5. Set System Runlevel The init process reads /etc/inittab to determine the runlevel.

Linux common runlevels:
1: Shutdown mode
1: Single‑user mode
2: Multi‑user mode without network
3: Multi‑user mode with console
4: Reserved (unused)
5: Multi‑user mode with graphical interface
6: Reboot

6. Load rc.sysinit (system initialization) Executes /etc/rc.d/rc.sysinit to set PATH, configure network, start swap, mount /proc, configure SELinux, etc.

7. Load kernel modules Modules are loaded based on /etc/modules.conf and files in /etc/modules.d .

8. Start runlevel programs Scripts in rc0.d to rc6.d are executed according to the determined runlevel.

9. Read rc.local After services start, /etc/rc.d/rc.local is executed to run custom startup commands.

10. Execute /bin/login The login program starts, presenting the login screen for user authentication. The Linux OS boot process is now complete.

03 CentOS 7 Boot Process

CentOS 7 and CentOS 6 have similar boot processes, but the init program is replaced by systemd.

CentOS 7 boot sequence:

UEFI or BIOS initialization and POST self‑test

Select boot device

Load bootloader (GRUB2 for CentOS 7)

Load bootloader configuration files: /etc/grub.d/, /etc/default/grub, /boot/grub2/grub.cfg Load kernel options

Load initramfs (initial RAM filesystem)

Kernel initialization; systemd replaces init

Execute initrd.target units, including mounting /etc/fstab Switch from initramfs root to disk root

systemd reads default target from /etc/systemd/system/default.target systemd runs sysinit.target to initialize the system and basic.target to prepare the OS

systemd starts services under multi‑user.target

systemd executes /etc/rc.d/rc.local under multi‑user.target

systemd starts getty.target and login services

systemd starts services required for graphical.target

Below is a detailed diagram found online, shared for learning purposes only. If there are copyright issues, please contact for removal.
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.

LinuxBoot ProcessCentOSRunlevel
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

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.