|Caution || |
Microsoft DiskPart is a powerful tool that you can run on the CMD without using a GUI. The tool is more flexible than Disk Management.
To run DiskPart:
- Type DiskPart on the CMD or invoke the tool with the Run window. A User Account Control message pops up.
- Provide admin rights to the tool and accept the message to run the tool.
DiskPart has many options and commands. See the basic steps below to initialize and erase a drive.
First, select the drive you're working on:
- List disk: Displays the list of attached disks and USB flash drives
- Sel disk (select disk): Selects the scope to work in
- Clean all: Removes partition and volume information from the selected device
Next, with your device clean (in factory state), create partitions and format it. Select your drive and type the following commands to create partitions:
- List part: Display partitions available on the drive (a fabric state would not have partitions)
- Sel part: Used to select a partition to work on
- Del part: Used to delete the selected partition
If you don't have partitions, you can create a new one.
Create part primary: This command creates a primary partition of the full size of the drive. You can also specify an extended or logical partition or the size desired for the partition using size="xxx".
Now select your partition to format and configure it with the selected partition type:
- Format override fs=”NTFS” label=”label”: Performs a low-level format (secure erase), configures your partition on NTFS file system, and sets the desired label.
You can also use other parameters and functions of this command. For example, to run a quick format in place of override, type format quick fs=”NTFS” label=”test” size=409600 (size is in MB).
You have created and formatted your partition. If the partition doesn't have a letter assigned, you can't see the drive on Windows*.
To see the drive, type the following commands:
- List vol: List all volumes available
- Sel vol: Select the volume that you already create with the last commands.
- Assign letter: Assign a letter to the drive so Windows sees your drive. The drive is ready to use. For example: assign letter=D.