Master Boot Record FUBAR

GEC: Discuss gaming, computers and electronics and venture into the bizarre world of STGODs.

Moderator: Thanas

Post Reply
User avatar
Zaune
Emperor's Hand
Posts: 7540
Joined: 2010-06-21 11:05am
Location: In Transit
Contact:

Master Boot Record FUBAR

Post 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.
There are hardly any excesses of the most crazed psychopath that cannot easily be duplicated by a normal kindly family man who just comes in to work every day and has a job to do.
-- (Terry Pratchett, Small Gods)


Replace "ginger" with "n*gger," and suddenly it become a lot less funny, doesn't it?
-- fgalkin


Like my writing? Tip me on Patreon

I Have A Blog
User avatar
Edi
Dragonlord
Dragonlord
Posts: 12461
Joined: 2002-07-11 12:27am
Location: Helsinki, Finland

Re: Master Boot Record FUBAR

Post 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.
Warwolf Urban Combat Specialist

Why is it so goddamned hard to get little assholes like you to admit it when you fuck up? Is it pride? What gives you the right to have any pride?
–Darth Wong to vivftp

GOP message? Why don't they just come out of the closet: FASCISTS R' US –Patrick Degan

The GOP has a problem with anyone coming out of the closet. –18-till-I-die
User avatar
Beowulf
The Patrician
Posts: 10621
Joined: 2002-07-04 01:18am
Location: 32ULV

Re: Master Boot Record FUBAR

Post 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.
"preemptive killing of cops might not be such a bad idea from a personal saftey[sic] standpoint..." --Keevan Colton
"There's a word for bias you can't see: Yours." -- William Saletan
User avatar
Zaune
Emperor's Hand
Posts: 7540
Joined: 2010-06-21 11:05am
Location: In Transit
Contact:

Re: Master Boot Record FUBAR

Post 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?
There are hardly any excesses of the most crazed psychopath that cannot easily be duplicated by a normal kindly family man who just comes in to work every day and has a job to do.
-- (Terry Pratchett, Small Gods)


Replace "ginger" with "n*gger," and suddenly it become a lot less funny, doesn't it?
-- fgalkin


Like my writing? Tip me on Patreon

I Have A Blog
User avatar
Skgoa
Jedi Master
Posts: 1389
Joined: 2007-08-02 01:39pm
Location: Dresden, valley of the clueless

Re: Master Boot Record FUBAR

Post 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.
http://www.politicalcompass.org/test
Economic Left/Right: -7.12
Social Libertarian/Authoritarian: -7.74

This is pre-WWII. You can sort of tell from the sketch style, from thee way it refers to Japan (Japan in the 1950s was still rebuilding from WWII), the spelling of Tokyo, lots of details. Nothing obvious... except that the upper right hand corner of the page reads "November 1931." --- Simon_Jester
User avatar
Bounty
Emperor's Hand
Posts: 10767
Joined: 2005-01-20 08:33am
Location: Belgium

Re: Master Boot Record FUBAR

Post 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.
User avatar
Zaune
Emperor's Hand
Posts: 7540
Joined: 2010-06-21 11:05am
Location: In Transit
Contact:

Re: Master Boot Record FUBAR

Post 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?
There are hardly any excesses of the most crazed psychopath that cannot easily be duplicated by a normal kindly family man who just comes in to work every day and has a job to do.
-- (Terry Pratchett, Small Gods)


Replace "ginger" with "n*gger," and suddenly it become a lot less funny, doesn't it?
-- fgalkin


Like my writing? Tip me on Patreon

I Have A Blog
Post Reply