LinuxCommandLibrary

update-initramfs

Manage initial RAM filesystem images

TLDR

Create a new initramfs for a specific kernel version

$ sudo update-initramfs -c -k [kernel_version]
copy
Create initramfs for all installed kernel versions
$ sudo update-initramfs -c -k all
copy
Update an existing initramfs
$ sudo update-initramfs -u
copy
Remove an existing initramfs
$ sudo update-initramfs -d -k [kernel_version]
copy

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 (or "all" for all versions)
-v
Verbose mode
-b _directory_
Set alternate boot directory

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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community