The Uptime Engineer
👋 Hi, I am Yoshik Karnawat
You’ll see how each boot stage (firmware, GRUB, kernel, systemd) fails in its own recognizable way, and how to map what you see on screen to the exact layer that’s broken. By the end, you’ll be able to point to where a machine is stuck, use the right commands for that layer, and debug boot issues like a system.
Ever watched a Linux box freeze on boot and thought:
“Okay… but what exactly is stuck?”
That feeling goes away once you can point to the stage:
firmware, bootloader, kernel, init, or user space.
Here’s the boot process the way your brain actually debugs it.
When you hit the power button, the CPU knows nothing about Linux.
First, the firmware wakes up: either BIOS (old) or UEFI (new).
It runs POST: quick checks on RAM, CPU, and attached devices.
Then it scans for disks, NVMe, USB, maybe even network boot.
From there it picks a boot device based on the configured boot order.
With BIOS, it reads the MBR from the first 512 bytes of the disk.
With UEFI, it looks for an EFI System Partition (ESP) and .efi files.
If that fails, you get the classic:
No bootable device foundNotice: Linux isn’t running yet.
You’re still in firmware + disk layout territory.
To see where GRUB lives, you have to understand the disk layout.
On MBR systems:
The first 512 bytes hold:
Tiny boot code.
The partition table.
Space is tiny, so the bootloader is split into stages.
On GPT + UEFI systems:
There’s a dedicated EFI System Partition (FAT32).
Bootloaders live as files, like:
\EFI\ubuntu\grubx64.efi
Firmware either jumps into MBR boot code (legacy)
or loads an .efi binary from the ESP (UEFI).
That small piece then hands off to GRUB.
GRUB is the bridge between firmware and the Linux kernel.
It’s usually the menu you see with:
“Ubuntu”
“Advanced options”
“Recovery mode”
What GRUB actually does:
Reads its config, usually
/boot/grub/grub.cfg.Shows the menu (or hides it with a timeout).
Loads:
The kernel image (e.g.
/boot/vmlinuz-6.8.0-xyz).The initrd/initramfs (e.g.
/boot/initrd.img-6.8.0-xyz).
Passes the kernel command line, e.g.:
root=/dev/nvme0n1p2 ro quiet splash Then jumps to the kernel entry point.
If GRUB is broken, you’ll see things like:
grub rescue>grub error: unknown filesystem
At this point, the kernel is still just a file on disk.
GRUB’s only job is to get it into memory and hand over control.
Once GRUB jumps, the Linux kernel takes over.
The kernel starts as a compressed binary (vmlinuz) in memory.
It decompresses itself, sets up low-level CPU and memory state,
initializes page tables, and wires up built‑in device drivers.
Then it mounts a temporary root filesystem from initrd/initramfs.
What is that?
Think of initrd/initramfs as a tiny Linux environment packed into a file.
Its job is to:
Bring up just enough user space and drivers to find the real root FS.
Handle disk decryption (LUKS).
Assemble RAID or LVM.
Mount the actual
/.
Once it finds and mounts the real root, it does a switch_root
and your “real” system becomes visible.
When this part fails, you’ll see:
Dropped into an initramfs busybox shell.
Messages like:
Unable to find root filesystemALERT! /dev/sda2 does not exist
That’s your signal: kernel is running, but it can’t reach your real /.
After switching to the real root filesystem, the kernel needs one thing:
a first user‑space process - PID 1.
Historically that was /sbin/init.
On most modern distros, it’s /lib/systemd/systemd
(often symlinked from /sbin/init).
The kernel looks for init roughly in this order:
init=/...if you passed it on the kernel command line./sbin/init/bin/init/lib/systemd/systemd
If none of these can be started, you’ll hit:
Kernel panic - not syncing: No working init foundWhen systemd does start as PID 1, it becomes the conductor:
Mounts remaining filesystems.
Starts
udevfor dynamic device management.Brings up networking (or launches services that do).
Loads units:
*.service,*.target,*.socket, etc.
Sets the default target:
multi-user.target(roughly “server mode”).graphical.target(roughly “desktop mode”).
This is where you see lines like:
systemd[1]: Starting ... systemd[1]: Reached target ... Once that scroll settles, you’re in “normal” Linux user space.
From there, it’s the usual story.
systemd starts getty on tty1, tty2, and friends for console logins.
Or it launches a display manager like GDM, SDDM, or LightDM for GUI logins.
On a pure console system, you’ll see:
login: On a desktop, you get a graphical login prompt.
You authenticate, a shell or desktop session starts,
and now you’re in the world we spend most of our time in - processes, services, and userland tooling.
Here’s the mental model that makes this stick.
Treat the Linux boot process as a pipeline:
Firmware
Knows hardware, not the OS.
Its job: find and start a bootloader.Bootloader (GRUB)
Knows filesystems and kernels.
Its job: load kernel + initrd + cmdline, then jump.Kernel + initramfs
Knows hardware, drivers, memory.
Its job: find and mount the real root filesystem.Init / systemd (PID 1)
Knows services, targets, units.
Its job: bring the system to a usable state.Login + User Space
Shell, GUI, containers, services.
Your job: everything after that.
Each stage failing gives a different symptom.
Once you can name the stage, you stop guessing and start inspecting the right layer.
In practice, that looks like this:
Stuck before GRUB?
Likely firmware ↔ disk issue. Check boot order, MBR/ESP, disk health.GRUB errors or missing menu?
Bootloader layer. Check GRUB config, filesystem, ESP mount.Dropped into initramfs shell?
Kernel found initramfs but not your real root FS.
Check device names, UUIDs, LVM, encryption, andfstab.Kernel panic about PID 1?
Kernel can’t start init.
Check theinit=parameter and thatsystemd/initbinaries exist.System boots but services are flaky?
That’s thesystemdlayer.
Use:
journalctl -b systemctl status <service> Once you see boot as a pipeline instead of a black box,
“Linux just hangs” turns into “it’s failing right here, let’s fix this stage.”
Helpful Resources
The GRUB2 Bootloader
https://docs.fedoraproject.org/en-US/quick-docs/grub2-bootloader/How to Configure and Troubleshoot Grand Unified Bootloader
https://www.tecmint.com/configure-and-troubleshoot-grub-boot-loader-linux/initramfs: The Initial RAM Filesystem Explained
https://www.abhik.xyz/concepts/linux/initramfs-boot-process
