[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#30604] Keyboard detection before ‘cryptsetup’ runs
From: |
Ludovic Courtès |
Subject: |
[bug#30604] Keyboard detection before ‘cryptsetup’ runs |
Date: |
Sun, 18 Mar 2018 16:03:06 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hi Danny,
address@hidden (Ludovic Courtès) skribis:
> Something annoying is that my external USB keyboard doesn’t work while
> in the initrd (when I type my passphrase). I can see that it’s detected
> early on, before I type my passphrase:
While experimenting with this on the bare metal, it became clear that
it’s a timing issue: the keyboard is detected right after the cryptsetup
is displayed, so ‘load-needed-linux-modules’ didn’t have a chance to
load the relevant modules.
Similarly, if I boot with ‘--repl’, and I manually type
(load-needed-linux-modules …) from there, then the keyboard’s module
gets loaded as expected. That’s because the device showed up in the
meantime and the kernel created a /sys entry for it.
In essence, we want a mini-udev and something akin to “udevadm settle”.
Merely calling ‘load-needed-linux-modules’ once isn’t enough.
One way to do that would be to have a separate thread that calls
‘load-needed-linux-modules’ as appropriate. Ideally it would use
inotify on /sys like udev does, but a poor programmer’s version could
simply call ‘load-needed-linux-modules’ every half a second or so.
Alternately, before passing control to user code (pre-mount actions,
etc.), we could do a “settle” kind of thing: call
‘load-linux-modules-from-directory’ every 0.5 seconds until its result
is the same as before. There’s still a risk of missing devices, and
those devices will never show up later because nobody’s monitoring /sys.
But then again, “udevadm settle” must have the same problem: it can’t
really know whether things have settled, I guess.
WDYT?
Thanks,
Ludo’.
- [bug#30604] [PATCH v11 4/6] vm: Make the virtio-blk uniquely identifiable in /sys., (continued)
- [bug#30604] [PATCH v11 2/6] linux-modules: Add 'load-linux-modules-from-directory'., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v11 2/6] linux-modules: Add 'load-linux-modules-from-directory'., Danny Milosavljevic, 2018/03/12
- [bug#30604] [PATCH v11 5/6] linux-initrd: Provide our own 'modprobe' program., Ludovic Courtès, 2018/03/12
- [bug#30604] [PATCH v11 5/6] linux-initrd: Provide our own 'modprobe' program., Ludovic Courtès, 2018/03/13
- [bug#30604] [PATCH v11 5/6] linux-initrd: Provide our own 'modprobe' program., Ludovic Courtès, 2018/03/13
- [bug#30604] [PATCH v11 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- Message not available
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs,
Ludovic Courtès <=
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs, Danny Milosavljevic, 2018/03/23
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs, Danny Milosavljevic, 2018/03/23
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs, Ludovic Courtès, 2018/03/24
- [bug#30604] Keyboard detection before ‘cryptsetup’ runs, Ludovic Courtès, 2018/03/24
- [bug#30604] [PATCH v11 1/6] linux-modules: Add "modules.alias" writer., Danny Milosavljevic, 2018/03/12
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Ludovic Courtès, 2018/03/13
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- [bug#30604] [PATCH v10 5/6] linux-initrd: Provide our own 'modprobe' program., Danny Milosavljevic, 2018/03/13
- [bug#30604] [PATCH v10 4/6] vm: Make the virtio-blk uniquely identifiable in /sys., Ludovic Courtès, 2018/03/12