initramfs-tools
Ben Hutchings
What is the initramfs for?
-
Huge variety of disk drivers, net drivers and filesystems that
may be needed to mount root
-
Generic kernel shouldn't have all these built-in
-
Root might also need RAID, LVM, dm-crypt, which generally need
to be configured by userland
-
Kernel needs a way to load modules and run scripts but
it can't read them from the root filesystem
-
Solution: boot loader provides a bundle of files
(initramfs image) to the kernel
How the kernel uses an initramfs
-
Kernel always mounts an initial root filesystem using
either ramfs or tmpfs
-
If the boot loader provides an initramfs image, kernel
unpacks it into this filesystem, then runs /init
-
The initramfs init system is then responsible for mounting
the real root filesystem and running the real init
-
Although it is not required to hand over at all
- e.g. debian-installer
Questions?
Credits
-
Linux 'Tux' logo © Larry Ewing, Simon Budig.
- Modified by Ben to add Debian open-ND logo
-
Debian open-ND logo © Software in the Public Interest, Inc.
-
Xzibit promotional photo © Retna, used for purpose of parody