Change the keyboard layout of GRUB in stage 1
Since you're using EFI with an encrypted /boot, I'm assuming you're already familiar with grub-mkstandalone
Add in /etc/default/grub
:
GRUB_TERMINAL_INPUT=at_keyboard
Add in /etc/grub.d/40_custom
:
insmod keylayouts
keymap /boot/grub/de.gkb
Next run grub-kbdcomp -o /tmp/de.gkb de
to generate the german grub layout.
Now all you need to do is add "boot/grub/de.gkb=/tmp/de.gkb"
to your grub-mkstandalone
command. In my case it looks like this:
grub-mkstandalone -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi --compress="xz" --modules="part_gpt part_msdos crypto cryptodisk luks disk diskfilter lvm" --fonts="unicode" -o "/boot/efi/EFI/linux/grubx64.efi" "boot/grub/grub.cfg=/tmp/grub.cfg" "boot/grub/de.gkb=/tmp/de.gkb"
It cannot be done, see this Introduction to Grub2 which states explicitly:
Important: Keyboard Layout during the Boot Procedure
The US keyboard layout is the only one available when booting