[SOLVED] Keyboard Went out - Now Can't Boot

Getting your soundcard to work, using Debian on non-i386 hardware, etc

[SOLVED] Keyboard Went out - Now Can't Boot

Postby Quantum » 2012-07-08 02:20

Well, serves me right. I encrypted / and it worked fine for a long time... but now my ancient PS2 keyboard has failed.

So I went to WorstBuy and bought a bluetooth keyboard, which works in BIOS and Grub, but when it asks for the disk password... no action. OK, that's understandable, maybe the BT driver is not built in to initrd or something.

Well no HTPC means no TV, so I hoisted all the way back to WorstBuy and bought a USB keyboard. Drove it all the way back and plugged it in, confident that it would work... and oh no, same behavior as the BT.

I imagine the driver is not available in initrd for USB as well... but without a PS2 keyboard I may be screwed. I don't know where you'd buy one anymore.
Last edited by Quantum on 2012-07-09 05:07, edited 1 time in total.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Re: Keyboard Went out - Now Can't Boot

Postby dasein » 2012-07-08 02:28

Quantum wrote:I don't know where you'd buy one anymore.

Finding a store in the greater Seattle area that sells used PS/2 keyboards should be fairly easy. The PC-Recycle chain comes to mind instantly. There are also small "mom and pop" second-hand computer shops scattered around the area, from Tacoma to Redmond. A little bit of research, or maybe even a visit to craigslist, would no doubt uncover lots more sources.

Edit: If you truly can't find a PS/2 keyboard, maybe it'd be worth investigating a USB-to-PS/2 converter. (Just a thought.)
User avatar
dasein
 
Posts: 7775
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: Keyboard Went out - Now Can't Boot

Postby Quantum » 2012-07-08 03:32

I decided to try and have TV this weekend, so I tried the chroot method.

I booted to Fedora Live and opened a terminal. Now; you are supposed to be able to open an encrypted drive this way:
cryptsetup luksOpen /dev/sda2 /dev/mapper/root

This is supposed to open the encrypted partition and ask you for the password, then when you get it right it creates the decrypted block device in /dev/mapper/root, which you can then mount. To that I was going to pivot with chroot and turn off frickin encryption.

But naturally it doesn't work. On the cryptsetup command I get "Device /dev/mapper/root not found". No shit stupid, you're supposed to create it with the device I gave you.

So, I booted the Debian install CD, and to my shock it automatically recognized the two encrypted partitions and asked for my password. I went into Rescue and checked to make sure my two parts were in /dev/mapper -- they were, as sda2_crypt and sda3_crypt. (swap and /, resp) 'Wow' thinks I, 'I have it made.'

I created /media/root and
mount /dev/mapper/sda3_crypt /media/root
... when what to my wandering eyes did appear but:
"mount: mounting /dev/mapper/sda3_crypt on /media/root - Invalid argument".

What argument? There is no argument. What is wrong? Naught a cluue.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Re: Keyboard Went out - Now Can't Boot

Postby Quantum » 2012-07-08 18:52

Well fortunately my keyboard started working long enough to get past the luks passwords.

Turning that off...
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Re: Keyboard Went out - Now Can't Boot

Postby nadir » 2012-07-08 19:07

Quantum wrote:I decided to try and have TV this weekend, so I tried the chroot method.

I booted to Fedora Live and opened a terminal. Now; you are supposed to be able to open an encrypted drive this way:
cryptsetup luksOpen /dev/sda2 /dev/mapper/root

This is supposed to open the encrypted partition and ask you for the password, then when you get it right it creates the decrypted block device in /dev/mapper/root, which you can then mount. To that I was going to pivot with chroot and turn off frickin encryption.

But naturally it doesn't work. On the cryptsetup command I get "Device /dev/mapper/root not found". No shit stupid, you're supposed to create it with the device I gave you.


No idea what you mean with "the device i gave you", but
Code: Select all
cryptsetup luksOpen /dev/sda2 root

should work


I created /media/root and
mount /dev/mapper/sda3_crypt /media/root
... when what to my wandering eyes did appear but:
"mount: mounting /dev/mapper/sda3_crypt on /media/root - Invalid argument".

Strange.

Code: Select all
# cryptsetup luksOpen /dev/sdc1 /dev/mapper/test
Device /dev/mapper/test not found
# cryptsetup luksOpen /dev/sdc1 whateverichoose
Enter passphrase for /dev/sdc1:
# mount /dev/mapper/whateverichoose /media/stick/
#

But if you wanna chroot or such (repair grub, whatnot) you will want to take the proper name, sure (sda2_crypt ...). blkid and /etc/crypttab after chroot will tell if the right name is chosen. I think. Tricky.
"I am not fine with it, so there is nothing for me to do but stand aside." M.D.
User avatar
nadir
 
Posts: 5964
Joined: 2009-10-05 22:06
Location: away

Re: Keyboard Went out - Now Can't Boot

Postby Quantum » 2012-07-09 05:03

OK I have definitely found the problem. For some reason the /boot/initrd.img file does not have the drivers for usb or hid devices. I'm sure it doesn't have bluetooth drivers either.

I got the USB keyboard working on LUKS disk password by doing this:
- Edit /etc/initramfs-tools/modules and add
usb_common
usbcore
usbhid
ehci_hcd
ohci_hcd
uhci_hcd
hid
imon


(the imon is for my HTPC case LCD display which is on USB)

- Then build initrd file for current kernel:
Set aside /boot/initrd.img-* and
# mkinitramfs -o /boot/initrd.img-$(uname -r)
# update-grub

I rebooted and then could enter the LUKS disk passwords on the USB keyboard with the PS2 unplugged. I imagine a bluetooth keyboard would work as well if the right BT drivers were added.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia


Return to Hardware

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable