10

I installed grub on a EFI based system. So I have the EFI partition on /dev/sdc2 and my LUKS container in /dev/sdc5. I have only one linux partition in the LUKS container. So even /boot with the stage 2 of grub is encrypted.

When the system boots the EFI boots the grub entry and grub stage 1 loads. This tries to open the LUKS container in /dev/sdc5 and wants a password.

This is the time where I want to have a german layout instead of the english-us one. I know how to change the layout in grub stage 2 but how do I change it in stage 1. Is this even possible?

OS is Debian Jessie.

XenGi
  • 103

2 Answers2

6

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"
Darky
  • 76
3

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

MariusMatutiae
  • 48,517
  • 12
  • 86
  • 136