:: Re: [DNG] usb keyboard detection in…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: tito
Date:  
À: dng
Sujet: Re: [DNG] usb keyboard detection in initramfs
On Fri, 18 Feb 2022 14:57:11 -0700
Gregory Nowak via Dng <dng@???> wrote:

> Hello everyone.
>
> I have a raspberry pi 3b arm64 sd card which I recently upgraded in
> stages from jessie to chimaera. This card has the second partition
> encrypted, so I need an initramfs to decrypt it.
>
> The problem is that my usb keyboard doesn't seem to be detected in the
> initramfs. Once I unlock the partition from the serial console, boot
> proceeds as expected, and everything is fine.
>
> In /etc/initramfs-tools/modules I have:
>
> # List of modules that you want to include in your initramfs.
> # They will be loaded at boot time in the order below.
> #
> # Syntax: module_name [args ...]
> #
> # You must run update-initramfs(8) to effect this change.
> #
> # Examples:
> #
> # raid1
> # sd_mod
>
> evdev
> ecb
> xts
>
> # USB keyboard at boot
> usbhid
> hid
> hid_generic
> ohci_pci
>


Hi,
maybe loading them in a different order:

usbcore
ehci_hcd
ehci-pci
ohci-pci
hid
hid-generic
usbhid

Just what i would try first myself. Untested.

Ciao,
Tito

> I doubt I need ohci_pci for the rpi3, but I saw references on the web
> stating that it is needed for a usb keyboard, so included it just in
> case.
>
> The screen during the boot process until the unlock prompt says:
>
> [    7.851176] hub 1-0:1.0: 1 port detected
> Begin: Loading essential drivers ... [    7.973790] hid: raw HID
> events driver (C) Jiri Kosina
> [    7.998803] usbcore: registered new interface driver usbhid
> [    8.008273] usbhid: USB HID core driver
> [    8.083812] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI)
> Driver
> [    8.108252] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    8.123583] ehci-pci: EHCI PCI platform driver
> [    8.136873] ohci-pci: OHCI PCI platform driver
> done.
> Begin: Running /scripts/init-premount ... done.
> Begin: Mounting root file system ... Begin: Running /scripts/local-top
> ...[    8.164405] usb 1-1: new high-speed USB device number 2 using
> dwc2
>  [    8.203533] urandom_read: 2 callbacks suppressed
>  [    8.203543] random: lvm: uninitialized urandom read (4 bytes read)
>  [    8.380597] usb 1-1: New USB device found, idVendor=0424,
>  idProduct=9514, bcdDevice= 2.00
>  [    8.396897] usb 1-1: New USB device strings: Mfr=0, Product=0,
>  SerialNumber=0[    8.409579] hub 1-1:1.0: USB hub found
>  [    8.411407] device-mapper: uevent: version 1.0.3
>  [    8.417808] hub 1-1:1.0: 5 ports detected
>  [    8.427132] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01)
>  initialised: dm-devel@???
>  Please unlock disk mmcblk0p2_crypt:

>
> If I plug and unplug the keyboard at this point, I don't see any
> detection messages. I do see later on that after the root fs is
> mounted, udevd is started. Also, if I boot with the keyboard
> unplugged, login, look at lsmod, plug the keyboard again, and look at
> lsmod again, no new modules are loaded, but the keyboard is
> detected. So, I think I have all necessary modules in the initramfs,
> but no udevd.
>
> Should udev be in the initramfs? If yes, what should I look at to find
> out why it isn't in the initramfs. If udevd shouldn't be in initramfs,
> then something else would have to detect devices on the usb bus in the
> initramfs. What is that something?
>
> This used to work perfectly fine under jessie. If more info is needed,
> I'll be happy to provide it. Thanks in advance for any tips. If this is
> documented somewhere, and I haven't been able to find it in my
> research, a pointer to that documentation would be good enough.
>
> Greg
>
>