What it does
lsinitrd without arguments shows the initramfs of the running kernel: the dracut version and arguments, the dracut modules used, and a file list. With -f FILE it prints one file from the image — useful to check if a config (like /etc/fstab or a modprobe file) is inside.
How to write it
lsinitrd [OPTION]... [IMAGE [FILE]...]
lsinitrd [OPTION]... -k KERNEL-VERSIONOptions 8
Most used
Nothing matches this filter.
Examples 10
$ run as a normal user# run as root (or with sudo)
1Image of the running kernel
lsinitrd | lessHeader, dracut modules, file list.
2Only the dracut modules
lsinitrd -mlvm, crypt, systemd …
3Is a driver inside?
lsinitrd | grep -E 'virtio_blk|nvme'The root disk driver must be there.
4Show a file from the image
lsinitrd -f /etc/modprobe.d/loop.confCheck that your config is included.
5Image of another kernel
lsinitrd -k 6.12.0-55.el10.x86_64 | headBefore you boot that kernel.
6Biggest files
lsinitrd -s | headWhy is the image so big?
7Unpack to look around
Full file tree.
8Check LVM names inside
After renaming a VG, rebuild with dracut.
9Kernel arguments in the image
lsinitrd | grep -A3 'dracut cmdline'Built-in arguments.
10Early microcode
lsinitrd --unpackearly -vCPU microcode updates load from here.
Nothing matches this filter.
Exit codes
0 :: Done. 1 :: Error.