Glossary

initramfs

initramfs is the modern form of Linux's initial root filesystem. Unlike the older initrd (which used a dedicated ramdisk block device), initramfs is a compressed cpio archive that the kernel unpacks directly into a tmpfs instance, which becomes the initial /. This is simpler, faster, and avoids the need for a ramdisk driver and a real filesystem driver at the earliest stage of boot.

The initramfs contains just enough to reach the real root filesystem: busybox or a small userland, kernel modules for storage and encryption, device-mapper tools, and an init script. On most distributions that script scans for the root device, assembles LVM/RAID if needed, unlocks LUKS volumes (prompting for a passphrase), mounts the real root, and then runs switch_root to pivot into it and exec the real /sbin/init (typically systemd).

Tools for building initramfs images include initramfs-tools (Debian, Ubuntu), dracut (Fedora, Red Hat), and mkinitcpio (Arch). Each takes configuration from files under /etc/ and drops the finished image in /boot/. When you update a kernel, you also rebuild the initramfs to match; this is what update-initramfs -u, dracut -f, and similar commands do.

Related terms: initrd, Kernel, tmpfs

Discussed in:

Also defined in: Textbook of Linux