Bug 1033250
Summary: | The keyboard layout for the virtual console cannot be changed using “localectl set-keymap <map>; dracut -f; reboot;” | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Mike FABIAN <mfabian> |
Component: | dracut | Assignee: | dracut-maint |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 20 | CC: | awilliam, dracut-maint, harald, jonathan, massi.ergosum, mfabian, michele, vpodzime |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-01-22 10:57:15 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 1035316 | ||
Bug Blocks: |
Description
Mike FABIAN
2013-11-21 19:02:55 UTC
In the “Send key” menu of remote-viewer, there is Ctrl+Alt+F1 Ctrl+Alt+F2 ... Clicking “Ctrl+Alt+F2” should switch the guest to the virtual console, shouldn’t it? But it does not, it only inserts ;5Q into the gnome-terminal I see in the guest. (In reply to Mike FABIAN from comment #1) > In the “Send key” menu of remote-viewer, there is Sorry, I pasted that into the wrong window ☹. It was intended for bug#1033262 Mike points out that https://bugzilla.redhat.com/show_bug.cgi?id=875567 explains why we write the layout to cmdline at all, but I'm not sure it was really the right fix for that bug. Presumably, if we keep this system of having the layout specified in cmdline, we'd have to make localed change grub.cfg when it changes the keyboard layout, which seems messy. (In reply to Mike FABIAN from comment #0) > See also: https://bugzilla.redhat.com/show_bug.cgi?id=1028207#c73 > > So during reboot, systemd-vconsole-setup reads the keymap from the > etc/vconsole.conf in initramfs, which is <new-map> and then > passes it to loadkeys. But loadkeys fails because only <old-map> > is in usr/lib/kbd/keymaps in initramfs. Looks like I was confused while writing that. Trying again: The vconsole.keymap=... on the kernel command line always wins. Therefore, after trying to switch to a different keymap for the virtual console by doing “localectl set-keymap <new-map>; dracut -f; reboot;” it does not work because grub.cfg is unchanged and still contains vconsole.keymap=<old-map> which is preferred by systemd-vconsole-setup. But when doing “localectl set-keymap <new-map>; dracut -f; reboot;” the old map was deleted from and the new map copied into usr/lib/kbd/keymaps in initrd and etc/vconsole.conf in initrd contains KEYMAP=<new-map> But systemd-vconsole-setup takes the value from vconsole.keymap=<old-map> from the kernel command line and passes it to loadkeys, which fails because the old map is not there anymore in initrd. So one gets neither the old nor the new map, the loadkeys command just fails. Per the discussion in https://bugzilla.redhat.com/show_bug.cgi?id=875567#c21 onwards, the way to fix this might be to stop writing the layout into the kernel cmdline - it sounds like we may not have a reason to do that any more. Do we also want to make system-config-keyboard regenerate the initramfs when you change keyboard layout, or is that a bit dangerous? Proposing as a freeze exception: if the fix is not to write the kernel cmdline entry then we need to do that as an FE, since it's in anaconda. But if we do decide to do that we should do it _soon_, so we have time to find any breakage prior to release. er, re comment #5, I should've said 'localed' not 'system-config-keyboard'. I tested on Fedora-20-TC3-x86_64-netinst.iso, not writing the keyboard layout on the kernel command line works. I tested like this: - install in Japanese, add German keyboard layout in anaconda and make it top priority - chose to encrypt disk, use the password “zzzz” (on the German keyboard layout the “z” is on the key where the “y” is on the US layout) - complete installation, reboot - make snapshot (1) of the virtual machine at the grub prompt - continue booting - Entering “zzzz” as the password for the encryption works with the German layout, after booting the German layout is active on the console - load snapshot (1) of the virtual machine to go back to the grub prompt - remove vconsole.keymap=de from the kernel command line, continue booting - “zzzz” using the German layout still works as the password for the disc encryption - when booting is finished, German layout works on the vconsole. - execute “localectl set-keymap fr; dracut -f; reboot” - make snapshot (2) of the virtual machine at the grub prompt - continue booting - Using the German layout to enter “zzzz” as the disk encryption password does not work (because only fr.map is now in initrd, vconsole.keymap=de is on the kernel command line but the German layout cannot be loaded) - Using the French (azwerty) layout to enter “zzzz” (press the “w” key on an US keyboard to get a “z” with the French layout) does not work either because the vconsole.keymap=de on the command line causes an attempt to load the German layout, which fails - load snapshot (2) of the virtual machine to go back to the grub prompt - edit the kernel command line to remove the vconsole.keymap=de - continue booting - now entering “zzzz” as the encryption password works using the French layout (press the “w” key on a US Hardware keyboard) I.e. when vconsole.keymap=... is not on the kernel command line, everything works as it should. (In reply to Mike FABIAN from comment #8) > I tested on Fedora-20-TC3-x86_64-netinst.iso, not writing the keyboard > layout on the kernel command line works. Could you please file a bug on anaconda that it should stop writing out that boot option, propose it as a FreezeException and assign it to me? Thanks! Well, I don't see that we needed a new bug to be filed really, but since it's happened and that one has been approved as an FE, withdrawing the FE nomination for this one. I think the change we made to fix this will break keyboard layout during fedup stage2 initramfs for F20-F21 (marking about the fourth different way we've broken that...). Filed as https://bugzilla.redhat.com/show_bug.cgi?id=1038413 . |