Examples

MBRWizard is designed as a command line only application for flexibility and automation of tasks, therefore, there is no graphical interface for this product. We have created a graphical (GUI) version of MBRWizard, click to learn more about MBRWizard Suite, or you can browse the examples below to get a feel for running the command line interface (CLI) version. For further information on running applications from the Command Line, please check out Command Prompt Basics.

In order to give you a head start using MBRWizard, we have provided the following examples of some of the most commonly requested tasks. We are always looking to improve this information, please let us know if you don't see what you are looking for and we will do our best to add more examples.

 

Common tasks addressed by MBRWizard

 

How do I make a flash disk bootable? We need to first identify the flash disk, so start by running MBRWizard with the /list command: mbrwiz /list . After locating the flash drive, make note of the Disk # associated with the flash disk. Now, execute the following command, making sure the /disk=x variable corresponds to the flash disk #:

MBRWiz /Active=1 /Disk=x

How can I boot the Windows 7 installer from a flash drive? Rather than take credit for the work of others, let's just point to the sites and let you follow their very good instructions. These instructions will also work under Windows XP!

How do I wipe the MBR clean? The /Wipe parameter can be used in situations where you want to entirely remove the MBR, or additional sectors from a given disk. Available parameters are MBR, HEAD, or to remove a range of sectors you can separate the start and end sector with a dash.

  • Wipe the MBR on the first disk: MBRWiz /Wipe=MBR /Disk=0
  • Wipe the entire first head on the second disk: MBRWiz /Wipe=HEAD /Disk=1
  • Wipe Sectors 2 through 12 on the third disk: MBRWiz /Wipe=2-12 /Disk=2

How do I repair the MBR? The Repair option is designed to replace the boot loader with a standard Windows XP boot loader. The only parameter currently available for /Repair is 1, which indicates Windows XP, additional options will be available in future versions to support Vista and others as required. Making sure the Disk=x option is set correctly (you don't want to repair the wrong disk), use the following command to perform the repair:

MBRWiz /Repair=1 /Disk=0

How do I wipe the MBR clean? You can use the /Wipe option in situations where you want to entirely remove the MBR or additional sectors from a given disk. Available parameters are MBR, HEAD, or to remove a range of sectors you separate the start and end sector with a dash.

  • Wipe the MBR on the first disk: MBRWiz /Wipe=MBR /Disk=0
  • Wipe the entire first head on the second disk: MBRWiz /Wipe=HEAD /Disk=1
  • Wipe Sectors 2 through 12 on the third disk: MBRWiz /Wipe=2-12 /Disk=2

How do I set a Partition as Bootable? The Active parameter is designed to set the bootable status on a primary partition. Make certain there is one, and only one, partition set active per disk:

  • Set the first partition on the first disk active: MBRWiz /Active=Yes /Disk=0 /Part=0
  • Set the second partition on the first disk inactive (not bootable): MBRWiz /Active=No /Disk=0 /Part=1
  • Set all partitions as inactive: MBRWiz /Active=No /Disk=0 /Part=*

How do I hide or unhide a partition? The process of hiding a partition simply modifies the partition type to a predetermined type which isn't recognized by the operating system:

  • Hide the first partition on the first disk: MBRWiz /Hide=Yes /Disk=0 /Part=0
  • Unhide the second partition on the first disk : MBRWiz /Hide=No /Disk=0 /Part=1
  • Unhide all partitions on the second disk : MBRWiz /Hide=No /Disk=1 /Part=*

How do I delete a partition? The process of deleting a partition simply removes any reference of it from the MBR.

  • Delete the first partition on the first disk: MBRWiz /Part=0 /Del
  • Deletes all partitions on the second disk: MBRWiz /Part=* /Disk=1 /Del

How do I backup the MBR to a file? It is always recommended to have a backup of the MBR in case of corruption or accidental deletion. MBRWizard can save a backup of the MBR to file, but also supports backing up additional sectors as by identifying the sector to capture.

  • Save the MBR from the first disk to the file named MyMBR.dat on the d: drive: MBRWiz /Save=d:\MyMBR.dat
  • Save Sector #13 from the second disk to the file Sect13.dat on the d: drive: MBRWiz /Disk=1 /Sector=13 /Save=d:\MyMBR.dat

How do I copy the MBR to another sector? The following describes how to copy the MBR, or another sector, to a given location on the hard disk. Keep in mind that the /Sector parameter specifies the sector to be copied, while the /Copy sector identifies the destination for the copy..

  • Copy the contents of the MBR to sector 13 : MBRWiz /Sector=0 /Copy=13
  • Copy the contents of sector 13 to the MBR: MBRWiz /Sector=13 /Copy=0

How do I restore the MBR from a backup file? The following describes how to restore the MBR from a previous backup. Note, the second example shows restoring to a sector other than the MBR.

  • Restore the MBR from the file d:\MyMbr.dat: MBRWiz /Restore=d:\MyMbr.dat
  • Restore the file MyMbr.dat to sector 13: MBRWiz /Restore=d:\MyMbr.dat /Sector=13

How can I see detailed disk information? The following will show the partitions on the disks, as well as additional information about the disk:

  • View disk and partition information for all disks:: MBRWiz /List

How can I see the contents of the backup file? The following will show the MBR information stored in a backup file in a backup sector:

  • View information stored in a backed up MBR file: MBRWiz /Show=d:\mymbr.dat
  • View information stored in sector 13: MBRWiz /Show=13

How do I change the partition type of an existing partition? Please note, the following will only change how the partition type is specified in the MBR, it will not attempt to actually convert the partition.

  • Change the partition type of the first partition from 44 (Dynamic Disk) to 7 (NTFS): MBRWiz /Part=0 /Type=7h

How do I sort the partition entries in the MBR? The following command will sort the order of the partitions in the MBR to match their physical order on disk.

  • Sort the partition entries in the MBR on the second disk: MBRWiz /Sort /Disk=1