Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222699 - sys-kernel/genkernel: Skip keymap loading on serial consoles
Summary: sys-kernel/genkernel: Skip keymap loading on serial consoles
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-05-18 18:31 UTC by Tobias Klausmann (RETIRED)
Modified: 2021-03-21 23:22 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Klausmann (RETIRED) gentoo-dev 2008-05-18 18:31:24 UTC
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.
Comment 1 Andrew Gaffney (RETIRED) gentoo-dev 2008-07-29 12:11:05 UTC
How do we know which device the current console is?
Comment 2 Tobias Klausmann (RETIRED) gentoo-dev 2008-08-13 20:25:57 UTC
One thing to check would be /proc/cmdline, though it strikes me as not quite elegant.
Comment 3 Chris Gianelloni 2008-08-21 05:36:33 UTC
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.
Comment 4 Matt Turner gentoo-dev 2011-07-14 00:14:11 UTC
Is there something in particular that we've been waiting for since 2008 before this can be completed?
Comment 5 Xake 2011-07-14 09:25:22 UTC
(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.
Comment 6 Larry the Git Cow gentoo-dev 2021-03-14 20:05:55 UTC
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(+)
Comment 7 Thomas Deutschmann (RETIRED) gentoo-dev 2021-03-21 23:22:01 UTC
Released with genkernel-4.2.0!