Introduction
Starting a Linux computer follows a chain of stages, each handing control to the next until the system is ready for use.
Understanding this sequence matters because boot problems are really handoff problems. If the machine stops early, you need to know which stage was supposed to take control next.
That handoff idea is the key mental model for this module. The firmware does not do the kernel's job, the kernel does not do the init system's job, and each stage depends on the previous one succeeding first.
The 4 stages are:
- BIOS/UEFI (The Key): The power button is pressed. Hardware wakes up.
- GRUB (The Pilot): The bootloader decides which engine (Kernel) to start.
- Kernel (The Engine): The core of Linux starts, detects hardware, and mounts disks.
- Init (The Crew): System services (like WiFi, Audio) start working.
In this lab, you will act as a Mission Specialist. You will investigate the Flight Recorder data to see exactly what happened during the last launch.
Inspect Kernel Boot Messages
The kernel keeps a detailed Flight Recorder (also called a Ring Buffer) of everything that happens from the millisecond power is applied.
This log contains crucial information: "Did the hard drive respond?", "Did the memory pass the check?", "Is the network card awake?".
To read this flight recorder, we use the command dmesg (Display Messages).
dmesg shows messages from the kernel ring buffer, which is a memory area where the kernel stores diagnostic messages. Many hardware-detection and early-boot clues appear here before higher-level services are fully running.
Run this command to see the very first messages from the launch:
sudo dmesg | head -n 20
Notice the timestamp [ 0.000000]. This is the exact moment time began for the operating system.
These timestamps are relative to boot, not normal wall-clock time. That makes them useful for understanding sequence and delay during startup.
You will see details about your CPU (e.g., "Intel" or "AMD") and the "Command line" arguments that told the kernel how to start.
Let's search the flight recorder for something specific, like Memory:
sudo dmesg | grep -i memory | head -n 5
If your system crashes or a device fails, this is the first place a pro looks.
Identify Boot Partition
Where are the ignition keys stored?
The files needed to start Linux (the Kernel and the Ramdisk) live in the /boot directory.
On some complex systems, /boot is kept in a separate, safe locker (partition) so it doesn't get messed up if the main system fills up. On simpler systems, it's just a folder like any other.
This is why /boot matters operationally: it contains files needed before the full system is up. Kernels, initramfs images, and bootloader-related files live here because they are part of the startup chain.
Let's check the map of our storage using lsblk (List Block Devices):
lsblk
Look for the MOUNTPOINTS column.
- If you see a dedicated line for
/boot(not/boot/efi), it's a separate partition. - Note:
/boot/efiis for UEFI boot systems and is distinct from the main/bootpartition. - If you only see
/(the root), then/bootis just a regular folder inside the root drive.
You can also ask the system specifically about the /boot folder:
df -h /boot
This acts like a mechanic checking which storage tank the ignition keys are in.
Examine GRUB Configuration
The Pilot of our rocket is named GRUB (GRand Unified Bootloader).
GRUB reads a checklist to decide how to fly the rocket. This checklist is stored at /boot/grub/grub.cfg.
GRUB is a bootloader, which means it is the component that knows how to locate a kernel and transfer control to it. It sits between firmware and the Linux kernel in the startup sequence.
Let's peek at the pilot's checklist:
ls -l /boot/grub/grub.cfg
Now, let's read the top of the file:
sudo cat /boot/grub/grub.cfg | head -n 20
You will see a big warning: DO NOT EDIT THIS FILE.
This makes sense. You don't want to scribble on the pilot's checklist right before takeoff. This file is automatically generated by the computer.
That warning matters because grub.cfg is usually generated from other configuration sources. Editing the generated file directly is fragile since later updates may overwrite your manual changes.
To see the actual "Menu" options that GRUB shows you when the computer starts (like "Ubuntu" or "Windows"), search for menuentry:
sudo grep "menuentry " /boot/grub/grub.cfg | head -n 5
Each menuentry is a different way the rocket can be launched.
Summary
You have inspected the launch systems.
In this lab, you learned:
- Flight Recorder (
dmesg): Reading the logs from the very instant of power-on. - Ignition Keys (
/boot): Finding where the critical startup files are stored. - The Pilot's Checklist (
grub.cfg): Reading the automated instructions used by the bootloader.
If a Linux system ever fails to start, these are the three places you will look to figure out why the rocket stayed on the launchpad.



