Friday, October 15, 2010

Solving the dreaded Gigabyte "Won't boot from USB" problem

As mentioned in this post, I just did a fresh install of Ubuntu 10.04 "Maverick Meerkat". I mentioned two fairly major problems I had with the Ubuntu installer in that post. I also had another problem, but this one isn't Ubuntu related.
I had chosen to install from a USB key, but what I had forgotten is that the motherboard in the PC is a Gigabyte motherboard, and it doesn't like booting from USB. This is a common problem with Gigabyte motherboards - just Google for Gigabyte and "boot from USB", and you'll see many variations of "can't boot from USB", "won't boot from USB", "unable to boot from USB", etc, etc. What happens is that the motherboard just completely ignores the USB key; effectively, it's like it isn't there.

Unfortunately, there isn't a solution to be found in any of those posts. Or at least I ran out of patience before I found one, although it's clear that the problem is to some extent USB drive dependent - Gigabyte motherboards seem to like some drives, others not. So rather than continue to go through endless posts that don't offer solutions, I started playing around. What I found was:
  • With any other drive in the machine, even if the boot from the drive was disabled in BIOS, the Gigabyte motherboard would still ignore the USB key and boot from the other drive;
  • With all other drives physically unplugged, boot would fail with a "Insert boot disk and press enter" message. The light on the USB key didn't even flicker at any point in the process, indicating that the USB key wasn't even being seen;
  • However, that was where things got interesting. What I found was that if I then unplugged the USB key, and plugged it in again, then pressed enter, the USB key was recognized, and the machine booted.
Now this is a step in the right direction. If you don't have any other bootable drives in the machine, then you can just follow that procedure.  Problem is what if you do have other drives in the machine? In my case, the intention was to install Ubuntu on a dual booted drive, so having a bootable drive in the machine was required, and the there wasn't any way to get to the "Insert boot disk" prompt - the machine just booted from the drive I wanted to install Ubuntu to.

The Solution

Thinking about this, the USB key only being recognized if it was unplugged and then plugged in again suggests that somehow, if the USB key is inserted at the time the machine is powered up, the motherboard gets into a mode where it doesn't recognize the key and it gets ignored until a operating system driver starts up. But later in the boot cycle, the motherboard does seem to be able to recognize it. So what I did was simple:
  1. I started the machine with the USB key unplugged;
  2. Once the machine had got through the first parts of its boot sequence, I plugged the key in, then hit the F12 key to bring up the boot menu. And on the third try, there the USB key was, on the list of hard drives. And it booted fine!
Two thing to note here - what I found worked, for me anyway, was to plug the USB key in just after the BIOS displayed the list of PCI devices, and just as it gave its "Verifying DMI pool" message. Secondly, note that the USB key appears on the list of hard drives.

Now I must admit, plugging the USB key in during the boot sequence is neither elegant or reliable - you'll probably have to try it a few times - but it worked for me.

4 comments:

RaZ said...

God, thanks for your tip. Gigabyte motherboards are a huge pain in the ass for USB boot. I can't believe that in 2010 we are reduced to plug our usb keys ata certain time for them to work.

Chris said...

Anyone else looking for a solution to this I found that with an F8 bios update I could not boot from a USB stick, when I down graded to F6 I could. NFI why...just telling that it works.

Ferda said...

I can recommend GA-EP35-DS4. Gigabyte, but no problems with booting. Or maybe it was becasue I used unetbootin instead of manually syslinuxing the USB stick.

--- Ferda

rtalcott said...

I have 4 ma785gm-us2h boards...all booted from usb until I upgraded 3 to the F12A BIOS so I could use a few more cpu's...the 3 upgraded boards lost their ability to boot via usb the one board that I did not upgrade will boot from the same usb that the other three will not.

rt