Ubuntu broke my MBR!

When installing Ubuntu on to a USB stick it will overwrite your system disk MBR. This is a significant problem for those with multi-boot or a Windows installation (as the system disk can no longer boot without putting in the USB stick each time!). The following is the account of my little adventure in to repairing my laptop disk MBR…

EDIT: At step 7 of the installation, click on the advanced settings and select the drive on which the boot manager should be installed. This has been verified using Ubuntu 8.10rc1. I don’t remember seeing this in the menu of 8.04, maybe they should put something so important in a more prominent place (or I should at least look harder)!

The problem

In a nutshell (please forgive the amateur dramatisation):

  • You make the reasonable assumption that: because you’re installing Ubuntu to a USB stick and not the system partition, it will put GRUB on to the USB stick so you can boot it as a USB-HDD.
  • Upon rebooting the system, you find that Ubuntu has OVERWRITTEN your system disk boot partition – uh oh! Inexplicably, Ubuntu still installs GRUB to the USB stick, even though it has modified the system MBR. Booting is now impossible without the USB stick plugged in! (oh dear, oh dear!)
  • After furious searching, you can’t find a working XP installation disk so try to use this little guide on downloading the recovery console to rebuild your MBR.
  • Rebooting once again, you find the recovery console BSODs before you can even touch the fixmbr command.
  • Getting desperate now, you Google again for anyone else who might have the same problem but find they’re using Vista and this is inapplicable to your situation.
  • You spend the next hour facepalming until your hand starts to bleed …

The solution (hurrah!)

Fortunately, Google did come up trumps in the end. A little tool know as MbrFix can be run from within Windows to fix the problem and dispose of the broken GRUB once and for all!

If you don’t fancy reading through the entire manual, here is my 3-step fix:

  1. Download a copy of MbrFix.exe
  2. Extract it anywhere on your hard disk.
  3. Run the program (as admin) with these parameters:

    MbrFix /drive 0 fixmbr /yes

After restarting, your system should boot Windows as normal!