1. Overview A boot ramdisk (initial RAM disk, initrd or initramfs ) is a temporary root file system loaded into memory by the bootloader during the Linux (or other Unix-like OS) startup process. Its primary role is to bridge the gap between the minimal boot environment and the final, full root file system.
The boot ramdisk is a small but critical component that enables Linux to boot from nearly any storage configuration while keeping the kernel lean. Understanding its structure and operation is essential for system builders, embedded developers, and anyone troubleshooting early boot failures.
The boot ramdisk contains essential kernel modules, scripts, and tools needed before the real root partition can be mounted—particularly when the root file system resides on a complex or non-standard storage device (e.g., RAID, LVM, encrypted disk, network block device, or exotic file system). The kernel itself can only directly mount a root file system if it has built-in drivers for the underlying storage hardware and file system. However, monolithic kernels with every possible driver are bloated and inflexible. Instead, modern kernels use loadable kernel modules .
But to load the modules required to access the real root device, the kernel must first read a file system—creating a chicken-and-egg problem. The boot ramdisk solves this by providing a minimal, self-contained root file system entirely in RAM. | Type | Format | Mounting | Common Use | |------|--------|----------|-------------| | initrd (initial RAM disk) | Block device image (e.g., ext2) | Mounted as a loop device | Older Linux systems | | initramfs (initial RAM file system) | cpio archive | Unpacked directly into a tmpfs | Modern Linux distributions |
is now the standard (since Linux 2.6). It is lighter, more flexible, and simpler to manage than the older initrd. 4. Typical Contents of a Boot Ramdisk A standard initramfs contains: