Page 1 of 1

Master Boot Record FUBAR

Posted: 2011-03-20 04:08pm
by Zaune
The title's probably self-explanatory. This situation is partly my fault for attempting to install a second OS without the benefit of proper backups (my external HD suffered a head crash and I haven't got the cash to replace it) and partly my landlord's for blithely assuring me that the recovery disk from his son's PC was just an OEM copy of XP when it really, really wasn't.
Anyone know how to fix this? The OS I'm attempting to recover is Ubuntu 10.10 using GNOME if that's relevant.

Re: Master Boot Record FUBAR

Posted: 2011-03-20 05:18pm
by Edi
You're going to need a bootable CD or USB drive with tools to unfuck that. OR at least back up your stuff if you can't.

If the disk has a hardware failure, the chances of getting anything done drop dramatically.

Re: Master Boot Record FUBAR

Posted: 2011-03-20 05:24pm
by Beowulf
If you just need to fix your windows MBR:
http://superuser.com/questions/88399/re ... ows-xp-mbr

If you want to fix GRUB, that's significantly more difficult.

Re: Master Boot Record FUBAR

Posted: 2011-03-21 02:14pm
by Zaune
I don't actually have a Windows MBR. This thing's an all-Linux machine, and this clusterfuck was an attempt to install Windows on the second hard drive for gaming. No hardware issue, thankfully, and I'd have the lost data recovered by now if I hadn't encrypted my home folder.
I do have the encryption key stored, thankfully. I'm just not entirely sure how I'm supposed to use it. Is using it to pull the data onto the spare drive and doing a clean reinstall likely to be any less time-consuming?

Re: Master Boot Record FUBAR

Posted: 2011-03-23 12:21am
by Skgoa
Its not that difficult:

1. download and burn a linux live cd
2. google the command to tell grub to repair itself
3. boot your computer using the live cd
4. tell grub to repair itself
5. reboot


Now, grub has a (imho) somewhat strange way of labeling drives/partitions, but if you just need to repair it, you shouldn't have any problems.


e/ If you plan to have both Linux and Windows on your computer, you will HAVE TO repair grub after installation, anyways.

Re: Master Boot Record FUBAR

Posted: 2011-03-26 07:32am
by Bounty
Grub's pretty good about repairing the MBR. Lord knows I've had to do it often enough. As long as it can identify your partitions it'll bang something usable together.

If your partition table's fucked too, you'll need to break out the hex editor and some pencils, but even that's doable.

From the Ubuntu forums:

1. Pop in the Live CD, boot from it until you reach the desktop.
2. Open a terminal window or switch to a tty.
3. Type "grub"
4. Type "root (hd0,6)", or whatever your harddisk + boot partition numbers are (my /boot is at /dev/sda7, which translates to hd0,6 for grub).
5. Type "setup (hd0)", ot whatever your harddisk nr is.
6. Quit grub by typing "quit".
7. Reboot.

Re: Master Boot Record FUBAR

Posted: 2011-03-26 08:22am
by Zaune
Update: After much struggling with several different proposed solutions that have only partially worked (including the one mentioned by Bounty) and a sinking feeling that I'm only making things worse, I have at last convinced the drive in question to boot directly into GRUB. Or rather GRUB2, it seems. After even more sodding about I eventually located this hopeful-sounding solution. Anyone got a more informed opinion on whether it's safe to attempt this, or should I just swallow my professional pride and take it to a professional?