Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a PC with Ubuntu Hardy installed. The machine boots fine unless my USB flash card reader (one of those N-in-1 readers by MediaGear) is plugged in at startup. If the reader is plugged in, the boot process proceeds as normal until it gets to the screen that says "Starting up ...". At that point it just hangs forever.

To work around this I currently leave the reader unplugged when booting, and then plug it back in after I see that Ubuntu is actually starting. This is annoying though, especially when I reboot the machine (typically for updates), forget to unplug the reader, and walk away only to come back hours later to find the machine hung.

My guess is that the presence of the reader is confusing Grub about where to find the kernel. The weird thing is that Grub is on the same drive as the kernel I want it to boot so clearly the drive is still readable even when the flash card reader is plugged in. Is there some way I can tell Grub to never go looking on the flash card reader?

share|improve this question
1) can you post the relevant sections of your menu.lst? 2) when this happens, is there a card in the reader? 3) at the Grub prompt, what devices are seen? (just type "root " or another command and hit TAB to get the auto-completion list.) 4) what are the contents of /boot/grub/ – quack quixote Mar 19 '10 at 20:17
(Un)fortunately, I am no longer able to reproduce this problem. It mysteriously went away. I've also since upgraded to Lucid. – Laurence Gonsalves Aug 2 '10 at 18:55
up vote 0 down vote accepted

I suspect you're catching a conflict between your system hard drive and the card reader. Grub boots and finds its configuration OK because the BIOS properly boots from the hard drive. But, then Grub enumerates the drive devices, and the flash card reader gets the devicename that the hard drive should be getting. So when Grub goes to boot the OS, it's looking at the wrong device.

If this is the correct diagnosis, you can fix it manually, in the Grub menu, by editing the boot entry like this. At the Grub menu, select the kernel to boot, and press E. If your boot entry says:

title           Ubuntu, kernel 2.6.20-15-generic
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.20-15-generic root=UUID=3630dd43-f9f9-40b1-8a5f-72c13f2b309c ro quiet splash
initrd          /boot/initrd.img-2.6.20-15-generic

... you'll need to change the root line to point to the real device:

root            (hd1,1)

This may take some trial-and-error, or as I mentioned in the comment, playing around with Grub's command line to see what devices it detects. The correct device will be hdX, where X is some number (you shouldn't need to change the partition number, just the X). That should allow you to boot correctly, but you'll have to undertake those manual steps each time.

Fixing it permanently may require adding a line for the flash card device to your /boot/grub/ file, or creating one if it doesn't exist. Alternately, if you'll leave this device connected permanently, you can tweak your boot entries in /boot/grub/menu.lst to point to the new device.

If you'll post your configuration files along with what devices Grub sees, we can probably assist further.

share|improve this answer
As mentioned above, the problem mysteriously went away, but I've accepted this answer since it seems reasonable... :-) – Laurence Gonsalves Aug 2 '10 at 18:55

Change the BIOS boot order to something closer to what you would expect. Hard drives first, then other devices. Seems that the hard drive mapping (hd#) to physical device mapping occurs when the BIOS inits.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .