← Back to Library
LinuxBeginner9 min readJul 19, 2026By Tech-ikigai Instructors
🐧 A sleepy computer's morning routine

How does Linux wake up?

Think of your computer as a kid waking up for school. Alarm rings, eyes open, gets dressed, brain boots up, does chores, and finally walks out the door ready to go. That's exactly what Linux does every time you press the power button!

πŸ”ŒPower πŸ₯ΎGRUB 🧠Kernel βš™οΈsystemd 🏫Login

πŸ—ΊοΈ The full boot flow

Every stop from before, laid out as one flow β€” including the "uh oh, what if?" branches.

πŸ”Œ Power button pressed POST: hardware self-test Hardware found OK? No πŸ”‡ Beep codes / boot halts Yes ↓ Firmware finds bootloader (GRUB) Secure Boot on & signature valid? No 🚫 Halt: untrusted bootloader Yes / off ↓ GRUB loads kernel + initramfs into RAM Kernel initializes CPU, memory, drivers initramfs finds & mounts real root filesystem switch_root Kernel starts PID 1: systemd systemd starts services/targets in parallel Target reached (multi-user / graphical)? No πŸ› οΈ Drop to rescue shell Yes ↓ Login screen displayed πŸŽ‰ You're logged in!
Hardware Bootloader Kernel initramfs systemd Login Problem path
1
Power on

The alarm clock rings ⏰

πŸ›οΈ It's like an alarm going off β€” your eyes snap open and you quickly wiggle your fingers and toes just to check everything still works before getting up.
  • You press the power button. Electricity reaches the motherboard.
  • A tiny built-in program called firmware (BIOS or the newer UEFI) wakes up first β€” it lives on a small chip, not on your hard disk.
  • It runs a quick hardware check called POST (Power-On Self-Test): "Is the memory here? Is the keyboard here? Is a disk here?"
πŸ”Ž Verify it
Watch the screen: manufacturer logo or "Press F2/DEL for Setup"

Beep codes or a stuck POST screen mean the hardware check found a problem β€” no beeps/logo usually means it passed and moved on.

2
Bootloader β€” GRUB

Finding your shoes and backpack πŸŽ’

πŸ‘Ÿ Before you can leave, you need to find your shoes and grab the right backpack. The firmware doesn't know how to "be Linux" β€” it just knows where to find a small helper program that does.
  • Firmware looks at the disk for a small program called the bootloader β€” on Linux this is usually GRUB.
  • If your PC has more than one OS or kernel, GRUB shows a menu so you can choose.
  • With Secure Boot on, the firmware first checks GRUB's digital signature β€” like checking a wax seal to make sure nobody swapped your backpack for a fake one.
πŸ”Ž Verify it
cat /boot/grub/grub.cfg | headls /sys/firmware/efi/efivars # exists only if UEFI boot

Seeing the GRUB menu on screen at startup is itself proof this stage ran.

3
Kernel loads

The brain boots up 🧠

🧠 Now your actual brain switches on β€” you remember who you are, how to walk, how to talk. This is the biggest, smartest part waking up.
  • GRUB loads the Linux kernel (a file usually called vmlinuz) into memory and hands over control.
  • The kernel is the core of Linux β€” it manages the CPU, memory, and every piece of hardware from here on.
  • It also loads a temporary mini filesystem called initramfs to help it get going before the real disk is ready.
πŸ”Ž Verify it
uname -rdmesg | head -20

uname -r shows exactly which kernel woke up; dmesg shows the kernel's own "good morning" log.

4
initramfs β€” early gear

Socks before shoes 🧦

🧦 You can't put on your real shoes until you've got socks on first. The kernel needs a few basic drivers loaded before it can even reach your real hard disk.
  • initramfs is a tiny, temporary filesystem loaded straight into RAM.
  • It contains just enough drivers (disk controllers, encryption tools) to find and unlock the real root filesystem.
  • Once ready, the kernel does switch_root β€” it swaps the temporary setup for the real one.
πŸ”Ž Verify it
lsinitramfs /boot/initrd.img-$(uname -r) | headdmesg | grep -i "switch_root\|Freeing initrd"

These show the temporary filesystem's contents and confirm the moment it handed off to your real disk.

5
The house manager wakes up

Meet PID 1: systemd

πŸ§‘β€πŸ³ Now that you're really up, you need a "morning manager" β€” the parent who decides what happens next. In Linux, that manager is systemd, always the very first program to run.
  • The kernel starts exactly one program first β€” it always gets the ID number 1, called PID 1.
  • On most modern Linux systems, PID 1 is systemd. Its whole job is to start everything else in the right order.
  • Every other program on your computer is, directly or indirectly, "started by" PID 1.
πŸ”Ž Verify it
ps -p 1 -o comm=systemctl --version

ps -p 1 proves which program truly holds PID 1 on your machine.

6
Morning chores

Starting everything, in the right order

πŸͺ₯ A good morning manager doesn't make you do everything one at a time. systemd starts many services in parallel, while still respecting which chores must finish first.
  • systemd organizes startup jobs into units and groups them into targets (like "multi-user" or "graphical").
  • Independent services (networking, printing, Bluetooth) start at the same time to save time.
  • Dependent services wait their turn β€” the network must be up before apps that need the internet.
πŸ”Ž Verify it
systemctl statussystemd-analyze blamesystemd-analyze plot > boot.svg

systemd-analyze blame ranks which chores took the longest β€” a report card for your boot!

πŸ”— The relay-race check: chain of trust

Every runner in a relay race checks the baton is real before passing it on. Linux's boot does the same thing with Secure Boot: each stage verifies the next one's digital signature before handing over control.

Firmware GRUB βœ”οΈsigned Kernel βœ”οΈsigned systemd

The whole wake-up, at a glance

1Power + POST
2GRUB bootloader
3Kernel loads
4initramfs
5PID 1: systemd
6Start services
7Login screen
Made with 🐧 for curious kids (and grown-ups) learning how Linux really wakes up.
Share

Comments (0)

0/800
  • Be the first to comment.