Reference Guide

This page provides a reference guide to the options available within MBRWizard. It is roughly broken out in the following sections: MBR only items, Partition table entries, Miscellaneous commands, as well as Operational, which provides detail for the disks and/or partitions on which to operate. Also, the options colored blue are specific to Windows versions only, and won't apply to Linux or DOS versions.

Please note, this information is specific to the most current 2.0 version. For 1.5x documentation you will find the help file included with the MBRWizard executable in the downloaded zip file.

 

Operational Commands
  • /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.

  • /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.

  • /Part=# - Selects the partition to use for all partition based operations. If not specified, partition '0' will be used by default. All operations use the physical location of the partition on the disk (the first column in /list), not the MBRndx field which simply identifies the current position of the partition entry in the MBR.   Certain commands allow the action to be performed on all partitions, in this case /Part=* (asterisk) performs this functionality.

  • /Sector=# - Selects the sector to use with sector based operations. Sector 0 (MBR) will be used by default if not specified.

MBR Commands
  • /Save=filename - Saves the current MBR to a file, where filename is the path+filename used to store the file.  Specifying /Sector=# on the command line will save the sector # specified rather than the MBR (Sector 0). See example.

  • /Restore=filename - Reads an MBR file from filename, where filename is an existing path+filename containing the backed up contents of the MBR sector. Optionally, specifying the /Sector=# parameter will restore the file to sector # rather than 0 (MBR).  See example.

  • /Repair=# - Designed to create a new Master Boot Record on a blank disk, or fix a damaged, corrupt, or missing MBR.  Specifying an option of '1' will save a PE/XP/2003 MBR to the specifed disk. This may be expanded to other OS formats if the need exists. Note, this option will not modify the partition table. See example.

  • /Show=x - Shows the partition structure from a backed up MBR.  Available options for x are a filename, the sector number containing the backup, or the word SECTOR if the contents have been previously saved to the hidden sector. See example.

  • /Wipe=x - Selecting an option of 'mbr' will wipe the MBR clean, 'head' will wipe the first head or 63 sectors, and a range of sectors from x to y can be wiped by specifying /Wipe=x-y. This will effectively remove all information from the specified sectors of the disk. See example.

  • /Sort - It isn’t uncommon for the partition entries in the MBR to be unsorted after reinstalling Windows or restoring a Ghost or Acronis disk image.  This means that the partition order in the MBR won't match the order on disk. Normally this wasn’t a problem until Windows NT/2K/XP came along with its new boot loader, and the requirement that each partition entry in the boot.ini must point to the actual partition number. This option will sort the entries in the MBR to match their physical order on disk. See example.

  • /IsSorted - Queries the partition entry order in the MBR and  returns an ErrorLevel code based on the status of the partition entries: '0' = Sorted, '1' = Not Sorted

  • /Signature=x - Reads or Writes a new disk signature to the MBR.  Specifying 'Zero' will clear the existing signature, otherwise an 8 digit hex entry can be entered for the signature.  For example, /Signature= Zero, or /Signature= AC87AD87. Specifying /Signature with no options will display the existing disk signature.

  • /Copy=x - Copies the contents of one sector to another.  The /Sector=x command will specify the source sector, and will be copied to the sector specified by /Copy.  Please note, typically only the first 64 sectors (0-63) should be used as the destination, otherwise existing data on the hard disk may be overwritten. Selecting 0 as the target will overwrite and erase the contents of the MBR. See example.

 

Partition Options
  • /Hide=# - Hides or Unhides the specified partition to the operating system. An option of '1' or 'Yes' will hide the partition, while selecting '0' or 'No' will set the partition visible. If /Part=* is specified all partitions will be hidden/unhidden. See example.

  • /Active=# - Sets the specified partition status as active (bootable) or inactive. Specifying the parameter as '1' or 'Yes' will set the partition active, while an option of '0' or 'No' will set the partition non-bootable.  /Part=* can be selected to set all partitions inactive.  If setting the a hidden partition active, it will first be unhidden before being  set active. Note for older operating systems: DOS and Win9x do not properly recognize multiple visible primary partitions, make certain any remaining primary partitions are unhidden if necessary. See example.

  • /Type=# - Modifies the partition type in the MBR. Please note that this does not attempt to convert the actual partition and file system to a new type. This is generally required when a partitioning or backup/restore program modifies the partition type and it needs to be restored back to the original type. The # specified must be directly followed by either a d (decimal) or h (hexadecimal) in order to properly identify the new type.  This option must be used with /Partition in order to identify the partition being modified. See example.

  • /Del - Deletes the specified partition.  Specifying /Part=* removes all partitions on selected disk, while specifying both /Disk=* /Part=* removes all partitions on all disks. See example.

Miscellaneous Options
  • /Shutdown=# - An entry of '1' will force Windows to shutdown, '2' will force Windows to shutdown and reboot. '3' shuts down without force, and '4' reboots without force. Note, using the Force options may cause data loss if open programs contain unsaved data. NT/2K/XP/2003 version only.

  • /WipeDisk=# - Wipes (overwrites) each sector on the disk in order to securely erase all data. Selecting an option of '1' write zeros to all sectors, additional methods coming. Please note, MBRWizard can not completely wipe the system disk (C: drive) when running from Windows, as the machine will blue screen once operating system files are overwritten. An alternative option is to securely wipe the disk from WinPE, which boots from CD or USB Flash Disk, and doesn't have the same limitations. This option is currently only available under the Windows version.

  • /Status=x - Stores or Retrieves the status byte located at offset 0x1b2 in the MBR, which is widely recognized as an unused section of the MBR.  This option allows a single byte to be stored to this unused location of the hard disk, used mainly as a status indicator for provisioning or deployment projects. Specifying a value for 'x' will set the status byte, valid options are 0-255.  Selecting /Status with no options will return the current byte upon program exit.

  • /Confirm - Any operation that performs a change to the MBR will now ask for user confirmation before making the change.  Specifying /confirm on the command line overrides this request and defaults to Yes for each operation without prompting.

  • /BootMenu -This option will list the available, bootable partitions to the user, and set one active by secting from the menu

  • /Msg=# - Hides the status messages shown upon program exit.  An entry of '1' indicates that no messages should be shown, '2'=No error messages, and '3'=No status messages displayed on success.

  • /Ignore - Attempts to continue the specified operation if an error occurs.

  • /Result - Displays the return code for visual verification of success/failure.

  • /? - Show command line options