The initrd Interface of systemd

The Linux initrd mechanism (short for “initial RAM disk”, also known as “initramfs”) refers to a small file system archive that is unpacked by the kernel and contains the first userspace code that runs. It typically finds and transitions into the actual root file system to use. systemd supports both initrd and initrd-less boots. If an initrd is used, it is a good idea to pass a few bits of runtime information from the initrd to systemd in order to avoid duplicate work and to provide performance data to the administrator. In this page we attempt to roughly describe the interfaces that exist between the initrd and systemd. These interfaces are currently used by mkosi-generated initrds, dracut and the Arch Linux initrds.

One last clarification: we use the term initrd very generically here describing any kind of early boot file system, regardless whether that might be implemented as an actual ramdisk, ramfs or tmpfs. We recommend using initrd in this sense as a term that is unrelated to the actual backing technologies used.

Using systemd inside an initrd

It is also possible and recommended to implement the initrd itself based on systemd. Here are a few terse notes: