الفلاتر
طريقة البحث
  • الكلمات العادية تجد الأسماء والنصوص والأمثلة.
  • "كلمتان" تجد العبارة بالضبط.
  • --name أو -x تجد خيارًا.
  • #كلمة تبحث داخل الأوامر فقط.
  • @grep تجد الدروس والمعامل التي تستخدم grep.
  • الفلاتر: cat:network · in:labs · level:rhcsa · ch:8 · root:yes. ضع ! قبل كلمة لاستبعادها. OR بين الكلمات تعني إحداها.
  • ↑ ↓ للتنقل · Enter للفتح · Esc للإغلاق · / للبحث

lsinitrd

Show the content of an initramfs image: dracut modules, files, kernel modules, and the content of single files.

المستوى
لينكس اليومي
المجموعة
النواة والعتاد
يحتاج root
للتغييرات
الحزمة
dracut

هذا الجزء لم يُترجم بعد. أنت ترى النص الإنجليزي.

ماذا يفعل

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.

طريقة الكتابة

lsinitrd [OPTION]... [IMAGE [FILE]...]
lsinitrd [OPTION]... -k KERNEL-VERSION

الخيارات 8

الأكثر استخدامًا

-k, --kver VERSION
The image of this kernel version.
-f, --file FILE
Print the content of this file from the image.
-m, --mod
List only the dracut modules.
-s, --size
Sort files by size.
--unpack
Unpack the image into the current folder.
--unpackearly
Unpack only the early part (microcode).
-v, --verbose
Verbose (with --unpack).
-h, --help
Show help.

أمثلة 10

$ مستخدم عادي# بصلاحية root (أو مع sudo)

  1. 1Image of the running kernel

    lsinitrd | less

    Header, dracut modules, file list.

  2. 2Only the dracut modules

    lsinitrd -m

    lvm, crypt, systemd …

  3. 3Is a driver inside?

    lsinitrd | grep -E 'virtio_blk|nvme'

    The root disk driver must be there.

  4. 4Show a file from the image

    lsinitrd -f /etc/modprobe.d/loop.conf

    Check that your config is included.

  5. 5Image of another kernel

    lsinitrd -k 6.12.0-55.el10.x86_64 | head

    Before you boot that kernel.

  6. 6Biggest files

    lsinitrd -s | head

    Why is the image so big?

  7. 7Unpack to look around

    mkdir /tmp/ird && cd /tmp/ird && lsinitrd --unpack /boot/initramfs-$(uname -r).img

    Full file tree.

  8. 8Check LVM names inside

    lsinitrd -f /etc/lvm/lvm.conf | grep -v '^\s*#' | grep -v '^\s*$' | head

    After renaming a VG, rebuild with dracut.

  9. 9Kernel arguments in the image

    lsinitrd | grep -A3 'dracut cmdline'

    Built-in arguments.

  10. 10Early microcode

    lsinitrd --unpackearly -v

    CPU microcode updates load from here.

رموز الخروج

0Done.
1Error.

الدليل الكامل

هذه الصفحة تشرح الأمر بكلمات بسيطة. الدليل الأصلي فيه كل التفاصيل.

في الطرفية: man lsinitrd