Couldn't Create New Partition, Locate Existing One

Abstract: Resolve Windows 10 installation partition errors by using diskpart to clean the disk and recreate a valid GPT or MBR structure.

Created: 2026-08-09 by
This error typically occurs because the installer cannot find a valid unallocated space or the existing partition table is corrupted, often due to leftover EFI System Partitions (ESP) or Microsoft Reserved (MSR) partitions from previous installations. The most reliable fix involves using the diskpart utility in the command prompt during setup to clean the disk and recreate the partition structure from scratch, ensuring the BIOS/UEFI firmware can correctly locate the new Windows installation target.

Understanding the Partition Error Context

When you attempt to install Windows 10, the setup process requires a contiguous block of unallocated space. If you receive an error stating that it could not create a new partition or locate an existing one, it usually means the disk's partition table is in a state the installer does not recognize as "clean." This frequently happens on drives that previously housed another operating system, particularly if they used a GUID Partition Table (GPT) scheme with specific boot partitions.

The Windows Installer checks for specific partition attributes. If there are hidden partitions, such as the Recovery Partition or the EFI System Partition, that have incorrect flags or are marked as active when they shouldn't be, the installer may fail to proceed. Additionally, if the disk contains mixed MBR and GPT structures, or if the disk has been partially converted without proper cleanup, the installer will reject the drive to prevent data loss or boot failures.

Preliminary Checks Before Wiping Data

Before proceeding with a full disk wipe, which erases all data, ensure that your installation media is up to date. Sometimes, older versions of the Windows 10 installer have bugs related to large hard drives or specific USB controller drivers. You should also verify that your computer is booting from the USB drive in the correct mode: UEFI for GPT disks and Legacy BIOS for MBR disks. Mixing these modes can cause the installer to misinterpret the partition layout.

If you have critical data on the drive, consider backing it up first. However, if the drive is already failing or you are reinstalling on a secondary drive, you can proceed directly to the solution below. For users who accidentally deleted their EFI and MSR partitions, recovering those structures might be necessary if you intend to keep the current OS, but for a fresh Windows 10 install, removing them is part of the standard procedure.

Solution 1: Using DISKPART to Clean the Disk

This is the most effective method for resolving partition errors during Windows 10 installation. It forces the removal of all existing partition structures, allowing the installer to create a fresh, compatible layout. Follow these steps carefully:

  1. Boot from your Windows 10 installation USB drive.
  2. On the screen asking "Which type of installation do you want?", select Custom: Install Windows only (advanced).
  3. You will see a list of drives and partitions. Instead of clicking next, press Shift + F10 to open the Command Prompt.
  4. Type diskpart and press Enter to launch the diskpart utility.
  5. Type list disk and press Enter. Identify your target disk by its size (e.g., Disk 0).
  6. Type select disk X (replace X with your disk number) and press Enter.
  7. Type clean and press Enter. This removes all partitions and volumes from the selected disk.
  8. Type convert gpt (for UEFI systems) or convert mbr (for Legacy BIOS) and press Enter.
  9. Type exit twice to close diskpart and the Command Prompt.
  10. Click the Refresh button in the installer window, then select the now-Unallocated Space and click Next.

This process ensures that the disk is completely free of conflicting partition tables. If you encounter issues with specific partition attributes after cleaning, you can refer to guides on changing partition attributes using DISKPART for more granular control, though a simple clean operation usually suffices for fresh installs.

Solution 2: Deleting Existing Partitions Manually

If you prefer not to use the command line or if the clean command fails due to hardware restrictions, you can manually delete partitions through the GUI installer. In the same installation window where you see the drive list:

  • Select each partition on the target drive one by one.
  • Click Delete for each partition until only "Unallocated Space" remains.
  • Be cautious not to delete partitions on other drives if multiple disks are present.
  • Once only unallocated space is visible, select it and click Next.

This method achieves the same result as the clean command but allows you to visually confirm which data is being removed. It is less aggressive than wiping the entire disk sector-by-sector but effectively resolves the "cannot locate existing partition" error by presenting a blank slate to the installer.

Solution 3: Addressing GPT/MBR Conversion Issues

Sometimes, the error persists because the disk was previously split into two parts due to a failed conversion between GPT and MBR formats. If your C drive appears split into two separate partitions in the device manager, this fragmentation can confuse the installer. In such cases, you must ensure the disk is unified before installation. Refer to articles discussing GPT/MBR conversion issues to understand how to merge these partitions safely before attempting the Windows 10 setup again.

Frequently Asked Questions

Will cleaning the disk delete my files?

Yes, the clean command in diskpart permanently deletes all partitions and data on the selected disk. Ensure you have backed up any important files before proceeding. This action is irreversible within the Windows installer environment.

Why does the installer say "Windows cannot be installed to this disk"?

This error usually indicates a mismatch between the boot mode (UEFI vs. Legacy) and the disk style (GPT vs. MBR). If you are booting in UEFI mode, the disk must be GPT. If you are booting in Legacy mode, the disk must be MBR. Use the convert gpt or convert mbr commands in diskpart to align the disk style with your boot mode.

Can I fix this error without losing data?

If you need to preserve data, you cannot use the clean command. Instead, try deleting individual non-essential partitions in the installer GUI or use third-party partition management tools in Windows PE to shrink or move partitions. However, for a clean Windows 10 install, wiping the disk is the recommended approach to avoid boot conflicts.

What if diskpart shows "Access Denied"?

This can happen if the disk is write-protected or if a background service is locking the volume. Ensure no other processes are accessing the disk. If using a USB external drive, check for a physical write-protection switch. In some cases, restarting the computer and retrying the diskpart commands immediately upon reaching the installation screen resolves the lock.

Is it safe to convert MBR to GPT during installation?

It is safe provided you have backed up your data, as the conversion process itself involves rewriting the partition table. The convert gpt command in diskpart is designed to handle this transition cleanly. However, if the disk has complex partition layouts, manual deletion of partitions before conversion is safer to prevent corruption.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More