Cloned Rocky 9.2 from SSD to M2 NVME- NVME fails to boot- dracut-initqueque error (?)


I cloned a rocky 9.2 install from SSD to M2 NVME (using Sabrent DS-UFNC). I set /etc/lvm/lvm.conf line “use_devicesfile = 0”. Clone from SSD to SSD works fine. The clone from the SSD to the M2 NVME boots to the grub page, but then stalls and reports many dracut-related errors - see:

Here’s a partial log pic where error starts:

Please advise re:how to make M2 NVME clone of the bootable SSD work. IE., do I need to recreate initramfs? Thank you.

I ran:
dracut --regenerate-all --force
(for all installed kernels)
and the nvme now boots! should i run any additional commands?

Also- for Centos 7.9 I need to do this:
echo ‘add_drivers+=" nvme "’ > /etc/dracut.conf.d/nvme.conf

Is this requried for Rocky 9 as well? Just trying for the most complete config. Thank you.

Seems that the command:
dracut --regenerate-all --force
caused the grub boot menu (where one can select a kernel, etc.) to disappear. How would I get the grub menu on boot back again?

EDIT: since i am UEFI- the command:
grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
brought the grub menu back.

Please let me know if this is needed (for any reason; as it was needed with Centos 7.9):
echo ‘add_drivers+=" nvme "’ > /etc/dracut.conf.d/nvme.conf

Thank you.

Sure, you can use dracut add_drivers. Running dracut --regenerate-all --force was not the call, however. You only need to run it for the current running kernel.

% cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).backup.img
% dracut -f -v

After doing this, you can reboot the system to make sure it still comes back up.

This is the wrong path for grub.cfg on Rocky 9.

EDIT: since i am UEFI- the command:
grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
brought the grub menu back.

it should be:

grub2-mkconfig -o /boot/grub2/grub.cfg

When new kernels are installed that is the path that will be used to update the grub menu. The grub.cfg in …/EFI/rocky should be a stub file that points to the /boot partition uuid and should llook like this:

search --no-floppy --fs-uuid --set=dev 7277c17d-6897-497b-9390-1153c9bff018
set prefix=($dev)/boot/grub2
export $prefix
configfile $prefix/grub.cfg

where the characters after --set=dev are the uuid of /boot.

You now have a static menu that will not show new kernels after updates. So I suggest restoring that grub stub file in …/EFI/rocky to its original format and rerunning grub2-mkconfig pointing to the correct path.

Is this required? What does “use dracut add_drivers” accomplish? Thank you.

If you are trying to add the nvme drivers after the fact, yes. add_drivers, just like you talked about doing in CentOS 7, does exactly as it sounds. It adds the drivers to the initramfs.

If you don’t do this, and you attempt to boot the system (as you explained in the original post with your errors), you will fail to boot. To get around this, you would need to boot into a recovery/rescue mode (preferably with the boot image of the exact Rocky Linux version you are using), and regenerate the initramfs.


  • Either go down the add_drivers path as you alluded to earlier and regenerate your initramfs
  • Boot into rescue mode and regenerate your initramfs there

OK makes sense. Thank you for your help!

fyi this does not work:
% cp /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r).backup.img
% dracut -f -v

it only updates for the oldest kernel (loaded in rescue mode)
I had to use:
dracut --regenerate-all --force
or the lastest kernel refuses to boot

The instructions I gave for regenerating the initramfs were specifically for a running system, not the rescue media. The rescue media, as you have discovered, requires different steps.