Solved Keyboard (?) not recognised at boot time. Sometimes.

semi-ambivalent

Active Member

Thanks: 3
Messages: 108

#1
My machine is running 11.1, a two-disk ZFS mirror, and geli encryption. About a month or so ago I started seeing a case where once in a while after power-up, when I'm at the password prompt and I begin to enter it the baton doesn't jump to the right as it usually does. Entering the password anyway and hitting Enter just boots to the point where the password is requested for each of the two disks. Then everything proceeds as usual. It's as if I have partial keyboard, but just at the password prompt; 'Enter' always works as advertised. Hard power cycling always 'fixes' this but I'd like to know why the password prompt doesn't acknowledge input. I can boot so it does see the keyboard.
 

ralphbsz

Daemon

Thanks: 688
Messages: 1,159

#2
How is your keyboard connected? PS/2, or USB? Those are initialized during different times at booting. Look at the output from dmesg during booting. You'll see the keyboard being initialized, like this:
Code:
kbd1 at kbdmux0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
ukbd0 on uhub7
ukbd0: <Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint, class 0/0, rev 1.10/1.22, addr 2> on usbus0
kbd2 at ukbd0
Now look where in the same boot process the Geli password prompt is. Could it be that the password is requested before the kernel has initialized the keyboard?
 
OP
OP
S

semi-ambivalent

Active Member

Thanks: 3
Messages: 108

#3
How is your keyboard connected? PS/2, or USB? Those are initialized during different times at booting. Look at the output from dmesg during booting. You'll see the keyboard being initialized, like this:
Code:
kbd1 at kbdmux0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
ukbd0 on uhub7
ukbd0: <Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint, class 0/0, rev 1.10/1.22, addr 2> on usbus0
kbd2 at ukbd0
Now look where in the same boot process the Geli password prompt is. Could it be that the password is requested before the kernel has initialized the keyboard?
Thanks ralphbsz!
I looked at dmesg and what I noticed was booting errored at loading geom_bde since it was built into the kernel. geom_eli loaded as a kernel module via loader.conf.

I commented out both entries in loader.conf and built them both into the kernel with
options GEOM_BDE
options GEOM_ELI

Everything behaves so far but my booting frequency is only about once a day. But thanks, things are cleaner now and that's good.
 
Top