Demystifying initramfs and ELF*
We take an in-depth look at two kinds of startup procedures: the initramfs system, and the process of loading and executing ELF binaries.
While the boot process of a Linux system has received a lot of attention recently, certain aspects are still poorly understood. We aim to demystify two of these.
initramfs is usually ignored unless it’s broken. We illuminate this often-misunderstood system, including its history, rationale, capabilities, loading process, and the kernel’s built-in userspace.
ELF has many capabilities, of which Linux binaries use only a subset. We explore the format in detail, including the loading process, ld.so and interpreters, and rpath and its implications for Linux distributions.
initramfs, ELF, boot, load, file formats, linker
Josh Triplett is a PhD student at Portland State University and a Free and Open Source Software hacker. Josh is involved in research on relativistic programming and advanced synchronization techniques for highly parallel systems. Josh builds and launches Linux-powered rockets with the Portland State Aerospace Society, and hacks on numerous other projects . Lately, Josh does a lot of his hacking in Haskell.