Bug#615831: [PATCH 2/2] Load modules for USB keyboard if no keyboard is present at panic
USB modules are not normally loaded at break=top time but since USB keyboards are very common we should take the effort to try to load extra kernel modules at break (=panic) time. This patch closes #615831 and has been adapted from comments mentioned in https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/229732 and tested on a HP ProLiant MicroServer that lacks a PS2 port completely. --- scripts/functions |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/scripts/functions b/scripts/functions index 0a02f04..653581d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -46,6 +46,12 @@ panic() fi modprobe -v i8042 modprobe -v atkbd + if ! grep KBD port /sys/class/input/input*/device/description /dev/null 21; then + modprobe -v ehci-hcd + modprobe -v uhci-hcd + modprobe -v ohci-hcd + modprobe -v usbhid + fi REASON=$@ PS1='(initramfs) ' /bin/sh -i /dev/console /dev/console 21 } -- 1.7.2.5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#615831: [PATCH 2/2] Load modules for USB keyboard if no keyboard is present at panic
On Wed, 01 Jun 2011, Timo Juhani Lindfors wrote: USB modules are not normally loaded at break=top time but since USB keyboards are very common we should take the effort to try to load extra kernel modules at break (=panic) time. This patch closes #615831 and has been adapted from comments mentioned in https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/229732 and tested on a HP ProLiant MicroServer that lacks a PS2 port completely. --- scripts/functions |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/scripts/functions b/scripts/functions index 0a02f04..653581d 100644 --- a/scripts/functions +++ b/scripts/functions @@ -46,6 +46,12 @@ panic() fi modprobe -v i8042 modprobe -v atkbd + if ! grep KBD port /sys/class/input/input*/device/description /dev/null 21; then sorry for beeing an annoying bastard, but grep assumes busybox on board for file in /sys/class/input/input*/device/description; do if [ ! -f $file ]; then modprobe fi done but looking around I had a real trouble to find a box beside my laptop with a PS/2 keyboard attached and it showed the following cat /sys/class/input/input*/device/description i8042 KBD port cat /sys/class/input/input*/device/driver/description AT and PS/2 keyboard driver as I didn't want to continue my 1 hour search for an eventual PS/2 mouse, and eventual combinations of the two. I just applied your patch without the check to the branch timo/panic + modprobe -v ehci-hcd + modprobe -v uhci-hcd + modprobe -v ohci-hcd + modprobe -v usbhid + fi REASON=$@ PS1='(initramfs) ' /bin/sh -i /dev/console /dev/console 21 } thank you. -- maks -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#615831: [PATCH 2/2] Load modules for USB keyboard if no keyboard is present at panic
maximilian attems m...@stro.at writes: as I didn't want to continue my 1 hour search for an eventual PS/2 mouse, and eventual combinations of the two. I just applied your patch without the check to the branch timo/panic Thanks! -Timo -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#615831: [PATCH 2/2] Load modules for USB keyboard if no keyboard is present at panic
USB modules are not normally loaded at break=top time but since USB keyboards are very common we should take the effort to try to load extra kernel modules at break (=panic) time. This patch closes #615831 and has been adapted from comments mentioned in https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/229732 and tested on a HP ProLiant MicroServer that lacks a PS2 port completely. Signed-off-by: Timo Juhani Lindfors timo.lindf...@iki.fi diff --git a/scripts/functions b/scripts/functions index af49e45..3c95b55 100644 --- a/scripts/functions +++ b/scripts/functions @@ -37,6 +37,20 @@ try_modprobe() modprobe $1 } +kbd_handler_exists() +{ + local line + + while read line; do + case $line in + H:*kbd*) + return 0 + ;; + esac + done /proc/bus/input/devices + return 1 +} + panic() { if command -v chvt /dev/null 21; then @@ -52,6 +66,13 @@ panic() fi try_modprobe i8042 try_modprobe atkbd + if ! kbd_handler_exists; then + try_modprobe ehci-hcd + try_modprobe uhci-hcd + try_modprobe ohci-hcd + try_modprobe usbhid + fi + REASON=$@ PS1='(initramfs) ' /bin/sh -i /dev/console /dev/console 21 } -- 1.7.2.3 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org