What is DISKPART?

DISKPART is a command-line utility in Windows designed for managing storage devices such as hard drives, SSDs, and USB flash drives. It offers advanced features for creating, deleting, formatting, and configuring disk partitions and volumes. Unlike the graphical Disk Management tool, DISKPART provides more granular control, making it a preferred choice for certain technical tasks.


Why Do We Use?

DISKPART is used for a variety of tasks, including:

  1. Formatting and Preparing Drives
    • Create partitions and format drives for use.
    • Resolve file system or partition errors.
  2. Creating Bootable Drives
  3. Advanced Disk Management
    • Perform tasks not possible in the graphical Disk Management tool.
    • Automate operations via scripts.
  4. Cleaning and Repurposing Drives
    • Remove all existing data and partitions for reuse or troubleshooting.

Guide to Using DISKPART for Creating a Bootable Flash Drive

  1. Prepare Your Flash Drive
    • Insert your flash drive into a Windows computer.
    • Back up important files as this process will erase all data.
  2. Open Command Prompt
    • Press Win + R, type cmd, and hit Enter.
  3. Start DISKPART
    • Type diskpart in the Command Prompt and press Enter.
    • Wait for the DISKPART> prompt.
  4. List Connected Disks
    • Type list disk and press Enter.
    • Identify your flash drive in the list (e.g., Disk 2).
  5. Select Your Flash Drive
    • Type select disk 2 (replace 2 with the correct disk number for your flash drive) and press Enter.
      ⚠️ Ensure you select the correct disk. Proceeding with the wrong disk will erase its data.
  6. Clean the Drive
  7. Create a New Partition
    • Type create partition primary and press Enter.
  8. Select the New Partition
    • Type select partition 1 and press Enter.
  9. Mark the Partition as Active
    • Type active and press Enter.
  10. Format the Drive
    • Type format fs=fat32 quick and press Enter.
  11. Assign a Drive Letter
    • Type assign and press Enter.
    • Then type exit to leave DISKPART.
  12. Close the Command Prompt
    • Your flash drive is now formatted and ready for use.

Create a Bootable Flash Drive

After completing the DISKPART steps above, use a tool like UltraISO or Rufus to copy a bootable ISO file onto the flash drive.

Examples of what you can create:

  • Bootable Windows installation media.
  • Acronis recovery drive.
  • SCCM bootable USB.

This method ensures your flash drive is bootable and can be used for various operating systems or recovery tasks.

Share This