initramfs-tools
Manage initramfs images
SYNOPSIS
update-initramfs -c|-d|-u [-k version] [-t] [-v] [-b directory] [-m module] ...
mkinitramfs [-c|-g|-k] [-d directory] [-m module] ... [version]
lsinitramfs [initramfs] [files]
PARAMETERS
update-initramfs -c
Create a new initramfs image. Requires the -k option to specify the kernel version.
update-initramfs -d
Delete an existing initramfs image.
update-initramfs -u
Update an existing initramfs image. This is the most common operation.
update-initramfs -k version
Specify the kernel version for the initramfs image.
update-initramfs -t
Take over an existing boot image and update it.
update-initramfs -v
Enable verbose output.
update-initramfs -b directory
Set the boot directory. Defaults to /boot.
update-initramfs -m module
Explicitly include a kernel module in the initramfs image.
mkinitramfs -c
Create an initramfs image. Used primarily for testing and debugging.
mkinitramfs -g
Generate a new initramfs image.
mkinitramfs -k
Create and keep the temporary initramfs directory.
lsinitramfs [initramfs]
List the contents of an initramfs image.
lsinitramfs [initramfs] [files]
List only the specified files in an initramfs image.
DESCRIPTION
The initramfs-tools package provides tools to create and manage initial RAM file systems (initramfs) in Linux.
An initramfs is a small archive containing an initial root filesystem that is loaded into memory during the early stages of the boot process. It contains essential drivers and utilities needed to mount the real root filesystem (e.g., hard drive partitions).
initramfs-tools simplifies the process of generating these images, handling tasks such as dependency resolution, module loading, and kernel configuration.
It relies on scripts located in /etc/initramfs-tools and other system directories to build the initramfs image based on the current kernel and system configuration. These scripts handle everything from device detection and module loading to network configuration, ensuring a smooth transition from the initial boot environment to the full operating system. Updating the kernel and required modules makes using it a simple process.
CAVEATS
Incorrectly configured initramfs images can lead to boot failures. Be cautious when modifying configuration files or adding custom scripts.
CONFIGURATION FILES
Key configuration files include /etc/initramfs-tools/initramfs.conf, which defines global settings, and scripts in /etc/initramfs-tools/modules, which specify kernel modules to include. Modules can also be added from command line.
HOOKS
The /etc/initramfs-tools/hooks directory contains scripts that are executed during the initramfs build process. These hooks allow customization and integration of additional functionalities.
HISTORY
The initramfs-tools package evolved from earlier initrd solutions to address limitations and provide a more flexible and modular approach to early boot environments. It has become a standard component of most Linux distributions.
SEE ALSO
mkinitrd(8), dracut(8)