I have an Italian keyboard and I want to set up the correct layout in GRUB shell.
I found many tutorials online that make use of grub-kbdcomp or grub-mklayout,
but those commands don't work on my distribution.
How can I set the proper layout?
I have an Italian keyboard and I want to set up the correct layout in GRUB shell.
I found many tutorials online that make use of grub-kbdcomp or grub-mklayout,
but those commands don't work on my distribution.
How can I set the proper layout?
grub-kbdcomp is just a shell script that is a wrapper for the Debian ckbcomp utility and grub-mklayout. No Sabayon Linux Entropy package for ckbcomp exists, although there is a Gentoo Portage package which can be installed in Sabayon linux and used as shown below.
ckbcomp, install it via Portage.1.1 Install Gentoo's Portage overlay manager.
# equo install git
# equo install layman
1.2 Synchronise the Gentoo Portage package ebuild tree.
# emerge --sync # Do not update portage if told to do so.
1.3 Synchronise the Sabayon distribution's Gentoo Portage overlay package ebuild tree.
# layman -S
1.4 Add the Sabayon distribution's Gentoo Portage overlay.
# layman -a sabayon-distro
1.5 Synchronise the Sabayon distribution's Gentoo Portage overlay package ebuild tree.
# layman -S
1.6 Install sys-apps/ckbcomp via Portage as there is no Entropy package.
# emerge -1v ckbcomp # Ignore any Gentoo news items.
1.7 Tell Entropy what you did via Portage.
# equo rescue spmsync
Create a new sub-directory to store the GRUB keyboard layout file.
# mkdir /boot/grub/layouts
Convert the X11 keymap to the GRUB keymap. The X11 keymap /usr/share/X11/xkb/symbols/it must exist for this to work.
# ckbcomp it nodeadkeys | grub2-mklayout -o /boot/grub/layouts/it.gkb
Unknown keyboard scan code 0x54
Unknown keyboard scan code 0x65
Unknown keyboard scan code 0x7f
Append 'GRUB_TERMINAL_INPUT=at_keyboard' in /etc/default/grub.
# nano /etc/default/grub
# tail -n 1 /etc/default/grub
GRUB_TERMINAL_INPUT=at_keyboard
Add insmod and keymap lines as shown below.
# nano /etc/grub.d/40_custom
# tail -n 2 /etc/grub.d/40_custom
insmod keylayouts
keymap $prefix/layouts/it.gkb
Check what locales are available.
# locale --all-locales | grep -i it
Change/add locale (only) to /etc/default/sabayon-grub as shown below. Leave other entries, if any, in GRUB_CMDLINE_LINUX as they are.
# nano /etc/default/sabayon-grub
# grep locale /etc/default/sabayon-grub
GRUB_CMDLINE_LINUX="locale=it_IT dolvm rd.lvm.lv=sabayon_sabayon/swap rd.lvm.lv=sabayon_sabayon/root resume=/dev/mapper/sabayon_sabayon-swap splash vconsole.keymap=it rd.vconsole.keymap=it quiet"
Regenerate the grub.cfg file.
# grub2-mkconfig -o /boot/grub/grub.cfg
Check that grub.cfg has been modified accordingly:
# grep terminal_input /boot/grub/grub.cfg
terminal_input at_keyboard
# grep gkb /boot/grub/grub.cfg
keymap $prefix/layouts/it.gkb
# grep layouts /boot/grub/grub.cfg
insmod keylayouts
keymap $prefix/layouts/it.gkb
If the machine uses UEFI rather than PC BIOS, update the GRUB files in the EFI directory.
# grub2-install --efi-directory=/boot/efi
Reboot to check if the it keymap has been loaded for the GRUB shell.
# systemctl reboot