Currently, the scripts on the install media ask for the keymap to load even if the console is /dev/ttyS0 where keymap loading makes no sense. This does not break anything but seems a bit inelegant. Maybe one could make the script check whether console is not /dev/tty[0..9] and then skip loading/asking.
How do we know which device the current console is?
One thing to check would be /proc/cmdline, though it strikes me as not quite elegant.
We already check /proc/cmdline for all of the other genkernel options, so I don't see this being much different. I want to eventually move the keymap stuff out of genkernel itself, since it's only really useful on the installation media. I'd be quite surprised if anyone used it on an installed machine.
Is there something in particular that we've been waiting for since 2008 before this can be completed?
(In reply to comment #3) > I want to eventually move the keymap > stuff out of genkernel itself, since it's only really useful on the > installation media. Actually it does make sense on a ordinary system to have the keymap already in genkernel too. The following scenario: you have a LUKS-encrypted root. The user of the computer chooses to change the passphrase to something containing a $ on his swedish keyboard. During unlock genkernel uses English layout, where $ is mapped in another way. Massive confusion for people not able to look up the English layout. (In reply to comment #4) > Is there something in particular that we've been waiting for since 2008 before > this can be completed? I think this is more of an "noone has had the time to implement it, and since it does not break anything". Me myself would have picked this up if I did not have a nice queue of other bugfixes/features I have not had the time to fixup. This seems rather trivial to fix in old genkernel, the only question that comes to my mind is if there are other consoles then /dev/tty[0-99] that makes sense to have keymap handling on, and if a whitelist is the way to go or blacklist makes more sense. We should also check how dracut handle this.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=f492e244b60324fac15d7a8f6e74b4a022bdd3bd commit f492e244b60324fac15d7a8f6e74b4a022bdd3bd Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2021-03-13 18:55:21 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2021-03-14 19:33:57 +0000 initrd.scripts: setup_keymap(): Skip keymap loading for serial consoles Bug: https://bugs.gentoo.org/222699 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> defaults/initrd.scripts | 7 +++++++ 1 file changed, 7 insertions(+)
Released with genkernel-4.2.0!