Skip to main content

How to simulate MBR damage?

I was Linux Admin for serveral years, with over 20 linux boxes, never have problem with MBR failure, the question is: how to simulate one? so that I can have experience to fix it?

Being new to town, anyone have a hint?

try installing windows xp

try installing windows xp half way. I guess that would make a mess of your old one.

Hi! You can make a partition

Hi!

You can make a partition on your hard disk and install another linux distribution, this new distribution will install grub in the MBR sector, i.e. it will overwrite the original grub installation.

(Better for this example, if you install a linux distribution capable of recognize another linux version already installed and add it to the new grub menu.lst (I know that Ubuntu can do that...). Recently, I installed FEDORA in a computer than already has UBUNTU, and then I had to do a lot of things in order to see my UBUNTU partition again in the Grub menu).

Returning to your question, now you can login in your original partition and format the partition where you have installed the new linux (you can use a disk partition tool, like parted), so when your computer restart, grub will show you and error message. (I guess...)

Now you have to fix your MBR....

Another form... is making a new partition and install windows :-( .... that will overwrite the MBR and you will not see your grub again... so you have to fix your MBR...

If you have already installed windows in one partition (dual boot with linux) you can execute in the console fdisk /mbr or fixmbr (winXP), I don't know the command in Windows Vista. This command will overwrite the MBR sector... i.e. it will erase grub... and you have to fix your MBR....

The last way that I can imagine is having a dual boot windows/linux use partition magic or similar to format the linux partition... when you restart the machine, you will see the grub error message... so you have to use a rescue disk to enter to windows and fix the mbr....

Good luck!

Maria C. Bessega

fixing a MBR

Hi, yes, it is useful to know how to fix a broken MBR, although it's a quite rare problem... See my post on http://techm4sters.org/forum/index.php?topic=202.0 :) It generally consist of manipulating the 512 first bytes of a bootable drive using the 'dd' utility. The GRUB shell can also be used, with it's 'root (hd?,x)' and 'setup(hdx)' builtins.

Actually I personally wouldn't try anyhow to break it ^^ liveCDs can be used if the computer is in a non-bootable state.

bsfc

fixing a MBR

Actually I personally wouldn't try anyhow to break it ^^ liveCDs can be used if the computer is in a non-bootable state.

-- i agree on this. But if you really want to tinker with your system, and as long as you have liveCDs, then i guess its ok :)

SPAM LINK REMOVED

fixing a MBR

Hi I founded super disk grub at http://www.supergrubdisk.org/
its a live CD and it boot, after that you can ask it to repair your GRUB boot loader...very cool and very easy

You could always try editing

You could always try editing the boot sector of your hard disk with a sector editor. Just mess up or clear sector 0 of the hard disk.