Title: The Clean Slate
The Situation
Leo had tried everything. His Windows 10 PC was blue-screening every hour, riddled with corrupted drivers, and hiding three different recovery partitions from old updates. He needed a total reset—not the "keep your files" kind, but the scorched earth kind.
He booted from his USB drive—the one labeled "Windows 10 Installer." The familiar purple setup screen appeared. He clicked through language settings, then "Install now."
But when he reached "Which type of installation do you want?" , he didn't choose Upgrade. He chose Custom: Install Windows only (advanced).
The Problem
The next screen showed a list of drives and partitions:
The "Delete" button worked, but annoying small partitions remained. The "Format" button wasn't enough. He needed to wipe everything and start truly blank.
The Shift to DiskPart
Leo remembered a secret weapon. He pressed Shift + F10.
A black Command Prompt window appeared, floating over the Windows setup background. He took a breath and typed:
diskpart
The prompt changed to DISKPART>.
The Conversation with DiskPart
List the disks
list disk
Result: Disk 0 (his main drive, 238 GB) and Disk 1 (his USB stick, 14 GB).
Select the target
select disk 0
Reply: Disk 0 is now the selected disk.
Wipe it completely
clean
A warning flashed: DiskPart succeeded in cleaning the disk. Every partition, every hidden system file, every old boot sector—gone. The drive was now raw, unallocated space.
Convert to GPT (for modern UEFI systems)
convert gpt
Reply: DiskPart successfully converted the disk to GPT format. diskpart windows 10 install
Create the main partition
create partition primary
Reply: DiskPart succeeded in creating the specified partition.
Format and label it
format fs=ntfs quick label="Windows"
Assign a drive letter (optional, but clean)
assign letter=C
Exit DiskPart
exit
The Finish Line
He closed the Command Prompt window. Back in the Windows Setup drive list, everything was different. Instead of messy partitions, he saw:
He selected it, clicked Next, and watched Windows 10 begin copying files. No old ghosts. No hidden recovery partitions. A clean slate.
Epilogue
Twenty minutes later, Leo was setting up his fresh Windows 10—no blue screens, no driver conflicts, no past mistakes. DiskPart had done what the graphical tools couldn't: given him absolute control.
He whispered to the empty room: "Clean, convert, create. Never forget."
Moral of the story (for real-world use):
clean deletes everything on the selected disk—no confirmation, no recycle bin.list disk first. Accidentally selecting your USB or a secondary drive means losing data.convert gpt. For older BIOS systems, use convert mbr.DiskPart in Windows 10 Installation: A Comprehensive Guide
Introduction
When installing Windows 10, managing disk partitions is a crucial step. DiskPart is a powerful command-line utility that allows you to create, delete, and manage disk partitions. In this feature, we will explore how to use DiskPart during a Windows 10 installation.
What is DiskPart?
DiskPart is a command-line utility in Windows that allows you to manage disk partitions. It provides a more advanced and flexible way to manage disks compared to the built-in Disk Management tool. With DiskPart, you can perform various tasks such as:
Why Use DiskPart During Windows 10 Installation?
There are several scenarios where using DiskPart during a Windows 10 installation makes sense: Title: The Clean Slate The Situation Leo had
How to Use DiskPart During Windows 10 Installation
To use DiskPart during a Windows 10 installation:
Shift + F10 to open the Command Prompt.diskpart and press Enter to launch the DiskPart utility.list disk to display a list of available disks.select disk <number> to select the disk you want to manage (replace <number> with the disk number).create partition primary to create a new primary partitionformat fs=ntfs quick to format a partition as NTFSassign letter=C to assign a drive letterexit to exit DiskPart and return to the Command Prompt.exit again to close the Command Prompt and continue with the Windows 10 installation.Common DiskPart Commands
Here are some common DiskPart commands:
list disk: Displays a list of available disks.select disk <number>: Selects a disk to manage.create partition primary size=<size>: Creates a new primary partition with a specified size.format fs=ntfs quick: Formats a partition as NTFS.assign letter=<letter>: Assigns a drive letter to a partition.Conclusion
DiskPart is a powerful tool for managing disk partitions during a Windows 10 installation. By mastering DiskPart commands, you can create complex disk layouts, manage dual-boot systems, and perform advanced disk configurations. While it may require some expertise, using DiskPart during a Windows 10 installation provides a high degree of flexibility and control over your disk partitions.
Managing drive partitions during a clean Windows 10 installation often requires more than the standard point-and-click setup. When the installer fails to recognize a drive or throws "MBR vs GPT" errors, DiskPart is your most powerful tool.
This guide covers how to use DiskPart during Windows 10 setup to prepare your drive for a flawless installation. How to Access DiskPart During Windows 10 Setup
You don't need to be in Windows to use DiskPart. You can trigger it directly from the "Where do you want to install Windows?" screen. Boot from your Windows 10 installation media (USB or DVD). On the initial setup screen, press Shift + F10. A black Command Prompt window will appear. Type diskpart and press Enter. Preparing Your Drive: Step-by-Step
Using DiskPart will erase all data on the selected drive. Ensure you have backups before proceeding. 1. Identify the Drive
First, you need to find which disk corresponds to your SSD or HDD. Type list disk and press Enter.
Look at the disk numbers (Disk 0, Disk 1, etc.) and their sizes to identify your target drive. 2. Select and Wipe the Disk
Type select disk X (Replace X with your disk number, e.g., select disk 0).
Type clean and press Enter. This removes all existing partition tables and data. 3. Convert Partition Style (Optional but Recommended) Most modern Windows 10 installs require GPT for UEFI BIOS. Type convert gpt and press Enter.
Note: If you are on an older system using Legacy BIOS, use convert mbr instead. Creating Partitions Manually
While you can let the Windows installer create partitions automatically after "cleaning," some users prefer manual control. To Create a Primary Partition:
Type create partition primary size=XXXX (Size is in MB; skip the "size" part to use the whole disk). Type format fs=ntfs quick to prepare the file system. Type assign to give it a drive letter. Type exit to leave DiskPart, then close the Command Prompt. Common Errors and Quick Fixes Drive 0 Partition 1: System Reserved (500 MB)
"Windows cannot be installed to this disk. The selected disk is of the GPT partition style."
The Cause: Your PC is booted in Legacy BIOS mode, but the disk is GPT. The Fix: Use DiskPart to clean the disk and convert mbr.
"We couldn't create a new partition or locate an existing one."
The Cause: Often caused by leftover partition fragments or multiple USB drives plugged in.
The Fix: Use the clean command in DiskPart to provide a totally blank slate for the installer. Summary of Essential DiskPart Commands list disk Shows all available drives select disk X Focuses on a specific drive clean Wipes all partitions and data convert gpt Prepares disk for UEFI boot exit Closes the DiskPart utility If you'd like, I can help you: Troubleshoot a specific error code you're seeing.
Explain the difference between GPT and MBR for your hardware. Guide you through setting up a dual-boot partition.
Older hardware or systems with UEFI disabled require MBR.
Command:
convert mbr
Now format the new partition with the NTFS file system. You can assign a label (name) to it here as well.
format fs=ntfs quick label="Windows"
The quick flag ensures the format happens instantly rather than checking every sector for errors (which takes hours).
diskpart During InstallationTo invoke diskpart, the installer must exit the graphical wizard:
diskpart and press Enter.The environment provides read/write access to all connected storage volumes, bypassing the GUI’s safety limitations.
The clean command does not confirm with the user. It immediately overwrites the partition table. Recovery requires third-party tools (TestDisk, DMDE) before any new data is written.
Cause: You tried to clean a disk that contains the current system boot files (e.g., the USB drive).
Fix: Double-check list disk. Ensure you selected your internal drive, not the USB stick.
If the EFI partition is not created as FAT32 or the active flag is missing on MBR, Windows will install but fail to boot with error 0xc000000e (missing boot device). Recovery requires booting into WinPE again and manually rebuilding the BCD store via bootrec /rebuildbcd.
When installing Windows 10, users frequently encounter errors such as "Windows cannot be installed to this disk. The selected disk has an MBR partition table" or "Windows cannot be installed to this disk space. The partition contains one or more dynamic volumes." These errors stem from incompatibilities between the firmware interface (BIOS vs. UEFI) and the disk partition style (MBR vs. GPT).
The DiskPart utility serves as the definitive solution for these conflicts. Unlike the graphical partition manager, DiskPart offers granular control over disk attributes and allows for the complete sanitation of storage devices. This paper outlines the operational procedures for using DiskPart during the Windows 10 installation process to ensure hardware compatibility and optimal drive configuration.