I renamed my root LV without updating initrd.
The system now boot into emergency shell because it seems somewhere in initrd the old name of the boot drive still exist.
I did update the new name of the root device in the boot-manager (systemd-boot) and fstab.
I thought initrd only got the information about the root device from the boot-manager, but it seems not to be the case.
In which file(s) in the initrd-image is the root device specified?
I now updated my systemd-boot entry with the same kernel option “rd.lvm.lv”:
title "openSUSE 15.3"
options root=/dev/mapper/VG10-openSUSE_15.3 **rd.lvm.lv=VG10/openSUSE_15.3**
The boot-process now improved, but the boot-log still says:
Using kernel command line parameters:
17.399764] localhost dracut-initqueue: Scanning devices sda2 for LVM logical volumes **VG10/lv_debian** VG10/openSUSE_15.3
The last line result in a scan of VG10/lv_debian which give the error as it doesn’t exist.
But at least I now can succeed a full boot pressing Ctrl+D at the emergency shell.
I expect if I inject (overwrite) “**etc/cmdline.d/90lvm.conf” **in the initrd image with an empty file the problem will be completely solved (or just regenerate the initrd completely of course)
The question is if it’s a bug that the option “rd.lvm.lv” in the initrd image is not completely overwritten by the same option specified in the boot-manager?
I did read it, but I didn’t find any information about if the kernel-options specified in your boot-manager should/or should not overrule any kernel options specified in the initrd. Which one could argue would be preferable.
Does it say anywhere?
Secondly I never asked about the “wrong name for root device” I got that fully under control, that’s not the issue.
root= on kernel command line overrides whatever root= the initrd may contain. However, when the device specified by root= on kernel command line cannot be found, dracut typically/normally?/always? will offer the root= it contains to attempt to proceed with.
But the “root=” option was not the issue, but the kernel option “rd.lvm.lv=” (this option tell the kernel to ONLY initialize that specific LV)
This option was to my surprise specified in the initrd image by dracut will NOT get overridden be the same option you specify on the kernel command
But the damage is limited in the sense that when your system end up in the emergency shell, when you push CTRL+D the kernel seem to load all LV’s afterall and then your boot succeed because it now initialize the device specified in the “root=” option.
I would be nice if it was the case so you can always boot by just setting kernel command options in your boot manager.