Page 1 of 1

How to fix a borked grub install?

Posted: Sat May 12, 2012 4:26 pm
by XMEN Ashaman DTM
Any help?

Here's the situation: I had a windows partition, and a linux partition. I reformatted the windows partition and thought I updated grub to point to the correct boot device and partition.


I then found out after mounting the disk with a live cd that the linux install, boot files, and partition it points to were intact.

So I reinstalled grub, and it supposedly found the right place to mount my linux install.

Reboot, hard disk not found.

It's not a controller (or other hardware) issue. I've run multiple diagnostics using the motherboard firmware. They all come back clean. And I can see the disk and ext4 partitions on it when I mount it using a linux live cd.


I'm thinking I accidentally destroyed my MBR, but I thought that would get fixed by during the grub install, no?

Anyways, help is much appreciated. I'm not sure I know the exact question to ask google to find the answer I need.

Posted: Sat May 12, 2012 5:04 pm
by XMEN Gambit
No, a grub install won't fix the MBR by default. Sounds like that might be your solution. You did pretty much what I would have.

Posted: Sun May 13, 2012 2:34 am
by XMEN Ashaman DTM
FINALLY got it fixed and grub now points to the right device and everything.


The problem I was running into had to do with the fact that the linux install I have is 64 bit, and the live cd I was running was a 32 bit distro.

I don't know why chroot didn't toss out a bunch of errors, or why nothing complained when I would mount the partition and reinstall/update grub.

Heck, I even found a neat tool that reinstalls your MBR and/or grub if you ever need it. (boot-repair) from the ubuntu repository.

Now I need to go back and make sure that the deleted windows partition can be reformatted or my current partition extended (I know, risky after what I've been through.)

Yay! Only took two nights of tinkering and I learned about some new tools (and that you must match the bit-ness of tools!)


Oh yeah, ended up using my ubuntu live cd (from a usb thumb drive) just to make sure I had the right bit-ness.