2

On the RHEL 9.3 I have renamed the logical volume (LV) /dev/lvm01/root to /dev/lvm01/root.vol. I did everything to make the new name correctly recognized:

  • changed /etc/fstab entry
  • reloaded systemd configuration
  • remounted /

And I also modified the /etc/default/grub entry:

GRUB_CMDLINE_LINUX="root=/dev/mapper/lvm01-root.vol ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/lvm01-swap.vol rd.lvm.lv=lvm01/root.vol rd.lvm.lv=lvm01/swap.vol"

Then I expected the grub2-mkconfig -o /boot/grub2/grub.cfg to do the rest of the job and rebooted. But the system ended up with dracut message that the root partition is not found (or something like that).

After short investigation, I realized the kernel parameters had not been modified as expected. The manual change helped to get the OS booted. Interesting that the /boot/grub2/grub.cfg was updated. But what was not updated was the /boot/loader/entries/* files. And it was the issue.

1
  • See grub2-editenv list. Depending on the history of the system (i.e. if and how grubby has been used in the past), the root= and other the boot options may or may not be stored in /boot/grub2/grubenv.
    – telcoM
    Commented Jun 24 at 23:52

1 Answer 1

4

If you modified any values for GRUB_CMDLINE_LINUX in /etc/default/grub, then you should run the following, as per the RHEL 9 Docs

# grub2-mkconfig --update-bls-cmdline -o /boot/grub2/grub.cfg

For me, it only fixed the actual state. When updating the kernel, it still used the previous LV name.

The only solution which helped also for kernel updates seems to be grubby:

# grubby --update-kernel=ALL --args="root=/dev/mapper/lvm01-root.vol ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=/dev/mapper/lvm01-swap.vol rd.lvm.lv=lvm01/root.vol rd.lvm.lv=lvm01/swap.vol"

Even after the kernel update, the content of new conf file in the /boot/loader/entries/<machine-id>-<kernel version>.conf looks good and the system boots fine.

In fact, the problem may be related to this RH ticket, which is opened for quite a some time (but I'm not sure): https://issues.redhat.com/browse/RHEL-4313

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .