# [SOLVED] USB keyboard not working in Grub2 menu [Solved]

## stoffepojken

Hello!

My USB-keyboard does not work in Grub2 menu. It works in BIOS and when system starts. 

In my BIOS I have enabled legacy USB support.

Can you please help me finding out what is wrong?

emerge --info sys-boot/grub :

https://paste.pound-python.org/show/4lZVYS6gSjk1WyRkSSrs/

/boot/grub/grub.cfg :

https://paste.pound-python.org/show/5oRAYHOzcX8NiIF2ilRQ/Last edited by stoffepojken on Sun Sep 10, 2017 2:18 pm; edited 2 times in total

----------

## pjp

Hello,

My guess would be insufficient USB options in the kernel.

Take a look at the USB part of Activating required options in Configuring the Linux Kernel part of the installation handbook.

That should take care of it.

----------

## Jaglover

Confusing. Kernel is not loaded when Grub menu is displayed. Or I misunderstood something?

----------

## Fitzcarraldo

Have you tried adding GRUB_TERMINAL_INPUT="usb_keyboard" and GRUB_PRELOAD_MODULES="usb usb_keyboard ohci uhci ehci" (see note below) in /etc/default/grub and then the command 'grub-mkconfig -o /boot/grub/grub.cfg' to regenerate grub.cfg? That should add various additional 'insmod' lines in grub.cfg, for those GRUB modules.

Note: Those GRUB modules are in the directory /boot/grub/x86_64-efi/ if your PC has UEFI, or /boot/grub/i386-pc/ if your PC has PC BIOS.

----------

## saboya

Are you able to enter your BIOS with a USB keyboard?

----------

## Roman_Gruber

 *saboya wrote:*   

> Are you able to enter your BIOS with a USB keyboard?

 

yes it does

 *Quote:*   

> My USB-keyboard does not work in Grub2 menu. It works in BIOS and when system starts. 

 

I usually reuse linux mint bootloader. I use linux mint to isntall gentoo and than purge it or keep it. Much less hassle to deal with it later regarding a bootloader and such.

You may check if there are any loadable modules regarding keyboards for your bootloader. AFAIK grub2 loads many modules, you see them when you read the config file. It may also depends on how you have build grub2 => therefore my reference to reuse an existing binary distro with a well known working bootloader. +benefit of a working browser + net => later you can purge the binary distro with some tools. => gparted for example, remove, grow partitions.

----------

## stoffepojken

 *Fitzcarraldo wrote:*   

> Have you tried adding GRUB_TERMINAL_INPUT="usb_keyboard" and GRUB_PRELOAD_MODULES="usb usb_keyboard ohci uhci ehci" (see note below) in /etc/default/grub and then the command 'grub-mkconfig -o /boot/grub/grub.cfg' to regenerate grub.cfg? That should add various additional 'insmod' lines in grub.cfg, for those GRUB modules.
> 
> Note: Those GRUB modules are in the directory /boot/grub/x86_64-efi/ if your PC has UEFI, or /boot/grub/i386-pc/ if your PC has PC BIOS.

 

That worked!

Thank you all for your help. Marking as solved.

----------

