#1860 Issue closed: keyboard input not working on real metal machines during restore/menu choices

Labels: support / question, fixed / solved / done

slopesoarer opened issue at 2018-07-12 19:21:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.4 / 2018-06-21
    (..same in the newer stable version there ..)

  • OS version ("cat /etc/rear/os.conf" or "lsb_release -a" or "cat /etc/os-release"):

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
  • ReaR configuration files ("cat /etc/rear/site.conf" or "cat /etc/rear/local.conf"):
# Default is to create Relax-and-Recover rescue media as ISO image
# set OUTPUT to change that
# set BACKUP to activate an automated (backup and) restore of your data
# Possible configuration values can be found in /usr/share/rear/conf/default.conf
#
# This file (local.conf) is intended for manual configuration. For configuration
# through packages and other automated means we recommend creating a new
# file named site.conf next to this file and to leave the local.conf as it is. 
# Our packages will never ship with a site.conf.

#OUTPUT=USB
OUTPUT=ISO
#BACKUP_URL=sftp://root@oldtokos.kosy.sbg.ac.at/nas/panther-rear
#BACKUP=BAREOS
BACKUP=NETFS
NETFS_URL=sshfs://root@oldtokos.cosy.sbg.ac.at/nas/panther-rear
#BAREOS_CLIENT=bareos-fd
#BAREOS_FILESET=Full
#USB_DEVICE=/dev/sdb1

...
  • System architecture (x86 compatible or POWER and/or what kind of virtual machine):
    x86_amd64

  • Are you using BIOS or UEFI or another way to boot?
    BIOS

  • Brief description of the issue:
    keyboard fails after boot, I can not choose any numbers or options wher restoring on a bare-metal machine. keyboard input works though (selecting numbers from menu), when I choose a virtual/libvirt/kvm machine as target. On a real machine the keyboard is dead after boot during select..

  • Work-around, if any:
    .. still looking for one ..

jsmeix commented at 2018-07-13 07:30:

@slopesoarer
I am really not at all an expert for keyboad issues,
nevertheless I try some mostly 'blind' guesses:

What kind of keyboard do you use on your virtual machine
compared to your bare-metal machine?

On my KVM virtual machines I have the keyboard
as virtual input device of type "Generic PS2 Keyboard"
while on my real hardware I use USB keyboards.

To use any USB device you need some USB kernel modules.
Perhaps some kernel modules are missing?

Cf. https://github.com/rear/rear/pull/1359#issuecomment-300687841

In particular regarding USB keyboards have a look
at the comments in https://github.com/rear/rear/pull/1244

Accordingly the usual USB kernel modules should be there by default, cf.
https://github.com/rear/rear/commit/166bf57abf282e797a8412ab3d2f11a0bb165526

Perhaps you need some more special kernel modules for your keyboard?
In this case see the config variables MODULES and MODULES_LOAD
in usr/share/rear/conf/default.conf

FYI:
In general it does not work when you made the recovery ISO image
on one kind of machine (e.g. on a virtual machine)
and try to use that on another kind of machine.
I.e. in general it does not work when you boot a ReaR recovery system
that was created by rear mkrescue/mkbackup on one kind of machine
on another kind of machine.
In general the ReaR recovery system is specific for the machine
where it was created, see the section
"Fully compatible replacement hardware is needed" in
https://en.opensuse.org/SDB:Disaster_Recovery

(unknown) commented at 2018-07-16 14:00:

I was having a similar problem on a real-metal machine: USB keyboard worked during boot, but once I got to the ReaR login, I couldn't do anything. Plugging in a PS2 keyboard solved my issue. THANK YOU @jsmeix! If you hadn't mentioned it, I never would have thought to plug in a PS2 keyboard, since the USB keyboard worked for all the boot menus.

I hope this helps somebody else!

gdha commented at 2018-07-16 14:46:

@slopesoarer Thank you for the feedback. Out of curiosity which loadable module do you need for your USB keyboard? And, was this copied to the ReaR rescue image?

jsmeix commented at 2018-07-17 07:46:

In general I think in such cases (i.e. kernel modules in the ReaR recovery system)

MODULES=( 'all_modules' )

is a fail safe setting, cf. usr/share/rear/conf/default.conf
perhaps if needed plus explicit specifying MODULES_LOAD

@blissb2599
good to know that my "mostly 'blind' guesses" helped at least you.
I appreciate your feedback because it helps me to better understand things
so that next time I could do some "less 'blind' guesses".

@slopesoarer
because we got no feedback from you
I assume "no news is good news" so that
I assume the issue is also solved for you.

slopesoarer commented at 2018-07-17 09:58:

Hi!

Thanks,
Sorry for my late reply..
MODULES=('all') in /usr/share/conf/default.conf did the trick. I wanted to be more specific about the actually needed modules for an USB keyboard to work, therefore I have delayed my answer. I think 'usbhid' should be a 'must-have' on the loadlist. It would be fine, if loaded by default in future, since usb keyboards are becoming more and more the dominant species here and PS2 could be extinct soon... ;-))

jsmeix commented at 2018-07-17 11:43:

@slopesoarer

In
https://github.com/rear/rear/blob/master/usr/share/rear/conf/GNU/Linux.conf
there is already usbhid so that this one should get already included
in the recovery system by default.

