You are not logged in.
Hello everyone,
I recently had a problem where I was not able to use a USB keyboard to enter my decryption passphrase at boot. It worked on one computer, and did not work on another, while both had identical mkinitcpio.conf, package versions, etc.
I got it to work on all my computers by moving the keyboard hook toward the front of the list of hooks in mkinitcpio.conf.
From (this one doesn't work now, but used to always work):
HOOKS="base udev autodetect modconf block encrypt lvm2 filesystems keyboard fsck"To (this one does):
HOOKS="base keyboard udev autodetect modconf block encrypt lvm2 filesystems fsck"I should note that the former version had always worked fine on ALL of my computers, but supposedly some update changed that.
Is it likely that the system is not being given enough time to detect my keyboard before the encrypt hook is run, and that, by moving it forward in the list, I am giving it more time? This would also explain why it worked on one system and not on the other. My other system might simply be able to detect the keyboard quicker. Also, is this a bug I should report, or intended/unavoidable behavior?
Last edited by Liubov (2013-06-21 17:43:19)
Offline
I can't tell you why it doesn't work as before, but here are two things that might explain why it only works this way now:
HOOKS
... Order is important, as it defines the order in which hooks will be run during bootup.
Based on this, having keyboard after encrypt absolutely shouldn't work. Assuming I'm understanding correctly.
Also
mkinitcpio -H autodetect
...Any hooks placed before 'autodetect' will be installed in full.So having it before autodetect, you're pulling in everything. Maybe autodetect causes something necessary to be discluded.
But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner
Offline
Did you try the hook after autodetect, but before encrypt like this?
HOOKS="base udev autodetect modconf keyboard block encrypt lvm2 filesystems fsck"Edit: It could also be a faulty configuration loaded with modconf. What do you have in /etc/modprobe.d, /usr/lib/modprobe.d.
Last edited by progandy (2013-06-21 16:07:53)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
I have also tried putting keyboard right before encrypt, and right before block and encrypt. Those configurations did not work. Strangely enough having keyboard after encrypt initially worked fine on all of my systems, and is still working on one of them now. Perhaps the encrypt hook is run in parallel with the keyboard hook.
/etc/modprobe.d is empty. In /usr/lib/modprobe.d there is a file called usb-load-ehci-first.conf (owned by package filesystem), which seems to serve to load EHCI before OHCI en UHCI. I don't really know the details of that.
I also have an Arch install on a USB stick, and I tried to use that on the one system which normally works even when the keyboard hook is placed after the encrypt hook. Didn't work. I'm really stumped here.
Last edited by Liubov (2013-06-21 17:19:06)
Offline
Sounds to me like you didn't have the USB keyboard plugged in when you generated the image (with 'keyboard' after autodetect). The autodetect hook is a whitelist -- it can't whitelist things that don't exist (such as keyboards that aren't plugged in).
Offline
That makes perfect sense. I do think that was the problem. When I first installed Arch to the USB stick, I used the PC with the USB keyboard plugged in. I later updated my system on my laptop which did not have the wireless keyboard. This does make me realize that I should probably remove the autodetect hook or use fallback image if I plan on using this LiveUSB on many other systems. :-)
Edit: tested and works as expected on all of my systems now
Last edited by Liubov (2013-06-21 17:49:06)
Offline
Sounds to me like you didn't have the USB keyboard plugged in when you generated the image (with 'keyboard' after autodetect). The autodetect hook is a whitelist -- it can't whitelist things that don't exist (such as keyboards that aren't plugged in).
This also fixed my issue with my Yubikey (configured with a static key to decrypt a LUKS encrypted root partition) not working on the standard kernel; I could only decrypt LUKS using the fallback kernel.
After regenerating the images with the Yubikey plugged in I can now decrypt LUKS with the standard kernel.
Thanks!
My new username is now Aerion in order to match my username on the AUR, Wiki and Bug Reports.
Offline