You are not logged in.

#1 2012-10-25 00:40:59

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

How to boot to emergency.target and have a functional USB keyboard?

I appending systemd.unit=emergency.target to my kernel line in GRUB while booting so I could manually do an e2fsck.  I was unable to enter my password; my USB keyboard was not activate.  Seems like systemd didn't load a module or something.  Thoughts?

Offline

#2 2012-10-25 00:49:06

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: How to boot to emergency.target and have a functional USB keyboard?

Do you have the usbinput hook in mkinitcpio.conf? That will make the initrd load the needed modules, such that it'll be done before systemd even starts. This was already needed to prevent a similar problem if you are dropped to the ramfs shell.

Offline

#3 2012-10-25 00:54:13

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: How to boot to emergency.target and have a functional USB keyboard?

@ataraxia

% sed '/#/d' /etc/mkinitcpio.conf
MODULES="i915 ahci sd_mod ext4"
BINARIES="fsck fsck.ext4"
FILES=""
HOOKS="base consolefont usbinput"
COMPRESSION="lzop"

Offline

#4 2012-10-25 13:34:34

epinephrine
Member
From: Frankfurt
Registered: 2012-10-18
Posts: 92

Re: How to boot to emergency.target and have a functional USB keyboard?

This could be related to the problem I discussed here. You're lucky, my system simply ignores systemd.unit=rescue.target, haven't tried out emergency.target yet though.
EDIT:woops, fixed it. I have /boot on a different partition, which wasn't mounted while upgrading kmod and linux. chrooting into the system and reinstalling the packages WHILE /boot is mounted fixed it... Poker face

Last edited by epinephrine (2012-10-25 15:13:00)

Offline

#5 2012-10-25 15:31:43

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky wrote:

@ataraxia

% sed '/#/d' /etc/mkinitcpio.conf
MODULES="i915 ahci sd_mod ext4"
BINARIES="fsck fsck.ext4"
FILES=""
HOOKS="base consolefont usbinput"
COMPRESSION="lzop"

You don't have the udev hook, so none of the modules included by usbinput are actually getting loaded. Figure out the module your keyboard needs (probably just hid-generic) and add it to MODULES.

Offline

#6 2012-10-25 18:47:50

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: How to boot to emergency.target and have a functional USB keyboard?

ataraxia wrote:

You don't have the udev hook, so none of the modules included by usbinput are actually getting loaded. Figure out the module your keyboard needs (probably just hid-generic) and add it to MODULES.

Good observation.

% lsmod | grep usb
usbhid                 36996  0 
hid                    85641  3 hid_generic,hid_microsoft,usbhid
usbcore               149715  3 ehci_hcd,usbhid,xhci_hcd
usb_common               954  1 usbcore

I will add these 4 and see if it works.

EDIT: Nope sad

% grep MODULES= /etc/mkinitcpio.conf
MODULES="i915 ahci sd_mod ext4 usbhid usbcore usb_common hid"

Last edited by graysky (2012-10-25 18:52:47)

Offline

#7 2012-10-25 18:52:56

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky wrote:
ataraxia wrote:

You don't have the udev hook, so none of the modules included by usbinput are actually getting loaded. Figure out the module your keyboard needs (probably just hid-generic) and add it to MODULES.

Good observation.

% lsmod | grep usb
usbhid                 36996  0 
hid                    85641  3 hid_generic,hid_microsoft,usbhid
usbcore               149715  3 ehci_hcd,usbhid,xhci_hcd
usb_common               954  1 usbcore

I will add these 4 and see if it works.

Add hid-generic as well - that's the top-level module for this functionality.

Offline

#8 2012-10-26 12:50:03

Potomac
Member
Registered: 2011-12-25
Posts: 556

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky wrote:

I appending systemd.unit=emergency.target to my kernel line in GRUB while booting so I could manually do an e2fsck.  I was unable to enter my password; my USB keyboard was not activate.  Seems like systemd didn't load a module or something.  Thoughts?

check if the option "Legacy USB Support " in your bios is set to "enabled"

Offline

#9 2012-10-26 18:59:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: How to boot to emergency.target and have a functional USB keyboard?

