You are not logged in.

#1 2021-01-13 19:55:35

equalizer876
Member
Registered: 2018-09-11
Posts: 59

GRUB keyboard layout wrong

On boot GRUB asks encryption passphrase. I can only use simple passphrases because GRUB uses en_US keymap. How can I make GRUB use other keyboard language?

Offline

#3 2021-01-13 21:15:42

equalizer876
Member
Registered: 2018-09-11
Posts: 59

Re: GRUB keyboard layout wrong

This procedure is too complicated and long. Isn't there a simpler approach? There are a lot of people not using en_US keyboards so why can't the GRUB project just simplify it?

Last edited by equalizer876 (2021-01-13 21:16:14)

Offline

#4 2021-01-14 15:44:19

momokrono
Member
Registered: 2016-10-27
Posts: 47

Re: GRUB keyboard layout wrong

What is the output of

# cat /boot/grub/grub.cfg | grep lang

?
Edit:
Also, did you include the keymap hook before the encrypt one?

Last edited by momokrono (2021-01-14 15:51:20)

Offline

#5 2021-01-14 16:21:04

seth
Member
Registered: 2012-09-03
Posts: 18,168

Re: GRUB keyboard layout wrong

GRUB asks encryption passphrase

https://wiki.archlinux.org/index.php/GR … pted_/boot

The crucial bit is actually whether /boot is encrypted (or really anything about the actually used encryption approach)
If it's not, changing the layout would frankly be trivially easy and should™ work anyway unless actively broken.

If it is, one needs to create a custom grub image as described in the posted link - which however seems to be too much effort for the OP.

Offline

#6 2021-01-14 19:19:16

equalizer876
Member
Registered: 2018-09-11
Posts: 59

Re: GRUB keyboard layout wrong

momokrono wrote:

What is the output of

# cat /boot/grub/grub.cfg | grep lang

?
Edit:
Also, did you include the keymap hook before the encrypt one?

# cat /boot/grub/grub.cfg | grep lang
  set lang=en_US

keymap hook is set before encrypt in mkinitcpio.conf . Is it even possible to manually change the "set lang=..." in /boot/grub/grub.cfg ?

/boot is on the same filesystem as / thus encrypted.

Last edited by equalizer876 (2021-01-14 19:21:51)

Offline

#7 2021-01-14 21:13:20

seth
Member
Registered: 2012-09-03
Posts: 18,168

Re: GRUB keyboard layout wrong

You can add stuff to /etc/grub.d/41_custom to have it incorporated by grub-mkconfig or just edit the grub.cfg by hand.
However, you need to decrypt /boot to get access to the grub modules and configuration and therefore need to provide a key and that means yo need to configure the core image if you want to provide that key w/ a custom keyboard layout.

You can try whether grub-install simply picks it up from there, /etc/grub.d/41_custom

…
insmod keylayouts
keymap /boot/grub/mylayout.gkb
…

/etc/default/grub

…
GRUB_TERMINAL_INPUT="at_keyboard"
…

but you will somehow™ have to alter the image to get a different layout at this stage.

Offline

Board footer

Powered by FluxBB