void-docs icon indicating copy to clipboard operation
void-docs copied to clipboard

FDE guide: Use UUID instead of `/dev/sda*` in crypttab

Open camoz opened this issue 2 years ago • 0 comments

The FDE guide here currently shows the following example /etc/crypttab:

voidvm   /dev/sda1   /boot/volume.key   luks

This should be changed to using the UUID of the encrypted device/partition, as the device file names dev/sdx are not deterministic.

Some user on #voidlinux just had an issue where the key file in the initramfs would sometimes not be picked up, and they were asked to enter a passphrase instead. I think this might be because they had /dev/sda1 in their /etc/crypttab like the guide suggests. They reported that using /dev/disk/by-uuid/* worked.

I think dracut also understands some other syntax like UUID=... and even luks-..., but I'm not sure which one is best/correct here. I think the relevant dracut module is /usr/lib/dracut/modules.d/90crypt.

camoz avatar Mar 03 '22 16:03 camoz