@ata - Still no go.

MODULES="i915 ahci sd_mod ext4 hid-generic hid_microsoft usbhid usbcore usb_common hid"

F*ck it.  I'll just add the damn udev hook (which DOES work).

@Potomac - It is, thanks for the suggestion.

Last edited by graysky (2012-10-26 18:59:27)

Offline

#10 2012-10-26 22:36:42

rutgerr
Member
From: São Paulo, SP - Brasil
Registered: 2011-06-06
Posts: 72

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky wrote:

@ata - Still no go.

MODULES="i915 ahci sd_mod ext4 hid-generic hid_microsoft usbhid usbcore usb_common hid"

F*ck it.  I'll just add the damn udev hook (which DOES work).

@Potomac - It is, thanks for the suggestion.


this:

HOOKS="base udev autodetect pata scsi sata filesystems usbinput fsck timestamp"

works fine for me all my keyboards are usb / wireless

Offline

#11 2012-10-27 04:30:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky, I wonder if you might be able to diff the output of lsinitcpio of your old initramfs and your new one with the udev hook.  I am curious as to what it actually added in terms of keyboard input.  I believe my system uses evdev and psmouse, as I have a thinkpad, so it would ceratinly be different.  But I am just curious.

Offline

#12 2012-10-27 06:40:47

ZekeSulastin
Member
Registered: 2010-09-20
Posts: 266

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky wrote:
MODULES="i915 ahci sd_mod ext4 hid-generic hid_microsoft usbhid usbcore usb_common hid"
                                  ^

Out of curiosity's sake, was that typo originally in your mkinitcpio.conf or was it introduced in the copy?  That might be why it didn't work tongue

Offline

#13 2012-10-27 09:47:01

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: How to boot to emergency.target and have a functional USB keyboard?

ZekeSulastin wrote:
graysky wrote:
MODULES="i915 ahci sd_mod ext4 hid-generic hid_microsoft usbhid usbcore usb_common hid"
                                  ^

Out of curiosity's sake, was that typo originally in your mkinitcpio.conf or was it introduced in the copy?  That might be why it didn't work tongue

I do not understand what you are claiming is a typo?

1: MODULES="i915 ahci sd_mod ext4"
2: MODULES="i915 ahci sd_mod ext4 hid-generic hid_microsoft usbhid usbcore usb_common hid"

Offline

#14 2012-10-27 10:11:34

illusionist
Member
From: localhost
Registered: 2012-04-03
Posts: 498

Re: How to boot to emergency.target and have a functional USB keyboard?

@graysky
try

ata_piix

  Never argue with stupid people,They will drag you down to their level and then beat you with experience.--Mark Twain
@github

Offline

#15 2012-10-27 13:56:10

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,491

Re: How to boot to emergency.target and have a functional USB keyboard?

graysky wrote:

I do not understand what you are claiming is a typo?

1: MODULES="i915 ahci sd_mod ext4"
2: MODULES="i915 ahci sd_mod ext4 hid-generic hid_microsoft usbhid usbcore usb_common hid"

ZekeSulastin was referring to your spelling of "hid_generic".

Offline

#16 2012-10-27 14:32:09

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: How to boot to emergency.target and have a functional USB keyboard?

@Strike0 - I get it... hyphen instead of underscore.  I modded it, rebooted and still no keyboard.  Thanks tough.

% grep MODULES= /etc/mkinitcpio.conf
MODULES="i915 ahci sd_mod ext4 hid_generic hid_microsoft usbhid usbcore usb_common hid"

Offline

#17 2012-10-27 15:27:17

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: How to boot to emergency.target and have a functional USB keyboard?

dashes and underscores are interchangeable. kmod tools ignore the difference, and I've extended that to mkinitcpio as well. It makes no difference whether your modules array contains ata-piix or ata_piix. If it did, mkinitcpio would have thrown an error.

This also should have nothing to do with the initramfs. If you want a functional keyboard, use rescue.target instead, and udev will run in userspace before dropping you into the shell. emergency.target interrupts bootup sooner.

Last edited by falconindy (2012-10-27 15:33:00)

Offline

Board footer

Powered by FluxBB