You are not logged in.

#1 2019-12-01 11:39:06

lino
Member
From: Wanne-Eickel
Registered: 2009-04-06
Posts: 16

Mounting USB device for unlocking disk encryption takes very long

Hi bbs!

I have full disk encryption via luks (one big btrfs partition using subvolumes), usually I typed my password during boot, but it's a secure password - so this takes time.
Now I've just configured a keyfile on my usb stick according to the wiki, believing it could speed up the whole process.

But in fact the the opposite is case: after loading the initramfs, it states

waiting 10 seconds for device /dev/sdb1

  And it takes (feels like) the whole 10 seconds to mount and then read the keyfile.

$ systemd-analyze time
Startup finished in 21.445s (kernel) + 4.017s (userspace) = 25.463s

I'ts not a cheap device, usb3 stick in a usb3 port.
No, my keyfile is not in the gigabytes, 2K of randomness ;-)

This is my mkinitcpio.conf:

MODULES=(btrfs)
BINARIES=()
FILES=()
HOOKS=(base udev autodetect modconf block keyboard encrypt)
COMPRESSION=(cat)

This is the line from my syslinux.cfg

APPEND root=/dev/mapper/cryptroot rootflags=subvol=__current/ROOT cryptdevice=/dev/sda1:cryptroot cryptkey=/dev/sdb1:btrfs:/key loglevel=2 rw

I've tried different filesystems (ext2/3, vfat, brtfs) but no luck.
I also tried haveged, including the mkinitcpio-hook.

Edit: I tried including the xhci-hcd module.. Still does not compute.

Do I have to live with this, or is there a way to speed this up? Any nudge in the right direction would be greatly apprecieated!
If further info is required, I'll provide.

Have a nice Sunday everyone!

Last edited by lino (2019-12-01 13:54:44)


»A keystroke is worth a thousand clicks«

Offline

Board footer

Powered by FluxBB