How to Clean, Format, and Convert a Disk Using Diskpart in Windows

11 minute read

Diskpart is a powerful command-line utility in Windows that enables users to manage disks, partitions, and volumes. It provides a range of tools for disk management tasks, including disk cleaning, formatting, and conversion. Cleaning a disk involves the removal of all data and partitions, while formatting prepares the disk for use by establishing a file system and partition structure. Additionally, you can convert a disk between the Master Boot Record (MBR) and the GUID Partition Table (GPT) partition styles. In this article, we will guide you through the process of cleaning, formatting, and converting a disk using Diskpart in Windows. We will also discuss the pros and cons of both MBR and GPT partition styles.

Note: Exercise caution when using Diskpart, as it involves disk and partition manipulation. Ensure that you select the correct disk to prevent data loss.

Step 1: Open Command Prompt as Administrator

  1. Press Windows + X keys simultaneously on your keyboard.
  2. Select “Command Prompt (Admin)” or “Windows Terminal (Admin)” from the context menu. This will open the Command Prompt with administrative privileges.

Step 2: Launch Diskpart

  1. In the Command Prompt window, type diskpart and press Enter. This will launch the Diskpart utility.

Step 3: List Disks

  1. Inside the Diskpart prompt, type list disk and press Enter. This command will display a list of all available disks on your system.

Step 4: Select the Disk

  1. Identify the disk you want to clean, format, and convert from the list.
  2. Type select disk X (replace X with the appropriate disk number) and press Enter. This selects the specified disk for further actions.

Step 5: Clean the Disk

  1. With the disk selected, type clean and press Enter. This command will remove all partitions and data from the chosen disk.

Step 6: Convert to MBR or GPT (Choose One)

Convert to MBR:

  1. Type convert mbr and press Enter. This command will convert the disk to the Master Boot Record (MBR) partition style.

Convert to GPT:

  1. Type convert gpt and press Enter. This command will convert the disk to the GUID Partition Table (GPT) partition style.

Step 7: Create a New Partition

  1. Type create partition primary and press Enter. This command will create a new primary partition on the cleaned and converted disk.

Step 8: Format the Partition

  1. Input format fs=ntfs quick and press Enter. This command will swiftly format the newly created partition with the NTFS file system. To use a different file system, replace ntfs with exfat or fat32.

Step 9: Assign a Drive Letter

  1. Type assign letter=X and press Enter. Replace X with the desired drive letter you wish to assign to the formatted partition.

Step 10: Exit Diskpart

  1. Type exit and press Enter to exit the Diskpart utility.

Step 11: Close Command Prompt

  1. Simply close the Command Prompt window.

Pros and Cons of MBR and GPT Partition Styles

Master Boot Record (MBR):

Pros:

  • Compatibility: MBR is compatible with older systems and operating systems.
  • Simplicity: MBR is straightforward and widely supported.
  • Bootable: MBR supports booting from both BIOS and UEFI systems (with limitations).

Cons:

  • Partition Limit: MBR supports up to 4 primary partitions (or 3 primary and 1 extended partition).
  • Disk Size Limit: MBR is limited to a maximum disk size of 2TB.

GUID Partition Table (GPT):

Pros:

  • Partition and Disk Size: GPT supports a larger number of partitions (128+) and larger disk sizes (beyond 2TB).
  • Data Integrity: GPT includes redundant partition information for improved data integrity.
  • UEFI Support: GPT is required for booting from UEFI systems.

Cons:

  • Compatibility: GPT may not be supported by older systems and operating systems.

Conclusion

In conclusion, Diskpart is a versatile utility for disk and partition management in Windows. By following the steps outlined in this guide, you can effortlessly clean, format, and convert a disk between MBR and GPT partition styles using the Diskpart tool. When choosing between MBR and GPT, consider the compatibility and limitations of each partition style based on your system’s requirements. Always exercise caution, review your actions carefully, and back up critical data before engaging in disk-related operations to prevent potential data loss.