Furthermore I think the udev magic plus module dependencies and
whatever else module loading magic should normally load the neded modules
depending on what hardware is present so that a USB keyboard should
normally "just work" - provided all needed modules exist.

This would also explain why MODULES=( 'all_modules' ) helped
(I assume your MODULES=('all') is a typo) without the need
to explicitly load modules via e.g. MODULES_LOAD=( usbhid ).

FYI:

What USB related modules are loaded on my openSUSE Leap 42.3
system on real hardware where I use a USB keyboard (and a USB printer):

# lsmod | grep usb

usblp                  20480  0 
usbhid                 53248  0 
usbcore               266240  6 usblp,ehci_hcd,ehci_pci,usbhid,xhci_hcd,xhci_pci
usb_common             16384  1 usbcore

What USB related modules are loaded on my SLES12 system
on a QEMU/KVM virtual machine where I use a
virtual input device of type "Generic PS2 Keyboard":

# lsmod | grep usb

usbcore               262144  3 uhci_hcd,ehci_hcd,ehci_pci
usb_common             16384  1 usbcore

and what modules get included in the recovery system by default
when I run rear mkrescue on that SLES12 virtual machine
(with KEEP_BUILD_DIR="yes"):

# pushd /tmp/rear.jq2VdJtPpGuEJAa/rootfs/lib/modules/ ; find | grep usb ; popd
./4.4.73-5-default/kernel/drivers/hid/usbhid
./4.4.73-5-default/kernel/drivers/hid/usbhid/usbhid.ko
./4.4.73-5-default/kernel/drivers/usb
./4.4.73-5-default/kernel/drivers/usb/host
./4.4.73-5-default/kernel/drivers/usb/host/xhci-hcd.ko
./4.4.73-5-default/kernel/drivers/usb/host/ohci-hcd.ko
./4.4.73-5-default/kernel/drivers/usb/host/ehci-pci.ko
./4.4.73-5-default/kernel/drivers/usb/host/ehci-hcd.ko
./4.4.73-5-default/kernel/drivers/usb/host/uhci-hcd.ko
./4.4.73-5-default/kernel/drivers/usb/common
./4.4.73-5-default/kernel/drivers/usb/common/usb-common.ko
./4.4.73-5-default/kernel/drivers/usb/core
./4.4.73-5-default/kernel/drivers/usb/core/usbcore.ko
./4.4.73-5-default/kernel/drivers/usb/storage
./4.4.73-5-default/kernel/drivers/usb/storage/ums-freecom.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-cypress.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-realtek.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-alauda.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-isd200.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-usbat.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-eneub6250.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-karma.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-jumpshot.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-datafab.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-sddr09.ko
./4.4.73-5-default/kernel/drivers/usb/storage/uas.ko
./4.4.73-5-default/kernel/drivers/usb/storage/usb-storage.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-onetouch.ko
./4.4.73-5-default/kernel/drivers/usb/storage/ums-sddr55.ko
./4.4.73-5-default/kernel/drivers/usb/class
./4.4.73-5-default/kernel/drivers/usb/class/cdc-wdm.ko
./4.4.73-5-default/kernel/drivers/net/usb
./4.4.73-5-default/kernel/drivers/net/usb/cdc_eem.ko
./4.4.73-5-default/kernel/drivers/net/usb/kaweth.ko
./4.4.73-5-default/kernel/drivers/net/usb/sierra_net.ko
./4.4.73-5-default/kernel/drivers/net/usb/usbnet.ko
./4.4.73-5-default/kernel/drivers/net/usb/dm9601.ko
./4.4.73-5-default/kernel/drivers/net/usb/qmi_wwan.ko
./4.4.73-5-default/kernel/drivers/net/usb/catc.ko
./4.4.73-5-default/kernel/drivers/net/usb/cdc_mbim.ko
./4.4.73-5-default/kernel/drivers/net/usb/r8152.ko
./4.4.73-5-default/kernel/drivers/net/usb/ax88179_178a.ko
./4.4.73-5-default/kernel/drivers/net/usb/pegasus.ko
./4.4.73-5-default/kernel/drivers/net/usb/hso.ko
./4.4.73-5-default/kernel/drivers/net/usb/net1080.ko
./4.4.73-5-default/kernel/drivers/net/usb/gl620a.ko
./4.4.73-5-default/kernel/drivers/net/usb/cdc_ether.ko
./4.4.73-5-default/kernel/drivers/net/usb/asix.ko
./4.4.73-5-default/kernel/drivers/net/usb/rndis_host.ko
./4.4.73-5-default/kernel/drivers/net/usb/rtl8150.ko
./4.4.73-5-default/kernel/drivers/net/usb/smsc95xx.ko
./4.4.73-5-default/kernel/drivers/net/usb/mcs7830.ko
./4.4.73-5-default/kernel/drivers/net/usb/cdc_ncm.ko
./4.4.73-5-default/kernel/drivers/net/usb/plusb.ko
./4.4.73-5-default/kernel/drivers/net/usb/zaurus.ko
./4.4.73-5-default/kernel/drivers/net/irda/irda-usb.ko
./4.4.73-5-default/kernel/drivers/net/wireless/libertas/usb8xxx.ko

[Export of Github issue for rear/rear.]