LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Need to kill MBR (https://www.linuxquestions.org/questions/linux-general-1/need-to-kill-mbr-821144/)

Galaxy_Stranger 07-20-2010 09:23 PM

Need to kill MBR
 
I've got a weird problem with my MBR, it seems.

I've got a 300gig drive that I dual-boot xp and fedora. I repartitioned a couple days ago and now booting is acting very strange.

At first, I got the Grub "command prompt". I tried setting everything up from there, but it would only see the xp partition and wouldn't set it up. At one point, I got everything working - as long as my xp cd was in the drive, then Grub would come up and I could access both operating systems.

I need to wipe out the MBR and everything else on the drive so I can start from scratch. What app should I use to do this?

AlucardZero 07-20-2010 09:39 PM

any OS install disk. just do a new install.

if you really want to wipe it beforehand, dd /dev/zero to the entire drive.

PTrenholme 07-20-2010 09:47 PM

First, your "distribution" setting (in the left panel of your post) claims that you're running an old, unsupported, Fedora release. (The oldest supported Fedora release is Fedora 12. And that for only a few more months.)

Second, rather than wiping/reinstalling, boot from a current Fedora installation disk and select the "linux rescue" boot option, do the suggested chroot and run grub-install. That should get you back up and running.

I think that the problem you're having is that GRUB is looking to boot from a partition that you've moved, since the GRUB MBR (for the old GRUB format used by Fedora) stores the physical boot partition information in the MBR. (The newer GRUB2 lets you use the UUID of the partition - among other things - in addition to the physical partition information.)

<edit>
Oh, to answer your original question, download and burn, for example, the SystemRescueCD, boot from it, and run parted on your hard drive. Enter the help command to see a list of options, and select the one to create a new DOS partition table. Then exit with write, and you'll have a wiped disk.
</edit>

Galaxy_Stranger 07-20-2010 09:47 PM

Thanks, Alucard, I'll try that.

But I've repartitioned about 3 times between xp and fedora and this problem hasn't gone away.

syg00 07-20-2010 09:55 PM

No need to do the entire drive add a "count=200" (arbitrary number) to ensure the XP isn't "found" by the installer software.

AlucardZero 07-20-2010 10:08 PM

1. Partition drive
2. Install XP to partition
3. Install Linux to other partition. Allow Grub to take over MBR.
4. Done. Modern Linux will autodetect XP and grub will give you both choices.

Galaxy_Stranger 07-25-2010 11:40 PM

Solution
 
My final solution was to replace the drive completely...

Reformatting/dd/writing zeros to the entire drive had no effect. Finally, I got out my "Ultimate Boot CD" and used the Western Digital "setup" software to configure the mbr. This, apparently, fixed the problem.

But all of this trouble has me think the drive is getting ready to die, so I just replaced it before I put anything of value on it.

Shouldn't writing zeros to the damn thing kill the mbr??

jiml8 07-26-2010 12:26 AM

Quote:

Originally Posted by Galaxy_Stranger (Post 4045323)
Shouldn't writing zeros to the damn thing kill the mbr??

Depends on how you did it. Show the exact command you used here and someone can answer the question definitely.


All times are GMT -5. The time now is 10:42 AM.