← 返回命令列表

Linux command

initramfs-tools 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Update initramfs for current kernel

sudo update-initramfs -u

Create new initramfs

sudo update-initramfs -c -k [$(uname -r)]

Update all initramfs images

sudo update-initramfs -u -k all

Delete initramfs for kernel

sudo update-initramfs -d -k [5.10.0-1]

Show verbose output

sudo update-initramfs -u -v

说明

initramfs-tools manages the initial RAM filesystem (initramfs) on Debian-based systems. The initramfs contains the minimal filesystem loaded before the real root filesystem is mounted. It includes drivers, scripts, and tools needed for early boot, such as filesystem drivers, LVM, RAID, or encryption setup.

参数

-c
Create new initramfs.
-u
Update existing initramfs.
-d
Delete initramfs.
-k _version_
Kernel version (or "all").
-v
Verbose output.
-b _directory_
Set boot directory.

FAQ

What is the initramfs-tools command used for?

initramfs-tools manages the initial RAM filesystem (initramfs) on Debian-based systems. The initramfs contains the minimal filesystem loaded before the real root filesystem is mounted. It includes drivers, scripts, and tools needed for early boot, such as filesystem drivers, LVM, RAID, or encryption setup.

How do I run a basic initramfs-tools example?

Run `sudo update-initramfs -u` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c do in initramfs-tools?

Create new initramfs.