FS#76792 - [systemd] can't mount encrypted home at boot

Attached to Project: Arch Linux
Opened by Kevin Sopp (baraclese) - Saturday, 10 December 2022, 10:56 GMT
Last edited by Toolybird (Toolybird) - Thursday, 12 January 2023, 04:42 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
I have a encrypted root and home partition, the root partition unlocks and gets mounted correctly. The home partition does not however and I enter emergency mode on boot.

journalctl says:
Failed to mount Home Partition.
Dependency failed for Local File Systems.
local-fs.target: Job local-fs.target/start failed with result 'dependency'.
local-fs.target: Triggering OnFailure= dependencies.

In /etc/crypttab I use this line:
home UUID=xxx /keyfile

I can manually mount /dev/wrapper/home after logging in, so it did get unlocked automatically.

Downgrading to 252.2-3 fixed the problem.

Additional info:
* package version: 252.3-1

This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 12 January 2023, 04:42 GMT
Reason for closing:  Fixed
Additional comments about closing:  See comments
Comment by Fred Morcos (fredmorcos) - Saturday, 10 December 2022, 15:24 GMT
I also experienced this yesterday. If it helps, I worked around it by adding `rd.luks.name=<output of cryptsetup luksUUID /dev/nvmeXXXX>=home` to the kernel command-line parameters (e.g. in /boot/loader/entries/arch.conf), then adding a line like `/dev/mapper/home /home ext4 defaults 0 1` to /etc/fstab.
More information: I didn't have anything on the kernel command-line, in crypttab or in fstab before because systemd would autodetect the whole setup, which was a good thing.
Comment by Toolybird (Toolybird) - Saturday, 10 December 2022, 22:58 GMT
If systemd is supposed to autodetect this setup then it sounds like a regression. Someone needs to identify the offending commit (possibly using git bisection [1]) then report it upstream. It was only a minor "point" upgrade so the procedure shouldn't take long...

[1] https://wiki.archlinux.org/title/Bisecting_bugs_with_Git
Comment by Toolybird (Toolybird) - Tuesday, 10 January 2023, 21:44 GMT
Is this still an issue with latest updated pkgs?
Comment by Fred Morcos (fredmorcos) - Tuesday, 10 January 2023, 22:43 GMT
I will check this and report back tomorrow.
Comment by Fred Morcos (fredmorcos) - Tuesday, 10 January 2023, 23:25 GMT
It's fixed now. Thank you!

Loading...