I - Intro

The first time I successfully installed Linux, I remember thinking “What’s that GRUB thing that always shows up?” Though… the most common thing was reading error messages because I kept breaking system stuff =)

I learned a lot trying the famous “dual boot.” Of course, my first attempt failed because… yes, you guessed it: I installed Linux first, then Windows. It’s technically possible to configure Windows bootloader to read Linux partitions, though it’s extremely complex and error-prone. That’s why it’s always recommended to install Windows first, then Linux. GRUB is more flexible in this regard and requires no additional configuration. Lesson learned.

If you want to know more about what processes are involved and what role they play when starting an operating system, keep reading.

II - Bootloader

What is it? It’s the first program that runs after POST and firmware, and its responsibility is to start the operating system’s boot process.

It does this by loading the Kernel image and the initial RAM disk image of the chosen system (initramfs or initrd) into RAM memory.

A bootloader may also contain an initial menu with system startup alternatives (options and other “boot modes”), as well as other OSes that might be installed. This menu is usually called a Boot Manager.

It’s important to differentiate between bootloader and bootmanager since not all bootloaders are bootmanagers, nor are all bootmanagers bootloaders. In such cases, it’s viable to use a specific bootloader with a different bootmanager.

The bootloader is usually located on one of the disks and, while there are different types, they’re commonly stored in:

  • MBR Master Boot Record: housed in the first sector, sector 0 of the disk. Used in traditional systems with BIOS | Basic Input Output System firmware.

  • EFI Extensible Firmware Interface: housed in a dedicated EFI partition with FAT32 format. Used in modern systems for years with UEFI | Unified Extensible Firmware Interface firmware and GPT partitioning scheme.

Example from a Fedora 42 environment showing the EFI partition with FAT32 format:

sudo lsblk -f
proyectoleeti@fedora42:~$ sudo lsblk -f
NAME      FSTYPE FSVER LABEL    UUID      FSAVAIL FSUSE% MOUNTPOINTS
nvme0n1                                                   
├─nvme0n1p1 vfat   FAT32          A1B2-C3D4   580M     3% /boot/efi
├─nvme0n1p2 ext4   1.0            2f8a9b1c-...  890M    12% /boot
└─nvme0n1p3 btrfs        fedora42 8c4d2a5f-... 420G    65% /    

There are many different types of bootloaders, depending on hardware architecture. Here are just a few:

  • GRUB GRand Unified Bootloader - the most common on Linux systems.

  • Das U-Boot - used in embedded systems like routers, e-books.

  • ISOLINUX - primarily used on removable media.

In the following image gallery, GRUB shows multiple options:

  • Ubuntu Load Ubuntu OS, the installed version is 25.04.

  • Advanced options for Ubuntu Advanced startup options for Ubuntu, for example if there’s more than one installed Kernel version or recovery mode useful during maintenance or failures.

  • Memory test (memtest86+64.efi) Tool for diagnosing RAM.

  • Memory test (memtest86+64.efi, serial console) Same option as above, but with output to console port (mostly used on servers).

  • Windows Boot Manager (on /dev/sda1) Loads Windows boot manager. If this option appears, there’s at least one Windows installation available. In this case it’s Windows 11.

  • UEFI Firmware Settings Enter additional UEFI firmware configuration.

    GRUB: initial menu GRUB: OS options

Visual step-by-step summary:

Visual step-by-step summary.

III - Linux Kernel and initramfs

The bootloader handles loading the chosen kernel image and the initramfs/initrd into RAM memory. Then it hands control over to the Kernel.

The kernel is usually compressed and the first step is to decompress itself, then perform a basic hardware check.

After the check, it executes the initial RAM disk which can be initramfs or initrd. During this step, a minimal and temporary filesystem is mounted with hardware drivers, devices, and network components necessary to start the system.

Once these drivers are loaded, the initial RAM disk is unmounted and discarded, and the Kernel mounts the real filesystem.

A kernel can be developed and used across different Linux systems, while the initramfs is rebuilt and configured every time a system is installed or has a Kernel update or reconfiguration, since it contains hardware-specific drivers and configurations.

Visual step-by-step summary:

Visual step-by-step summary.

Is that all?

Of course not ;) this is the first post in a three-part series. In the next one I’ll tell you about Init, Services, Systemd, Systemctl… and then we’ll wrap up the series with a lab that will cover these three posts and more.

Until the next post!