Sponsoring website: Emergency Boot CD



MBRWizard - The MBR utility you've been looking for!
Last Updated November 13, 2003
[ April 25, 2015 ]

[Note: TheStarman decided to keep the most recent instructions for Roger Layton's free MBRWizard software on this site. Except for notes, in brackets, all other statements were made by Roger himself before his web site was removed from the Net about the end of November, 2003. (Note: Some time later he did start a new site for selling his newer versions.)]

[ MD5 Sums:
  MBRWiz.exe = a6c645ef2f30abf61fcdbe5e76999730
 mbrwizd.exe = 8d14517048176e93f2fbbde9303cd38a

mbrwiz(Linux)= e5acbe54092e0db44a6bfe4c77a2e92e ]

MBRWiz is a command line tool designed to directly modify the MBR, with the capability to set partitions active for booting, delete or hide partitions, back up and restore copies of the MBR, as well as sort the partition entries.

Included in the download is a 32 bit version (MBRWiz.exe) for Windows NT/2K/XP/PE/2003, a 16 bit executable (MBRWizD.exe) for DOS and Win9x, as well as a version for Linux.

MBRWiz v1.52 has been released as Public Domain software, by me, Roger Layton. I have designed and developed this software to directly modify the MBR which can (and possibly will) destroy partitions and data on the hard disk. I can take no responsibility for any loss of partition information or data loss by using this program.

Version 1.52, dated November 13th, 2003 can be downloaded, as freeware, here [Web site no longer exists! As and alternative, use this: Product Site's LEGACY Downloads Page.]

Visit the Homepage at http://mbr.bigr.net [ Web site no longer exists, but it will forward you to the same commercial site listed above.]


Available Command Line Options
/List Display the partitions listed in the MBR, their order in the MBR, partition type, size, and whether active or hidden. The Pos field indicates the order the partitions are laid out on disk, while MBRndx shows them as they're listed in the MBR record.
/SortIt isn't uncommon for the partition entries in the MBR to be unsorted, meaning that their order in the MBR doesn't match the order on disk. This normally wasn't a problem until Windows NT/2K/XP came along with its new boot loader, and the requirement for each partition entry in the boot.ini to point to the actual partition number. This option will sort the entries in the MBR to match their order on disk.
/IsSortedReturns an ErrorLevel code based on the status of the partition entries:
0 = Sorted
1 = Not Sorted
/Disk=# Selects the disk to use for all operations. This switch is always processed first, verifying that all operations specified on the command line will use the disk specified here. If not specified, Disk 0 will be used by default. All operations use the physical location of the partition on the disk (the first column in /list), while the MBRndx simply identifies the current position of the partition entry in the MBR.
/Active=#Sets the partition specified by # active for booting. If the partition is hidden it will unhide it before setting it active. No other partitions will be hidden, or otherwise changed by this command. DOS and Win9x do not properly recognize multiple visible primary partitions, so make certain you also hide remaining primary partitions if necessary.
/InActive=# Sets the partition specified by # in-active, therefore it will no longer be bootable. This option will not automatically set another partition active. An entry of * (asterisk) will cause all partitions to be set as inactive.
/Hide=# Hides the partition number specified by #. An entry of * (asterisk) will cause all partitions to be hidden
/Unhide=#

Un-Hides the partition number specified by #. An entry of * (asterisk) will cause all partitions to be unhidden.

/Del=#Deletes the partition specified by #.
/Wipe=# Selecting an option of 1 will wipe the MBR clean, effectively removing all information from the first sector of the disk. An option of 2 will remove all information from the first (hidden) 63 sectors of the disk.
/Save=filename Saves the current MBR to filename, where filename is a drive:\path combination to store the file. Substituting the word SECTOR for filename will store the MBR in a hidden sector on the disk
/Restore=filename Reads an MBR file from filename, where filename is an existing path:\filename containing the backed up contents of the MBR. Substituting the word SECTOR for filename will restore the MBR from the hidden sector on the disk, if it has been previously backed up.
/ShowFile=filenameShow the partition structure from a backed up MBR filename or sector.
/BootMenuThis option will list the available, bootable partitions, and allow the user to select one of them to set active.
/Shutdown=#An entry of 1 will force Windows to shutdown. An entry of 2 will force Windows to shutdown and reboot. This option may cause data loss if open programs contain unsaved data. NT/2K/XP/2003 version only.
/ResultDisplays the return code for visual verification of success/failure.
/HideErrorsHides the display of any errors that may occur.
CommandFileIf no switches are specified on the command line, and a file by the name of mbrwiz.opt exists in the same folder as the executable, then the mbrwiz.opt file will be parsed for possible switches. Switches can be located on the same line, or dispersed across multiple lines. This option can be used when it's not possible to pass switches on the commandline. The following is an example option file to save the disk 1 mbr to hidden sector, then reboot the machine
----------------------------
/disk=1 /save=sector
/shutdown=2
----------------------------

Version History

v 1.52  Nov 13, 2003
Minor release to resolve an issue sorting on disks other than disk 0 (zero). Fixed issue where DOS version would not properly read multiple disks Added a feature to Auto-backup the MBR if a command to sort, delete, or restore an MBR is specified. Windows version will write the file to the Temp folder specified by Windows, DOS version will write file to c:\, Linux stores file to /usr/tmp. The filename will be Disk-0.mbr, Disk-1.mbr, etc. for each physical disk in the system.

v 1.5  Sep 16, 2003
Added feature to read and display the partition table from a backed up mbr file. Added feature to read command options from a text file. Added ability to deactivate all partitions using *.

v 1.4.1  Sep 5, 2003
Minor release to fix display problem in DOS version

v 1.4  Sep 2, 2003
Added a version for Linux, including support for IDE, SCSI, and RAID devices.

v 1.3  August 12, 2003
Added support for multiple disks. Added Bootmenu option. Added ability to hide/unhide all partitions on a disk. Added functionality to save the MBR to a hidden sector on disk

v 1.2  July 7, 2003
Added Wipe functionality.  Added Shutdown and Reboot functionality under 32 bit

v 1.1  May 25, 2003
Added support for a 32 bit version Windows version.

v 1.0  March 2003
Added functionality to activate, hide, delete,  and sort partitions.  Save and Read the MBR from a file was also included here.


 

Back to: MBR Tools and References Page

The Starman's Realm Index Page

 

 

 

 !    Notice

Only Primary and Extended partitions can be displayed and modified by MBRWiz. There is no logical partition support.

Also...please remember that all disk and partition operations are zero based!

 

Remember

A return code (errorlevel) will always be returned to verify the success of any operation. A return value of 0 (zero) indicates success, values >0 will indicate failure. Specifying the /result switch will display the return code to the screen for troubleshooting.

 

Examples

MBRWiz /active=0 /shutdown=2
Sets the first disk partition active and reboots the machine

MBRWiz /disk=1 /hide=1
Hides the second partition on the second disk

MBRWiz /sort
Sorts the partition entries in the MBR based on physical disk location

MBRWiz /del=2
Deletes the 3rd partition

MBRWiz /Save=a:\mymbr.dat
Saves the current MBR to a floppy disk with the filename mymbr.dat

MBRWiz /disk=2 /save=SECTOR
Saves the MBR for the 3rd disk in the system to a hidden sector on the disk