Artix Linux Forum

Artix Linux => Installation / Migration / Configuration => Topic started by: wjatscheslaw on 05 September 2021, 15:47:45

Title: Crypttab does not mount luks encrypted partition
Post by: wjatscheslaw on 05 September 2021, 15:47:45
Crypttab does not work out of the box with Artix OpenRC.
I have my root and home partitions encrypted with luks. The root partition gets mounted by grub as luks_root with no problem, but my home partition does not get mounted with crypttab and I don't know why.

Does somebody know how to enable crypttab on Artix? On Arch I have to do nothing but maybe it is because of systemd? Or can I mount both root and home partition with the grubs grub_cmdline_linux?

On booting I get this error:
Code: [Select]
fsck.ext4: Unable to resolve 'UUID=dc357b1d-............'
* Operational error
* Mounting local filesystems ...
mount: /home: can't find UUID=dc357b1d-............
* Some local filesystem failed to mount

/etc/default/grub
Code: [Select]
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda3:luks_root"

/etc/mkinitcpio.conf
Code: [Select]
HOOKS=(base udev autodetect modconf block encrypt filesystems keyboard fsck)

/etc/crypttab
Code: [Select]
# <name> <device> <password> <options>
#home
luks_home       /dev/disk-by-uuid/cc42efc4-..............      none       luks

/etc/fstab
Code: [Select]
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/mapper/luks_home
UUID=dc3571b1d-.........         /home          ext4              rw,relatime     0 2

rc-upate -v show
Code: [Select]
dmcrypt | boot default     sysinit

If you need more information, please feel free to ask! Thanks in advance!
Title: Re: Crypttab does not mount luks encrypted partition
Post by: VictorBrand on 05 September 2021, 17:11:41
/etc/crypttab has no effect in OpenRC (surprise, surprise). You should edit /etc/conf.d/dmcrypt instead, read the comments inside on how to configure your home partition for automatic mounting.

EDIT: It's better to specify not the device name, but UUID of root partition in your kernel command line, like that:
Code: [Select]
cryptdevice=UUID=<UUID of your root partition>:luks_root
It's more consistent.
Title: Re: Crypttab does not mount luks encrypted partition
Post by: wjatscheslaw on 05 September 2021, 18:39:59
Thank you! I knew It would be something trivial. It's my first time using artix or openrc. I should have read the wiki more but I didn't know where to look to be honest.

Now its time to install artix on my main computer and say goodbye to my long-time friend systemd!   ;)