update-initramfs
Manage initial RAM filesystem images
TLDR
Create a new initramfs for a specific kernel version
$ sudo update-initramfs -c -k [kernel_version]
Create initramfs for all installed kernel versions$ sudo update-initramfs -c -k all
Update an existing initramfs$ sudo update-initramfs -u
Remove an existing initramfs$ sudo update-initramfs -d -k [kernel_version]
SYNOPSIS
update-initramfs [options]
DESCRIPTION
update-initramfs manages the initial RAM filesystem (initramfs) images used during Linux boot. The initramfs contains essential drivers and scripts needed to mount the root filesystem.This tool is typically used after installing new kernel modules, changing boot configuration, or when the initramfs becomes corrupted. It uses initramfs-tools on Debian-based systems.
PARAMETERS
-c
Create a new initramfs-u
Update an existing initramfs-d
Delete an existing initramfs-k version
Specify kernel version (default: latest). Use "all" for all versions.-t
Take over a custom initramfs with a newer one.-v
Verbose mode-b directory
Set alternate boot directory-h, --help
Print help and exit.--version
Print version of the underlying initrd generation tool.
CAVEATS
Requires root privileges. Be careful when using "all" with the delete option. A corrupted or missing initramfs may prevent the system from booting. Debian/Ubuntu specific; other distributions use mkinitcpio or dracut.
SEE ALSO
mkinitramfs(8), initramfs-tools(7), dracut(8), mkinitcpio(8)
