Ask Your Question

GRUB2 keyboard layout

asked 2015-03-27 08:12:25 -0500

firefexx gravatar image

updated 2015-04-05 03:41:51 -0500

Hi, I want to change GRUB2's keyboard layout to the German qwertz layout.

This would be useful when editing boot parameters, entering the GRUB shell or typing supervisor names and passwords.

I experimented a bit but wasn't successful so far.

Could someone explain me how this works?

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2015-04-05 14:58:54 -0500

lsatenstein gravatar image

Do man localectl

You may need to revise localectl to permit the terminal keyboard layout to match your physical keyboard,

edit flag offensive delete link more


Thanks for your answer. But it seems the settings are already correct: $ localectl status System Locale: LANG=de_DE.UTF-8 VC Keymap: de-nodeadkeys X11 Layout: de X11 Variant: nodeadkeys And according to the man page, localectl is only responsible for the keyboard layout when the system is already booted. This is not the case when I entered GRUB and want to get a GRUB shell or edit boot parameters.

firefexx gravatar imagefirefexx ( 2015-04-06 04:02:56 -0500 )edit

answered 2015-03-31 17:24:36 -0500

florian gravatar image

You need to update your kernel boot command in grub by changing /etc/default/grub as follows:

To get a typical German keyboard layout you will have to modifiy/add to the line that starts with GRUB_CMDLINE_LINUX= the following: rd.vconsole.font=latarcyrheb-sun16 rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8. (It is very likely that vconsole.font is already defined.)

After that, you need to update your grub config by executing sudo grub2-mkconfig -o /boot/grub2/grub.cfg.

(If you are running a parallel MS Win system in UEFI mode, the command should be sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg but I am not 100% sure about it!).

Then you will have use dracut that re-creates the initial ramdisk images. Run sudo dracut -f /boot/initramfs-$(uname -r).img $(uname -r).

This might also help you.

edit flag offensive delete link more


Thanks for your answer. Unfortunately didn't work for me. Added rd.vconsole.keymap=de-latin1-nodeadkeys rd.locale.LANG=de_DE.UTF-8 to GRUB_CMDLINE_LINUX variable (font was already present), executed grub2-mkconfig -o /boot/grub2/grub.cfg and dracut --force but when I try to type my supervisor password in GRUB, it's still qwerty layout. Indeed, would have wondered me because the generated initial ramdisk isn't loaded at this time (when in GRUB w/o booting a specific entry).

firefexx gravatar imagefirefexx ( 2015-04-05 03:39:44 -0500 )edit

Question Tools

1 follower


Asked: 2015-03-27 08:12:25 -0500

Seen: 4,952 times

Last updated: Apr 05 '15