You are not logged in.

#1 2022-03-15 18:26:39

Arch9283
Member
Registered: 2022-03-15
Posts: 2

[Solved] Entering passphrase once opens both luks partitions.

Greetings Everyone big_smile

I am in quite a pickle right now ! Both of my root and home partitions have the same passphrase. I am using luks2 with systemd-boot. On boot time, whenever I enter the passphrase for the root partition, my home partition ALSO gets decrypted without asking for a passphrase, and my system boots normally.
Q: Why does it not ask for the passphrase twice for the two partitions ? Am I doing something wrong ? Should I use different passphrases for my root and home luks partitions ?

> System fully updated on the time of posting.

> crypttab configuration:

luks_home    UUID=xxxxxxxxxxxxxxxxxxxxxxxxx    none    luks,timeout=180,password-echo=no

> fstab configuration :

# /dev/mapper/luks_root LABEL=root
UUID=zzzzzzzzzzzzzzzzzzzzzzzzzzzz      /               ext4            rw,relatime    0 1

# /dev/mapper/luks_home LABEL=home
UUID=cccccccccccccccccccccccccccc       /home           ext4            rw,relatime    0 2

# /dev/sdb1
UUID=aaaaaaaaaaaa         /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro   0 2

> systemd-boot entry

title   Archlinux
linux   /vmlinuz-linux
initrd  /amd-ucode.img
initrd  /initramfs-linux.img
options rd.luks.name=fffffffffffffffffffffffffffffffffffffffffffffffffffff=luks_root root=/dev/mapper/luks_root rw quiet

> mkinitcpio.conf

HOOKS=(base systemd autodetect keyboard modconf block sd-encrypt filesystems fsck)

P.S: I am running vanilla arch for about a month now. I am still pretty new so please correct me if I did something wrong. Also please ask for more information if necessary. Thanks in advance !!

Last edited by Arch9283 (2022-03-16 21:03:19)

Offline

#2 2022-03-16 11:55:54

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: [Solved] Entering passphrase once opens both luks partitions.

It may be due to the way sd-encrypt hook works.

The tips at at https://wiki.archlinux.org/title/Dm-cry … crypt_hook  list 2 possible causes for the behaviour you noticed.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-03-16 20:59:24

Arch9283
Member
Registered: 2022-03-15
Posts: 2

Re: [Solved] Entering passphrase once opens both luks partitions.

Lone_Wolf wrote:

It may be due to the way sd-encrypt hook works.

The tips at at https://wiki.archlinux.org/title/Dm-cry … crypt_hook  list 2 possible causes for the behaviour you noticed.

Thank you for your reply ! Indeed it is due to how the sd-encrypt hook works. Well that is rather convenient for me, gotta only enter the passphrase one time only smile I will now mark this post as solved.

Offline

Board footer

Powered by FluxBB