Discussion:
the rootcause of the grub2 that can support USB keyboard
(too old to reply)
Sherry Zhang(BJ-RD)
2018-08-21 07:42:17 UTC
Permalink
Hi all,

Rencently, I have learned the GRUB2. And I have a question about it.

The first experiment:

Platform: i386-pc
Sata : MBR format

I have read the grub-2.02 source code and I find the core.img including the modules : ext2 part_msdos biosdisk
I delete the grub.cfg in the "/boot/grub/grub/cfg",so the system will enter the command-line of the grub.
So the grub only has modules as followings:
Name Ref count Dependencies
Minicmd 1
Normal 1 buf io,gettext,terminal,crypto,extcmd,boot
Gzio 0
Bufio 1
Gettext 1
Terminal 2
Crypto 2
Extcmd 2
Boot 2
Biosdisk 1
Part_msdos 1
Ext2 1 fshelp
Fshelp 2

But I have found the USB keyboard module-usb_keyboard.mod that I don't load ,
So why the usb keyboard can be used when I don't load usb modules?

Best regards,
Sherry Zhang



?????
?????????????????????????????????????????????????????
CONFIDENTIAL NOTE:
This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
Brendan Trotter
2018-08-22 04:16:46 UTC
Permalink
Hi,
Post by Sherry Zhang(BJ-RD)
But I have found the USB keyboard module-usb_keyboard.mod that I don't load ,
So why the usb keyboard can be used when I don't load usb modules?
A better question is, why does "module-usb_keyboard.mod" exist in the
first place? In theory, GRUB should be able to use whatever the
firmware provides to access key presses and shouldn't need a module at
all.

However, there were a few incredibly dodgy computers (mostly "late
1990s" time frame?) where the firmware expects a PS/2 keyboard and
firmware's keyboard support doesn't work with a USB keyboard. GRUB
probably provides a "module-usb_keyboard.mod" so that USB keyboards
will work properly on these incredibly dodgy computers.

Note: I'm not a GRUB developer or anything, I just know how much
computers can suck. ;-)

- Brendan

Continue reading on narkive:
Loading...