[SGVLUG] Grub/keyboard issue (USB?) [longish]

Emerson, Tom Tom.Emerson at wbconsultant.com
Tue Sep 6 16:45:58 PDT 2005


Over the weekend I upgraded my system to SuSE 9.3 [yeah, I know 10.0 is right around the corner] and now I have an "oddity" to my system -- grub doesn't recognize my keyboard unless I physically unplug/replug it AFTER the system has started.  (makes it rather difficult to switch OS's)

But the strange part is "it worked" the first time I re-installed, and now it doesn't -- even when booting from the installation DVD!

Part of the reason I re-reinstalled had to do with the strange way I've set up my system.  Paraphrasing the LVM/partitioner somewhat, I basically have my system set up as follows:

   primary IDE master: Sony DVD-RW 700 [dual layer, cd writer, etc.]
   primary IDE slave : LS-120 drive
   secondary IDE masr: 20 GB drive w/windows XP [this was actually added later]
   Third IDE [sata]  : 200 GB drive linux raid
   fourth IDE/sata   : 200 GB drive linux raid
   fifth IDE/sata    : 160 GB drive windows [extends C: ?]

Under SuSE 9.1, these were identified as hda, hdb, hdc, hde, and so on.  Under SuSE 9.3, the Sata drives are now sda, sdb, & sdc while the IDE devices are still hda, hdb, & hdc.

The two "linux raid" drives were partitioned identically:

   part 1: "one track" [30+mb] raid MIRRORED, /dev/md0 mounted as /boot
   part 2: approx 1/2 drive: raid STRIPED, /dev/md1
   part 3: .25 gb, "swap"
   part 4: remainder: raid striped, /dev/md2

the two striped partitions are then gathered into a "logical volume" as /dev/vg00; this is then partitioned-as-needed into /dev/vg00/root, /system (usr), /home, /backup, /log, and so on.  Overall, it works quite well, though in some ways it is still "working without a net" as recently I had a "problem" wherein I lost most of my /home partition [ok, "all" of my /home partition --every top-level directory in /home/tom was semi-randomly renamed to a string of digits and unceremoniously dumped in /home/lost+found].  Fortunately I had a relatively recent "hot backup" of my home directory on a physically different server, so the actual loss was minor, if anything, and in fact when I did get around to recovering the data, all I really decided I wanted to keep was stuff in ~/Mail and a handful of settings from ~/.kde -- everything else is either stuff I have "several copies of" [videos I've collected over the years -- I have most of these on my laptop anyway] or is stuff I can re-install [Unreal Tournament, for example, or programs downloaded from the 'net]

But back to the problem at hand: when I first installed this, I didn't actually "format" the /dev/md0 raid [even though mirrored, it is essentially a read-only partition, and theoretically I can "boot" from either] As a result, I ended up with some strange mapping of drives (/boot/grub/device.map) and a truly odd thing: three copies of "linux"  one labeled "suse 9.3", then two more as "linux on /dev/sda1" and "linux on /dev/sdb1" -- theoretically the first two are identical, but in practice one of them worked when booting "from the DVD", and a different one worked when booted from the hard drive directly.

A couple of other things weren't quite right either, so I re-installed again.  This time I did format the /boot partition, so there shouldn't be any interference with "old" stuff, however now the keyboard doesn't work unless/until I pull it out and re-insert it.

The keyboard is a wireless keyboard [logitech] which I got at the swapmeet for $20 [includes a wireless optical mouse -- I later realized the reason it was so inexpensive was that it was a GREEK keyboard]  This is actually a USB/pseudo-ps/2 keyboard: it has a regular USB plug which is intended to be the primary connection, but also has a separate ps/2 mouse plug and a "dongle" converter to convert USB to PS/2 (!)  When plugged in as "USB", I cannot get to the BIOS screen [this is/was how I switched OS's -- swapped the boot order in the BIOS] so I generally use the ps/2 dongle.

--- dumb thought just entered my head ---

I *might* have the mouse & keyboard "plugs" backwards [i.e., plugged the mouse in the keyboard socket and vice versa] -- even though these are the "standard" green & purple plugs, I now have my system arranged such that I "feel" my way to the back to plug things in, so I can't see if I'm plugging the green plug in the purple socket...

I seem to recall that the system will "recognize" a device plugged in after-the-fact [though you really shouldn't "hotplug" ps/2 devices] but might not recognize a keyboard as a mouse or a mouse as a keyboard when first booted -- can anyone back up that theory?  [of course, I'll check once I'm home...]

In any case, during the install I tried to use it "as USB" (because I got GRUB working to actually boot windows from the "other" drive, so I didn't need to do the BIOS switheroo), but eventually gave up as I realized that "at grub boot time", USB might not be initialized -- long story short here is I didn't pay attention to which plug is which...

--- /dumb thought ---

regardless of the plug issue, there is that last tiny issue I alluded to: at "boot" time, within grub, is it even possible to use USB keyboards?  does this need to be added to "mkinitrd" [I did anyway as that is easy to configure in Suse -- added usbcore, hid, & ohci/ehci -- I think those are all I would need, right?]  Perhaps compiled directly in Grub? [is that possible?]  Or is there perhaps a BIOS setting I should look into (which might also help the fact I can't get the BIOS's attention during boot...)



More information about the SGVLUG mailing list