You are not logged in.
Hi all. I'm trying to migrate to using the systemd mkinitcpio hooks, but I'm currently dropping into an emergency shell instead. My mkinitcpio hooks are set like so -
HOOKS=(base systemd autodetect modconf block sd-vconsole sd-encrypt filesystems keyboard fsck) My /etc/fstab shows this for my root volume which I haven't changed -
# /dev/mapper/luks_root LABEL=root
UUID=b3342490-f2d2-45f8-9994-6c2145c768a0 / ext4 rw,relatime 0 1 The luks partition containing my /root (before decrypting) has a UUID of -
5a86baee-b5cc-474d-bb12-f1600a6d3437 So, I replaced the kernel parameters that I'd used for udev:
root=UUID=b3342490-f2d2-45f8-9994-6c2145c768a0 cryptdevice=/dev/nvme0n1p3:luks_root with:
rd.luks.name=5a86baee-b5cc-474d-bb12-f1600a6d3437=luks_root root=/dev/mapper/luks_root I'd expected that to work given what I've read on the wiki, but it's giving me an error that /dev/mapper/luks_root isn't found, skipping fsck and being dropped into an emergency shell. What have I done wrong? Maybe someone has a similar setup and could share a working config? Also, not sure what it means but despite having changed to the systemd hooks, the system still boots happily if I leave the old cryptdevice and root values there, even though I'd assumed they wouldn't be valid with systemd&sd-encrypt?
Edited to correct an error.
Last edited by drossbox (2019-12-17 09:30:40)
Offline
rd.luks.name=5a86baee-b5cc-474d-bb12-f1600a6d3437 root=/dev/mapper/luks_root
Shouldn't that be rd.luks.uuid instead?
Offline
Apologies, it actually reads
rd.luks.name=5a86baee-b5cc-474d-bb12-f1600a6d3437=luks_root which as I understand can be used in place of rd.luks.uuid.
Offline
in the emergency shell you can try 'ls -l /dev/mapper' or 'cat /proc/partitions' to see what's there
you can also verify kernel parameters are as expected in 'cat /proc/cmdline'
also you can try root=UUID= with the decrypted filesystem uuid, then it would be found regardless of mapping name, as long as it exists at all
Also, not sure what it means but despite having changed to the systemd hooks, the system still boots happily if I leave the old cryptdevice and root values there, even though I'd assumed they wouldn't be valid with systemd&sd-encrypt?
is it possible you didn't generate new initrd with mkinitcpio or booting off an old file?
in the rescue shell you should be able to check out the active initcpio ( cat or less /buildconfig and /config files ) and see if it is as you expect
Offline
Wow, thank you so much. 'cat /buildconfig' listed udev as still being used. I'm using the linux-hardened package but thought I still needed to run mkinitcpio -p linux - was I wrong?? Running mkinitcpio -p linux-hardened has made the changes I needed and it works fine. Thanks so much!
Offline