This command removes any and all partition tables from the drive.
To avoid accidentally wiping the wrong disk, keep only your primary SSD/HDD plugged in during this process.
If you see an error saying the disk is of the GPT partition style but your BIOS is set to Legacy (or vice versa), Diskpart is the only way to fix it without third-party software. Use the convert gpt or convert mbr commands after the clean step to match your BIOS settings.
If your computer uses modern , you should convert the disk to GPT for better security and performance. If using older BIOS/Legacy, skip this. convert gpt Use code with caution. Alternatively, for older systems: convert mbr . Step 5: Exit Diskpart exit Use code with caution. Close the Command Prompt window. Continuing the Windows 10 Installation diskpart windows 10 install
Before modifying your drives, you must understand the basic commands used to navigate and alter your storage configuration.
Clear drives with corrupted file systems or unreadable Linux/macOS partitions.
Your computer booted the installer in modern UEFI mode, but the hard drive is still utilizing the older legacy MBR layout. This command removes any and all partition tables
You see the error "Windows cannot be installed to this disk. The selected disk is of the GPT partition style" or vice versa for MBR.
If you are using an older BIOS system, you can use convert mbr instead, though GPT is recommended. 7. Create the Partition Structure
This is the most critical step. If you have multiple drives, ensure you select the correct one. If you want to install Windows on the primary drive, it is usually Disk 0. Use the convert gpt or convert mbr commands
Type attributes disk clear readonly into Diskpart to strip away any software-level write protections. If the error persists after a reboot, try changing the SATA port on the motherboard or replacing the data cable. 5. Best Practices for Using Diskpart
You do not need a working operating system to use Diskpart. You can call it up directly from the bootable Windows 10 USB or DVD installer. using the Windows 10 installation media.