The AmnesiaOS boot process is designed so that all execution happens in RAM from the moment GRUB hands off to the kernel. GRUB reads the bootloader configuration and copies bothDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/damianiglesias/amnesiaOS/llms.txt
Use this file to discover all available pages before exploring further.
vmlinuz and initramfs.img into physical memory. After that handoff, the boot medium (USB drive or other device) is never touched again — no reads, no writes, no mounts. Every subsequent step — kernel decompression, virtual filesystem setup, network configuration, and the interactive shell — runs entirely in RAM.
Boot sequence
Firmware (BIOS/UEFI)
The system firmware performs its Power-On Self-Test (POST) and scans for bootable devices. When a USB drive containing AmnesiaOS is detected, the firmware reads the boot sector and transfers control to the GRUB 2.12 bootloader stored on the medium.
GRUB 2.12
GRUB reads
grub.cfg from the boot partition and presents a five-second countdown menu with two entries (see GRUB menu entries below). Once an entry is selected — or the default fires after the timeout — GRUB executes two commands:- Loads
vmlinuz(the compressed Linux kernel) into RAM and passes the kernel command line: - Loads
initramfs.img(the gzip’d CPIO archive) into RAM:
Linux Kernel 6.16.1
The kernel decompresses itself in place, then decompresses the gzip’d CPIO initramfs archive into a fresh
tmpfs mounted at /. This tmpfs exists entirely in RAM — there is no block device backing it. With the root filesystem populated, the kernel looks up the path specified by init=/init on the kernel command line and executes it as PID 1./init script
The
/init shell script is the first userspace process. It performs the minimum setup required for a usable environment:- Mounts the virtual filesystems:
procat/proc,sysfsat/sys, anddevtmpfsat/dev. - Brings up the loopback interface (
lo). - Iterates over every network interface found in
/sys/class/net/, brings each one up, and runsudhcpcto request a DHCP lease. - Prints status messages to the console as it works:
/init script, embedded in the initramfs at build time by build-initramfs.sh, is:BusyBox shell
The final line of
/init — exec /bin/sh — replaces the init process with an interactive BusyBox shell. The shell inherits PID 1. The user now has access to a full interactive environment backed by BusyBox 1.35.0’s 300+ utilities: ls, cat, vi, ip, ping, tar, grep, awk, and more — all from the single statically-linked /bin/busybox binary.GRUB menu entries
The two menu entries defined ingrub.cfg correspond to a normal boot and a verbose debug boot. The only difference is the addition of the debug kernel parameter in the second entry, which enables verbose kernel logging to the console.
The last instruction in
/init is exec /bin/sh, which replaces the init process (PID 1) with the BusyBox shell rather than spawning a child. This means the shell is PID 1 — if the user types exit or presses Ctrl-D, the shell process terminates and the kernel has no init to fall back on, resulting in a kernel panic. This behaviour is intentional: there is no background daemon to return to. In v0.1.0 a bug caused the shell to exit unexpectedly under certain terminal conditions, triggering spurious kernel panics; this was fixed in v0.2.0 by ensuring the exec is always reached.