Page 1 of 1

[SOLVED] encrypted / = can not enter key by USB keyboard

PostPosted: Dec 9th, '11, 22:32
by morgano
I have set up my system fully encrypted, except the /boot partition.
When it starts it asks for the encryption key.
But in that moment my USB keyboard does not work; no keypress shows up on screen.
I have to plug in my old keyboard to the PS/2 connector to enter the key phrase.
(The USB keyboard works after boot)
Maybe initrd is missing USB driver or something?
And now i am talking about something i do not know so i stop here.
How to solve?

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 11th, '11, 10:57
by yisheng
Did you try to aktivate usb-legacy support in your BIOS?

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 10:28
by morgano
It is enabled.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 11:22
by yisheng
Is this a wirless usb keyboard? Then I would suggest the following, not a joke. I had that (not with Mageia though) on another machine. Try to just change the usb port you are using on the back of the machine. Change the order. For me this is a BIOS problem, not an O.S. problem. Are you sure that the keyboard doesn't write or is it just the setting of the console that LUKS passwords should not be rendered by the screen for security reasons. When I type my password on a LUKS encrypted partition, nothing apparent happens, but still it writes. i did set it up this way. Try to put the password correctly and press enter, even if "apparently it does not write". Maybe it actually does.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 12:20
by morgano
Thank you for the quick reply.
No it is a wired USB keyboard (FUJITSU KBPC E USB ergonomic keyboard)
Directly on main board USB 2.0 connector.
Luks shows dots if i plug in a PS/2 keyboard and type and it works, but nothing happens using this USB keyboard at that moment.
After booting, the USB keyboard works perfectly.
(so currently i have both keyboards connected... so it is a bit crowded on my desk...)

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 13:13
by yisheng
Does this keyboard have a ps/2 adapter on usb? Or is it a usb native keyboard? Connector: yes, just try another connector on the same machine. Sometimes BIOS will have trouble to recognize a keyboard, when you shif on another connector, sometimes magicly it works. Did you controll on another machine if the very Fujitsu keyboard does work at all?

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 15:05
by morgano
It is a plain wired USB keyboard.
As said the keybord works once the system is booted.
It also works in BIOS and in GRUB.
Just not during first part of boot.

Also tried on my laptop that also have root encrypted, but runs Mandriva 2010.2: same result.

So it seem neither mandriva nor mageia support booting an encrupted system with luks passphrase from USB keyboard.

I think it boils down to the question:
How to make the booting environment (initrd etc) using a USB keyboard?

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 16:00
by doktor5000
Please report this as a bug/ehancement request at https://bugs.mageia.org
You could be right with your assumption about initrd and usb drivers (or something in that direction).
Maybe it justs needs to be regenerated? Please also attach the output of
Code: Select all
lsinitrd /boot/initrd-$(uname -r).img

to the bugreport, but please as an attachment, as it's rather long.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 12th, '11, 18:46
by morgano
Thank you
https://bugs.mageia.org/show_bug.cgi?id=3722
I do not know how to add modules and generate initrd, and refrain from experimenting on this production system.
I can give it a shot in a few days after a full backup though.
So how should it be done?

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 15th, '11, 02:27
by JoesCat
When you mention
and refrain from experimenting on this production system.
, it reminded me of some hardware that I worked with that had it's own peculiarities.

Which brand of computer are you using, or to be more specific, how about indication what it is. Example HP 123, or Dell 456, or etc....

Have you checked to make sure that the BIOS is at the latest version. An updated version may have solved a problem.

If you do not have to plug-in any external USB drives or anything that requires a high throughput, you may want to try dropping down from USB 2 or USB 3, down to USB 1.1. Some keyboards and mice are mislabelled as USB 2.0 and should really only run at USB 1.X speeds.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 15th, '11, 12:10
by morgano
System: the one in my sig. Yes latest BIOS (was a couple weeks ago anyway)
Speed: no idea, but as said it works in BIOS, GRUB, and booted system.
Yeah, pecularities, see my: viewtopic.php?f=7&t=1363

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 16th, '11, 03:41
by JoesCat
Thanks (for the pointer to your sig in terms of your computer).

morgano wrote:Speed: no idea, but as said it works in BIOS, GRUB, and booted system.

Okay, FYI, when you bootup, BIOS has control, looks for hardware, finds your keyboard and uses it (I also suspect that it probably runs the USB ports at USB 1.x speeds since BIOS doesn't need to use USB 2.x or 3.x speed to speak with a keyboard). Next, when BIOS hands control over to Grub, Grub is most likely "also" taking advantage of BIOS interrupts, hooks, etc, so it also sees your keyboard, and so it works here too.

Next, when Grub decides which partition and operating system to run (in this case, you chose linux), it then loads and runs the linux kernel, which is where your problem with the keyboard begins.

Looking at the technical page for your keyboard, it mentions USB, but does not mention USB 2.0.
The bug report is the right way to go, but if you're willing, can you try either of these?
1) If your BIOS has a setting to force USB 1.x, try that. This may be a case where linux bumped up the USB port speed from 1.x to 2.0 when it started running, and now your keyboard can't speak fast enough to be seen. Trying 1.x allows you to hopefully confirm this (assuming kernel respects the BIOS setting).
2) If you lack a BIOS setting for 1.x, try a verified USB 2.0 keyboard (Some "older" keyboards state 2.0 capable, but you need to be careful there, choose one that you know is capable of 2.0 speeds). Plug the USB keyboard directly into the motherboard.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 16th, '11, 13:51
by doktor5000
Actually your description is not quite right, grub first loads the initial ramdisk, which then loads the kernel.

Also USB is backwards and forewards compatible, and most HID devices are not 2.0, but work everywhere.
I've nalso not seen any recent BIOS where you can set the USB speed, if at all, you could only set USB legacy support.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Dec 17th, '11, 14:13
by morgano
Thank you for the ideas.
Legacy support enabled. I have no other USB keyboard to try.

Re: encrypted / = can not enter key by USB keyboard

PostPosted: Jan 4th, '12, 21:18
by morgano
After todays updates (including kernel) i can enter the key using USB keyboard :D

Moderator: please mark this as FIXED