FS#46172 - [linux] [systemd] [mkinitcpio] [dm-crypt] failed boot if too slow to enter LUKS passphrase

Attached to Project: Arch Linux
Opened by Moviuro (Moviuro) - Tuesday, 01 September 2015, 18:55 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 03 July 2016, 17:56 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
When booting, LUKS passphrase must be entered "fast" after the prompt first appears. ("fast" means that 5 minutes is too long and will triger the bug)
This bug happens on both UEFI and legacy BIOS boot.
This bug happened for many versions of the kernel, systemd and mkinitcpio.

Additional info:
* local/linux 4.1.6-1
* local/systemd 224-1
* local/mkinitcpio 18-2
* local/cryptsetup 1.6.7-1
HOOKS="systemd autodetect modconf block sd-vconsole keyboard sd-encrypt filesystems"
The prompt reads:
[ OK ] Reached target encrypted volumes
Starting file system check on ...
[ OK ] Starting file system check on ...
Mounting /sysroot...
[ OK ] Mounted /sysroot.

(And nothing more, it halts here)

Steps to reproduce:
* boot with the aforementioned HOOKS in your initramfs.
* Wait
* Enter LUKS passphrase
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 03 July 2016, 17:56 GMT
Reason for closing:  Upstream
Additional comments about closing:  Not a packaging bug. If disabling timeouts doesn't work, it's a problem for upstream systemd to resolve.
Comment by Moviuro (Moviuro) - Saturday, 10 October 2015, 07:42 GMT
Still happens on :
* Linux 4.2.2-1
* systemd 226-3
* mkinitcpio 18-2
* cryptsetup 1.6.7-1
Comment by Dave Reisner (falconindy) - Saturday, 10 October 2015, 14:03 GMT
There's a timeout waiting for the mountable block device (which appears after unlocking the encrypted volume). You can add x-systemd.device-timeout=0 to your device in /etc/cryptab if you want it to wait forever for it to "show up" (enter your password).
Comment by Moviuro (Moviuro) - Sunday, 11 October 2015, 12:02 GMT
I have an empty /etc/crypttab. However, /etc/crypttab.initramfs is not empty:

luks-c3c2fcfa-9265-4da7-a927-0a18d83d8d77 UUID=c3c2fcfa-9265-4da7-a927-0a18d83d8d77 - luks,discard
Comment by Dave Reisner (falconindy) - Sunday, 11 October 2015, 12:32 GMT
So override the timeout there....
Comment by Moviuro (Moviuro) - Sunday, 11 October 2015, 21:42 GMT
Still no dice. The bug still occurs with the following: (I ran # mkinitcpio -p linux after editing the file)

luks-c3c2fcfa-9265-4da7-a927-0a18d83d8d77 UUID=c3c2fcfa-9265-4da7-a927-0a18d83d8d77 - luks,discard,x-systemd.device-timeout=0
Comment by Dave Reisner (falconindy) - Sunday, 11 October 2015, 21:43 GMT
Did you regenerate your initramfs after changing crypttab.initramfs?
Comment by Moviuro (Moviuro) - Sunday, 11 October 2015, 21:47 GMT
yes, edited previous comment to add this detail
Comment by Javier Viñal (fjvinal) - Friday, 08 April 2016, 10:46 GMT
It looks like dm-crypt does not work with "systemd" hook.
With "base" and "udev" works fine.

Loading...