You are not logged in.
Pages: 1
Hi,
I'm having trouble using /etc/crypttab.initramfs to boot my system. The reason I'd like to use it is that it allows for LABELS to be used, which is not the case with rd.luks kernel parameters.
I'm also using Unified Kernel Images built with mkinitpcio, and maybe that's why it's not working. Apprently this works with Dracut though.
I've tried many combinations but here are those which I believe should work (but don't) :
# cat /etc/kernel/cmdline
root=/dev/mapper/root rw quiet bgrt_disable# cat /etc/crypttab.initramfs
# <name> <device> <password> <options>
root LABEL=Root keyfile:LABEL=KEYDEV keyfile-timeout=10s,rootflags=subvol=@Any idea what I'm doing wrong ? Maybe it's not possible, as this suggests that "root= or cryptdevice=" flags are still needed in the cmdline, and those can only be specified using UUIDs.
Last edited by Cvlc (2021-12-05 13:43:45)
Offline
What is the outcome on boot? Is a login prompt available for diagnostics?
Offline
Thanks for your answer. It's some kind of emergency but there's no shell, it says "press enter to continue" but pressing enter throws an error. Maybe because I have editor=no in systemd boot config.
It says something about root not being allowed, and waiting for "Real Root"
Also couldn't access the logs from arch-chroot, they stopped at the previous boot.
Should have taken a picture before setting everything else back to normal.
Offline
Does the KEYDEV have a different file system type than root? If so, did you include the kernel module in the initramfs as instructed by https://wiki.archlinux.org/title/dm-cry … d.luks.key ?
E.g. if it's FAT, you need to edit /etc/mkinitcpio.conf and add:
MODULES=(vfat)Edit:
rootflags is not a crypttab option, it should go in /etc/kernel/cmdline.
Last edited by nl6720 (2021-12-05 09:04:53)
Offline
Hi, yes I do have the vfat module (everything works perfectly as long as I don't use crypttab.)
I initially tried with rootflags in the cmdline, but I had a typo in crypttab for a while so maybe I didn't try that config again after correcting it. Let me try and report back.
Offline
works perfectly ! Thanks !
Here's the working config for anyone interested :
# cat /etc/kernel/cmdline
root=/dev/mapper/root rootflags=subvol=@ rw quiet bgrt_disable
# cat /etc/crypttab.initramfs
# <name> <device> <password> <options>
root LABEL=Root keyfile:LABEL=KEYDEV keyfile-timeout=10sThe initial typo was LABEL:Root instead of LABEL=Root
Have a good day !
Offline
Pages: 1