Showing posts with label mbr. Show all posts
Showing posts with label mbr. Show all posts

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.

Sunday, February 01, 2009

HDHacker backs up and restores Master Boot Records

HDHacker
The Master Boot Record (or MBR) of a hard drive contains the information your computer needs in order to know how to boot any operating systems installed on your system. In other words, if something happens to your MBR or BootSector, you could be left with an unbootable computer.

HDHacker is a Windows utility that lets you backup or restore your boot record in a snap. The standalone program can be run from your hard drive or a USB flash drive. The one thing it does require is a working Windows installation. So if you've accidentally locked yourself out of Windows, you'll need to find a way back in before you can restore your MBR.

Fortunately if you have a Windows XP or Vista installation disc handy you can probably boot into recovery mode and try to fix or rebuild your MBR. But that's not to say HDHacker is useless. For example, if you have a triple boot system running Windows XP, OpenSUSE Linux, and Ubuntu Linux, one of the Linux distributions probably wrote over your MBR with its own GRUB bootloader. If you try to uninstall Ubuntu and keep the other operating systems you might wind up with an unbootable system. The Windows XP installation disc can help you boot into Windows, but you might find yourself without a way to boot into OpenSUSE unless you use a program like HDHacker to restore the boot record.

At least that's one example off the top of my head. If you can think of other uses for this program, let us know in the comments.