built-in configuration file prevents booting with command line options

Olaf Hering <[email protected]> Mon, 8 Jul 2024 13:40:06 +0200
Newsgroups org.kernel.vger.initramfs
Message-ID <[email protected]>
dracut in Leap 15.5 puts /etc/cmdline.d/90crypt.conf into initrd.
This file contains "rd.luks.uuid=luks-${old_uuid}".

If the disk dies, and the backup is populated on the replacement disk,
the UUID of the LUKS container does obviously change.

I was able to boot the existing old initrd with "rd.luks.crypttab=0
rd.luks.key=/some_path rd.luks.uuid=${new_uuid}", but this was not enough.

Booting with "rd.debug" revealed that "${old_uuid}" was still expected
to be present. A search in the extracted initrd revealed that
"rd.hostonly=0" removes "/etc/cmdline.d/*.conf". But using that option
disables also all knobs specified on the kernel command line.

Is booting an "arbitrary" existing initrd with "rd.hostonly=0",
and specifying every required detail of the root filesystem on
the kernel command line, supposed to work?
Did I maybe miss yet another required knob?

This is the full list of used kernel cmdline options:

log_buf_len=16M
mitigations=off
net.ifnames=0
nosgx
panic=9
plymouth.enable=0
rd.fstab=0
rd.luks.allow-discards
rd.luks.crypttab=0
rd.luks.key=/.root.key
rd.luks.uuid=${new_uuid}
rd.lvm.conf=0
rd.lvm.lv=${vg}/${lv}
rd.lvm.vg=${vg}
rd.timeout=11
resume=/dev/disk/by-label/${label_swap}
root=/dev/disk/by-label/${label_btrfs}
rootflags=subvol=/${subvolume},noatime


Thanks,
Olaf
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE97o7Um30LT3B+5b/86SN7mm1DoAFAmaL0BYACgkQ86SN7mm1
DoDdwg//VVbru9F8a0qqBtlaS6xLzf4nOZPPBElj2j8Srg9OqGlOkdmXFNsfu8Qp
iy4J4I6c/oqXn8GIGVqn+nRSW/P9M6NLEiDzUrHvznfb0chcKdGwR1jIlbBjMkjA
2OapzKTZuPm6PBBwKofSTLQrw0OGodpaqmRjpORpkMoFQ0nUruV0ZAfIbeep/WWd
NapCS03wQ3DYLdmoIi7azBdgSKT931WUdgm2Ihd4Gr2EE5SE9KK22out2st4h3xt
uM17kJ0rfNGknP4dNzHCC/oFE+O+oOrIkgWBPtTC7PYAQR0910d4U3E8fzSbBGX7
iJLKwxw237LkfGVH9zQGA381iQUduai2gRalWZtn3yaMM1zkU5nNe7UfzjSuqeUr
z/ixfYFvY3ysIaCGM6Il1qM8E/jiK/mP4Mpu81kuMHPcqGp768T1C1w3oAd6Y6hO
kKXXVtyKnapdCoaq6+ZdxHgiUvIoY1mk/bFuLFkJQgz3z1x+bNRaP+GL7rbIwBCZ
bTgYzMCKlDbD71dLdJ9+Ufaebi9+uOmIRH5yY3GIKTOPg4MpWs/pOEoAKhlLD3t1
2p+mxK9gu/0R9OSbxjwo6B5osQZJgThn0HdCprb8OAMIH237SMH/I5M5qvrD7vEn
QeKJ22B1gOysZsb2ycyKOggpsSYBPWJElnqCNudN5/Be+Drjsx4=
=ccLJ
-----END PGP SIGNATURE-----