Skip to main content

Linux Boot Process

The below image outlines the typical flow of a Linux system boot.

image.png

====================================================================================


BIOS (Basic Input/Output System) &/ UEFI (Unified Extensible Firmware Interface)

BIOS (Basic Input/Output System) and UEFI (Unified Extensible Firmware Interface) are both firmware interfaces that provide a critical layer between your hardware and operating system during the startup process. However, they differ significantly in their functionality and capabilities.

Similarities:

  • Both BIOS and UEFI are pre-installed on your motherboard and activate when you turn on your computer.
  • They perform essential tasks like initializing hardware components, performing power-on self-tests (POST), and loading the operating system from a storage device.

====================================================================================


MBR - masterMaster bootBoot recordRecord  &/ GPT - GUID partitionPartition tableTable

MBR (Master Boot Record) and GPT (GUID Partition Table) are both partition table formats used on hard disk drives (HDDs) and solid-state drives (SSDs) to define how the storage space is organized. However, they have some key differences:

Similarities:

  • Both MBR and GPT are located at the beginning of a storage device and define how the storage space is divided into partitions.
  • They both store information about each partition, such as its size, file system type, and location on the disk.
  • Both allow you to create multiple partitions on a single storage device, enabling you to manage different operating systems or data types more efficiently.
  • Identification of boot loader (typically at beginning of disk) - Once identified, the boot process is handled by the boot loader - most commonly GRUB2.

Note; MBR is an older standard of partitioning, most systems will now use GUID.

====================================================================================


GRUB2 (Grand Unified Boot Loader)

GRUB2 is a software program, specifically a bootloader. Its primary function is to take control during the computer startup process after the firmware (BIOS or UEFI) has initialized the hardware. Here's a breakdown of its role:

  • Loading the Operating System Kernel: GRUB2 locates the kernel (the core program) of your operating system on the storage device. It then loads this kernel into memory.
  • starts kernel and systemd.

====================================================================================


Initrd & Kernel

------------------------------------------------------------------------------------------------------------------------------------------------

What is initrd?

initrd (initialisation RAM disk) is essentially a set of instructions used to load the kernel. initrd is stored temporarily in system memory whilst the kernel is loaded.

------------------------------------------------------------------------------------------------------------------------------------------------

What is a Linux Kernel?

The Linux kernel is the core software that acts as an interface between the hardware and various software applications running on your system.

====================================================================================


Systemd

Systemd is the first process that starts on a booting OS. Systemd is a foundational software suite for Linux operating systems. It acts as a system and service manager, handling tasks like booting up the system and managing services that run in the background.


------------------------------------------------------------------------------------------------------------------------------------------------