Friday, August 07, 2009

Save, Restore, Fix a Broken MBR with MBRWizard [Windows]

MBR, if you are unfamiliar, is the first sector of your hard disk. It is just 512 bytes in size, but boy are those 512 bytes important or what? The MBR is used for bootstrapping operating systems, holding the primary partition table of your disk and other important information. You take this information away and chances are you will not be able to boot the operating system.
While installing the operating system, the installer takes care of writing appropriately to the first 512 bytes to allow the operating system to boot and detect partitions. Once that has been done, you do not have direct access to the MBR (which is generally not recommended). However, there are times when you need to take things in your own hand (like backing up MBR before restoring a hard disk image or an OS install, making a partition bootable, or recovering from a corrupt MBR etc), for such times there is a small utility you can use, called – MBRWizard.
MBRWizard allows you to save/restore MBR, fix a corrupt MBR, you can hide/unhide hard disk partitions, make a partition bootable or delete it all together, make a flash disk bootable etc.
fix mbr
MBRWizard is a command line utility you can download from here. Fire up Command Prompt and browse to where you have MBRWiz.exe stored (or else add the directory to your PATH variable), type MBRWiz and you will see a list of all the options. You can then decide which option to choose according to what you are trying to accomplish.
Here are a few examples.

To create a backup of MBR

MBRWiz /save=C:\savedMBR
You can then use this backup copy to restore MBR in case you ever have to.

To restore MBR from the saved file

MBRWiz /Restore=C:\savedMBR
repair mbr

To see an exhaustive list of all the partitions along with attributes

MBRWiz /List

To Hide a parition use

MBRWiz /Hide=Yes /Disk=0 /Part=2

To delete a partition

MBRWiz /Part=2 Del
You can find the complete documentation of all the options and how to use them, here. The site also lists how you can troubleshoot MBR problems when you cannot boot into the operating system. Although in such situations, you must have a way to boot from a CD, USB drive or (ahem..) floppy disk and be able to run MBRWizard. Check out how to make your own Windows Live CD, MBRWizard would be a nice utility to have on your live CD.
MBRWizard is a great tool to have everything is working fine, as well as when you need to fix MBR issues. You must have your favorite tools to jumpstart a problematic computer. We would love to hear about them so tell us in the comments.

No comments:

Post a Comment

[Please do not advertise, or post irrelevant links. Thank you for your cooperation.]