When I boot in GRUB2 and press c, I have access to GRUB shell.

How to change the keyboard layout (language) of this GRUB shell?

Note that I'm booting an Ubuntu VM inside Virtualbox.

share|improve this question
up vote 1 down vote accepted

First, check that you're using GRUB 2 (GRUB 0.x works differently).

grub-install --version

Generate a GRUB keyboard layout file. Below is the command for a french keyboard. For other languages, check /usr/share/X11/xkb/symbols/. Filename choice is not important (you can change bepo).

sudo grub-kbdcomp -o /boot/grub/bepo.gkb fr

Edit /etc/default/grub with root rights to have:

#GRUB_HIDDEN_TIMEOUT=0
GRUB_TERMINAL_INPUT="at_keyboard"

Edit /etc/grub.d/40_custom with root rights to have:

#!/bin/sh
exec tail -n +3 $0

insmod keylayouts
keymap /boot/grub/bepo.gkb

Finally:

sudo update-grub

Note: Forget immediately about using the Shift key to display GRUB menu! It may be normal that terminal_input at_keyboard make this key not work anymore. So make sure #GRUB_HIDDEN_TIMEOUT=0 is properly commented.

Credits: Archlinux.fr Wiki GRUB: Configuration_du_clavier (french)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.