Note: This article specifically deals with /boot on a physical partition and root on LVM

Rule out usual suspects

1. Grub and grub cmdline options in /etc/default/grub are reflected in /boot/grub2/grub.cfg

GRUB_CMDLINE_LINUX=" net.ifnames=0 console=ttyS0"
grub2-mkconfig -o /boot/grub2/grub.cfg

2. Initramfs and required modules(NVMe and ENA for Nitro)

dracut -f -v /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img 3.10.0-957.21.3.el7.x86_64

Include any other modules in /etc/dracut.conf.d/ as conf files

3. /etc/fstab uses correct UUIDs, Vgs and lvs

Root mounted first, then boot and any other lvs on /var, /var/log etc

4.You have ruled out all the above and other possible issues but are still seeing the following error in console output from dracut,

[  193.845250]  dracut-initqueue[779]: Warning: dracut-initqueue timeout - starting timeout scripts
[  198.557262]  dracut-initqueue[779]: Warning: dracut-initqueue timeout - starting timeout scripts
[  198.557679]  dracut-initqueue[779]: Warning: Could not boot.
[  200.161146]  dracut-initqueue[779]: Warning: /dev/vg_rhel7baseline/lv_root does not exist
[  200.170895]  systemd[1]: Starting Dracut Emergency Shell...

This error means that initramfs is looking for root on lvm /dev/vg_rhel7baseline/lv_root but it is not able to find it. 

When lvm starts, vgscan command is run to scan the block devices on the system looking for LVM labels, to determine which of them are physical volumes and to read the metadata and build up a list of volume groups. The names of the physical volumes are stored in the LVM cache file of each node in the system, /etc/lvm/cache/.cache. Subsequent commands may read that file to avoiding rescanning.

Which devices to scan is defined in /etc/lvm/lvm.conf. The default is to scan all the devices and store in /etc/lvm/cache/.cache. However, at times the scan was not being performed during the initramfs stage and /etc/lvm/cache/.cache was never created, due to which initramfs can’t find root on lvm and resulting in the above error.

Explicitly enabling the following filter in /etc/lvm/lvm.conf was able to force a scan on all devices

 filter = [ "a/.*/" ]

5. Rebuild initramfs and GRUB in a chroot environment

dracut -f -v /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img 3.10.0-957.21.3.el7.x86_64
grub2-mkconfig -o /boot/grub2/grub.cfg

After this, I was able to see that /etc/lvm/cache/.cache was created and initramfs was able to find the root on lvm. 
More info about LVM scan is in the following page


Leave a Reply

Your email address will not be published. Required fields are marked *