Artix Linux Forum

Init systems => OpenRC => Topic started by: vertbyqb on 26 November 2021, 18:00:51

Title: [SOLVED] Encrypted device in /etc/crypttab is not opened at boot
Post by: vertbyqb on 26 November 2021, 18:00:51
I have an encrypted partition in /etc/crypttab that is not being decrypted upon boot. The device-mapper and dmcrypt services are in the boot runlevel. Here is the line I have in /etc/crypttab:

home-crypt      UUID=cd6d4d5a-980b-4f38-aa7f-a44e925198c7       /etc/cryptsetup-keys.d/home-crypt.key   noauto

I also have the following line in /etc/fstab:

/dev/mapper/home-crypt   /home   ext4   defaults   0 2

/etc/cryptsetup-keys.d/home-crypt.key is a keyfile for the encrypted partition and I can unlock it manually with cryptsetup and that keyfile. Any idea what my issue might be?
Title: Re: Encrypted device in /etc/crypttab is not opened at boot
Post by: mattz7 on 26 November 2021, 18:25:05
Take a look at /etc/conf.d/dmcrypt

As far as I know, /etc/crypttab works under systemd, s66suite and maybe some other init systems. The openRC counterpart is  /etc/conf.d/dmcrypt 

Gentoo wiki (https://wiki.gentoo.org/wiki/Dm-crypt#Configuring_dm-crypt) might be helpful here.
Title: Re: Encrypted device in /etc/crypttab is not opened at boot
Post by: vertbyqb on 26 November 2021, 21:16:06
Thanks, this worked! Oddly enough, /etc/crypttab has comments in it even on my OpenRC system, so I don't know what that's about.