Rescuing Linux: Difference between revisions
| Line 9: | Line 9: | ||
==initramfs== | ==initramfs== | ||
Almost all distributions ship kernels making use of initramfs these days. An initramfs can be embedded directly into the kernel image (see kernel config entry <tt>CONFIG_INITRAMFS_SOURCE</tt>), but it is usually shipped as its own file instead, and specified by the bootloader. An initramfs is a (possibly compressed) <tt>cpio</tt> archive. On boot, it is unpacked into a tmpfs. The compelling advantage of initramfs is the ability to mount the true root filesystem (which might be on [[NFS]], or encrypted, etc.) from userspace, with a minimal filesystem such as userspace expects. | Almost all distributions ship kernels making use of initramfs these days. An initramfs can be embedded directly into the kernel image (see kernel config entry <tt>CONFIG_INITRAMFS_SOURCE</tt>), but it is usually shipped as its own file instead, and specified by the bootloader. An initramfs is a (possibly compressed) <tt>cpio</tt> archive. On boot, it is unpacked into a tmpfs. The compelling advantage of initramfs is the ability to mount the true root filesystem (which might be on [[NFS]], or encrypted, etc.) from userspace, with a minimal filesystem such as userspace expects. Over time, presence of an initramfs has become more or less assumed, and is is thus now required for all manner of things (i.e. persistent block device names when specifying the root filesystem). | ||
The [https://packages.debian.org/sid/initramfs-tools initramfs-tools-core] package ships <tt>lsinitramfs</tt> and <tt>unmkinitramfs</tt> to easily list or extract the contents of an initramfs file. | The [https://packages.debian.org/sid/initramfs-tools initramfs-tools-core] package ships <tt>lsinitramfs</tt> and <tt>unmkinitramfs</tt> to easily list or extract the contents of an initramfs file. | ||