How To Backup And Restore The MBR In Windows
A question came up recently in the comments on how to backup the master boot record MBR (see How To Detect A 64-bit Alureon Rootkit Infection for that). This article is going to review a handful of free applications for Windows that can be used to backup and restore the MBR, with no deeper technical knowledge required.
The master boot record is located in the first sector of a hard drive, and while it has different functions it is commonly known for finding bootable partitions in the partition tables and loading the boot sector which often is a boot loader.
A damaged or modified MBR can have the result that the operating systems cannot be loaded which is what the Alureon Rootkit caused on some operating systems.
A backup of the master boot record is often the best and most convenient way to repair the information so that the system can boot normally.
MBRFix is a command line tool for Windows, that can be used for lots of advanced commands that manipulate or process the MBR. Among the options is the ability to backup and restore the master boot record. The program comes as a 32-bit and 64-bit edition. Here are the commands needed to backup and restore the MBR:
MbrFix /drive 0 listpartitions
MbrFix /drive 0 savembr Backup_MBR_0.bin
MbrFix /drive 0 restorembr Backup_MBR_0.bin
The first command lists all partitions of drive 0, the second backs up the master boot record of the first drive of the system in the file Backup_MBR_0.bin, the last restores the previously created MBR backup to the drive.
Another command line tool for Windows which comes with a basic menu which makes the program usage a bit easier. MBRTool can be used to backup all MBRs automatically, or work with specific master boot records. The user interface makes it easier to work with, even though it does not make a big difference compared to MBRFix.
The only program with a graphical user interface. HDHacker can backup and restore any sector of a partition, but has a specific option to backup and restore the MBR sector. It is probably the easiest to use of all the three programs of this guide.
That leaves a question: How often should you backup the MBR? A backup is only necessary if something in the setup of the PC changes, for instance if another operating system is installed or removed, or if the hard drive partitions are changed.
Thank you for the quick answer and this post !!!
I havent really needed backing up on mbr on win 7 (64). I have changed sata ports before without a hitch and I even changed mobo yesterday and it found and booted my c:/ without a problem. In case you havenÂ´t backed it beforehand you can always boot the win dvd and do a fixboot/fixmbr.
I have Windows 7 64bit with all the latest updates, yesterday morning I found my PC hung up with MBR1 error. I had made a rescue/restore disc in late July. So, I proceeded to try my Windows 7 install disc, if gave me the error, this version of windows is more advanced than what is on the disc, we cannot proceed. I then tried my restore / rescue disc, got the same error, I cannot proceed. Either disc will not let me get to the command prompt, and with all the updates that were happening on Sunday, I had no time to make a new backup, also I did not know that running a bunch of updates, wipes out any chance of using a previous rescue disc!! Thanks Microsoft
I used to boot from DVD install disc and recover the mbr. In WinXP, make use of the console and a few command line toold like fixbmr,…
Thanks for the tip.
One of my computers didn’t come with back-up discs (it has an OS image on a separate partition if you want to restore the computer) and creating CDs from the image would use a lot of discs.
My MBR became corrupted a couple of years ago and I lost most of the files on my disk. Remember, the MBR doesn’t only contain the boot code, but the partition structure as well. Learn from my mistake, keep a backup of your MBR every time you make a change to the partitions!
Btw, it looks like you forgot about MBRWizard in this list, which also has a GUI version in addition to their regular command line version. http://mbrwizard.com
If your computer cannot boot to MBR corruption how are you supposed to restore the MBR backup? Is there a full well written procedure for this process?
The only option then is to boot into a recovery environment, and run the software programs from there. Or, use a backup software to restore the whole system partition if such a backup exists.