What actually happens between the power button and the login prompt — an interactive, scrubbable model of the Linux boot process.
Single self-contained HTML file — no build step, no dependencies, no network. Open it in a browser.
open index.html # macOS
xdg-open index.html # Linux
Boot explanations are usually a list: firmware, then GRUB, then the kernel, then systemd. But a real boot is a timeline — things overlap, one subsystem hands off to the next, and almost every interesting bug is about when, not what.
So the spine of this sim is a Gantt chart. Six phases, one swimlane per subsystem, and a playhead you can drag through time:
① Firmware [SEC][ PEI — memory training ][DXE dispatch][BDS]
② Bootloader [GRUB][load][EBS]
③ Kernel [startup_64][decompress][…][rest_init]
④ Initramfs [unpack][udev][mount][switch_root]
⑤ systemd [units — as parallel as the graph allows]
⑥ Userspace [getty → session]
0ms 1s 2s 3s 4s 5s
Everything on screen is derived from one list of timed events. The log
stream, the memory map, the unit graph, the process tree and the numbers
systemd-analyze prints are all recomputed from those {t0, dur} pairs.
Change a duration and every view follows — which is the only reason the tabs
can be trusted to agree with each other.
| Tab | What it shows |
|---|---|
| Timeline | One row per subsystem. A row is a single resource, so two bars on one row never overlap; anything that genuinely runs in parallel got its own row. |
| Load chain | Every artifact this boot read, and where it came from: the flash chip, partition, filesystem or path, its format and size, where it landed, who loaded it, and whether anything checked it. |
| Memory map | Physical memory as a function of time. Regions appear and disappear as firmware, GRUB, the decompressor and switch_root hand memory back and forth. |
| Unit graph | The systemd dependency DAG, layered by longest dependency path, with the critical chain highlighted. |
| Processes | The tree as it grows — kernel threads under PID 2, everything else under PID 1. |
Click any bar, region, unit, process or chain row and the inspector explains what it actually does, which structures are involved, what it looks like on a real machine, and why it matters.
The timeline answers when. The memory map answers where it lands. The load chain answers the one people actually ask: where did it come from?
t COMES FROM ARTIFACT LANDS AT LOADED BY · VERIFIED
0.000 CPU / silicon the first instruction executed in place cpu · nothing — this is the trust root
0.008 SPI flash SEC core + FV directory walk cache-as-RAM fw · measured to TPM PCR[0]
1.520 UEFI NVRAM BootOrder, Boot0001 BDS's decision fw · only if written under PK/KEK
1.740 NVMe p1 — ESP shim LoadImage's choice fw · Authenticode vs db, then dbx
2.195 NVMe p2 — /boot bzImage 0x100000 grub · the PE/COFF signature
2.300 NVMe p2 — /boot a throwaway Linux (initrd) 0x37E00000 grub · nothing — never signed
3.444 initramfs nvme.ko, ext4.ko, usbhid.ko the module area init · only with MODULE_SIG_FORCE
4.094 NVMe p3 — root PID 1 — the init system PID 1 systemd · nothing verifies PID 1
(the Secure Boot profile, where the verdict column has something to say)
Follow the loaded by column from top to bottom and you have the whole
machine: firmware out of a flash chip → shim → GRUB → kernel → /init →
systemd → getty → your compositor. Each row's loader was itself delivered by a
row above it — which is what makes the chain checkable, and what breaks the
moment someone drops a file into /etc/systemd/system.
The media chips along the top are derived from the rows, so a BIOS boot never
offers an ESP to filter by and an encrypted boot always offers the LUKS
container. The verified column is the honest part: most of a Linux boot is
verified by nothing, and the chain says so in as many words.
The terminal on the right reads the model at the current playhead, so the same command genuinely disagrees with itself depending on where you are in the boot:
dmesg # starts at [0.000000] — but the machine has been up 6 s
systemd-analyze time # the four buckets, from three different clocks
systemd-analyze blame # slowest units ← usually the wrong list
systemd-analyze critical-chain # the units that actually gate the target
systemctl list-jobs # what is blocking the boot right now
chain # what is loaded from where, up to the playhead
chain esp # …only the artifacts from one piece of media
efibootmgr -v # NVRAM boot entries (refuses politely on BIOS)
findmnt # the mount table as it exists at the playhead
cat /etc/fstab # the file that becomes .mount units at every boot
file /boot/vmlinuz-… # what format it is — and who loaded it
lsinitrd · cat /proc/iomem · lsblk -f · blkid · cryptsetup status · ps · pstreeRun ps at 4 s and at 6 s and you get a different process list, because there
is a different process list.
Same hardware, eight different stories. The timings are one representative NVMe laptop, and the numbers are computed, not typed in:
| Profile | firmware | loader | kernel | userspace | total |
|---|---|---|---|---|---|
| UEFI + GRUB + ext4 | 1.85 s | 0.57 s | 1.62 s | 1.88 s | 5.91 s |
| UEFI + Secure Boot (shim) | 1.91 s | 0.57 s | 1.62 s | 1.88 s | 5.97 s |
| Legacy BIOS + MBR | 1.85 s | 0.56 s | 1.62 s | 1.88 s | 5.91 s |
| Encrypted root (LUKS2) | 1.91 s | 0.57 s | 3.19 s | 1.88 s | 7.54 s |
| Network root (iSCSI) | 1.85 s | 0.57 s | 2.24 s | 1.88 s | 6.53 s |
| Pathologically slow boot | 1.85 s | 2.57 s | 1.62 s | 3.49 s | 9.53 s |
| Kernel panic — no init | 1.85 s | 0.57 s | 0.89 s | — | 3.31 s |
| Failed unit → emergency mode | 1.85 s | 0.57 s | 1.62 s | 90.37 s | 94.41 s |
Each one is a lesson on its own:
- Encrypted root spends its extra 1.6 s in the kernel bucket, because the LUKS passphrase prompt and the Argon2id KDF run in the initramfs. No amount of userspace tuning touches it.
- Pathologically slow is mostly
GRUB_TIMEOUT— a config line, not a bug. - Kernel panic has
userspace = 0, andsystemd-analyzerefuses to run. - Emergency mode is a missing USB disk in
/etc/fstab: a.deviceunit waits 90 s for something that will never appear, and everything behindlocal-fs.targetstalls with it.
The buttons along the bottom each take one idea properly:
The whole boot · Why dmesg lies · What is loaded from where · UEFI vs legacy BIOS · Secure Boot chain · Why the initramfs exists · Encrypted root · blame vs critical-chain · The 90-second hang · The first megabyte
# The kernel clock restarts at zero, so dmesg understates your boot
scrub to the end → dmesg # first line is [0.000000]
→ systemd-analyze time # …but the machine has been up 5.9 s
→ uptime # also lies, for the same reason
# Duration is not importance
profile: Pathologically slow boot
systemd-analyze blame # a long unit that is NOT on the chain
systemd-analyze critical-chain # …costs you exactly nothing
# The 1 MiB hole
tab: Memory map, scrub to 0 # IVT, EBDA, VGA window, BIOS ROM — frozen since 1981
scrub to 2.3 s # zero page at 0x10000, setup at 0x90000, bzImage at 0x100000
# A boot that never happens
profile: Kernel panic — no init
# everything looks healthy until 3.3 s: the disk is visible, the drivers probed.
# The drivers needed to MOUNT it were in an initramfs that was never loaded.
# Who actually reads what
tab: Load chain, click the SPI flash chip # nothing after PEI reads the flash again
click NVMe p2 — /boot # GRUB reads the kernel with its OWN ext4 driver
click initramfs # the drivers that make the disk readable come from RAM
# and read the verified column: the kernel is signed, the initramfs beside it is not
- Lane exclusivity is an invariant. A lane is an actor or a resource, so no two events on one lane may overlap — a test enforces it across all eight profiles. Where two things really do run at once, the lane was split.
- Stages are threaded by a cursor, not by absolute constants. Each stage returns the time it finished, so a longer GRUB menu timeout pushes the kernel and everything after it. Delays propagate instead of drifting.
- The
systemd-analyzenumbers are computed from the event list, and the four buckets are checked to sum to the total. see:cross-links are pruned per profile, so the UI never offers a link to something that machine never runs.- Addresses are the real x86 boot protocol ABI — zero page at
0x10000, real-mode setup at0x90000,bzImageat0x100000, e820 table at offset0x2d0,acpi_rsdp_addrat0x70,secure_bootat0x1ec— perDocumentation/arch/x86/boot.rst. - The load chain is a projection of the timeline, not a second story. Each row is attached to an event by name and inherits its timing, so a row can never claim something loaded itself. Rows whose event does not exist in the current profile are dropped — a BIOS boot shows no ESP row, an unencrypted disk no LUKS header.
- The chain is checkable in the strong sense. An actor may only perform a load if an earlier row delivered it, so "GRUB loads vmlinuz" is legal only because something above it loaded GRUB. Tests enforce that ordering, that no phase the boot reaches is missing from the chain, and that every named memory region actually exists in that profile's map.
- Timings are one machine. Real boots vary by an order of magnitude, and a server with memory training uncached can spend 40 s in SEC+PEI alone.
- Event granularity is chosen for teaching. A real
do_initcalls()is thousands of probes, not six bars. - One distro, systemd only. No Upstart/SysVinit, no kexec, no early microcode load, no hibernation resume.
- Region sizes are rounded; the memory map is ordered by address but not to scale — a linear 4 GiB axis would make the first megabyte two pixels tall.
- The load chain names one plausible source per artifact. Real machines vary:
core.imgmay live in a BIOS boot partition rather than the post-MBR gap, microcode may arrive from the initramfs rather than the flash, and a GPT disk has no MBR bootstrap at all.
index.html the deliverable — generated, never hand-edited
build.sh concatenates src/ into index.html
src/
b1_head.html CSS
b2_body.html markup
b3_data_fw.js PHASES, LANES, the firmware stage (UEFI PI + legacy POST)
b4_data_kernel.js the bootloader and kernel stages
b5_data_user.js initramfs, systemd and userspace stages
b6_data_profiles.js PROFILES, memory map, unit graph, process tree, buildBoot
b6b_data_chain.js the load chain: media, artifacts, loaders, verdicts
b7_render.js timeline, memory map, DAG, process tree, log stream
b8_ui.js inspector, transport, keyboard
b9_term.js the diagnostic shell
b10_scen.js guided tours, help
tests/ model, DOM and browser suites
Edit src/, then rebuild:
./build.sh
./tests/run-all.sh # 1801 assertions: model invariants, jsdom, headless ChromiumThe model suite is the interesting one: it checks lane exclusivity, phase
ordering, bucket arithmetic, unit-graph dangling dependencies, process-tree
parentage, log-stream monotonicity, that every load-chain row is anchored to a
real event and every loader was itself loaded first, and that buildBoot is
deterministic — for every profile.