Confusion on using convert to GPT partition from command line[Windows 10 installation]

Abstract: Convert MBR disks to GPT using diskpart during Windows 10 installation to support drives over 2TB and enable UEFI boot.

Created: 2026-07-31 by

Use the diskpart utility during Windows 10 installation to convert a disk from MBR to GPT. This process requires wiping the target disk completely, which erases all existing data. The conversion enables support for drives larger than 2TB and aligns with modern UEFI boot standards.

Understanding MBR vs. GPT Partitioning

Before proceeding with the command line conversion, it is essential to understand why you might need this change. The Master Boot Record (MBR) scheme has been the standard for decades but suffers from significant limitations. Most notably, MBR cannot address storage devices larger than 2 terabytes. Additionally, MBR relies on a single copy of the partition table at the beginning of the disk, making it vulnerable to corruption if that specific sector fails.

The GUID Partition Table (GPT) resolves these issues by storing multiple copies of the partition table across the drive and using cyclic redundancy checks for error detection. For Windows 10 installations, GPT is often preferred because it works seamlessly with Unified Extensible Firmware Interface (UEFI) systems, providing faster boot times and improved security features like Secure Boot. If you are planning to install Windows on a large SSD or NVMe drive, GPT is the only viable option for utilizing the full capacity.

Prerequisites and Data Safety

The most critical aspect of converting a disk to GPT via the command line is that the operation is destructive. The clean command within diskpart removes all partitions and data from the selected disk. You must back up any important files to an external drive or network location before starting. There is no way to recover data after the clean command is executed.

Ensure that your computer is booted from the Windows 10 installation media. Do not attempt this procedure from within a running Windows operating system unless you are using third-party tools that handle migration differently. During the initial setup phase of Windows 10, when you see the screen asking "Where do you want to install Windows?", press Shift + F10 to open a Command Prompt window. This gives you access to the necessary tools without affecting the installed OS yet.

Step-by-Step Conversion Process

To convert the partition table, follow these precise steps in the Command Prompt opened during installation:

  1. Type diskpart and press Enter to launch the DiskPart utility.
  2. Type list disk and press Enter. This displays all available physical disks on your system. Identify the disk number associated with the drive you wish to convert. Look at the size column to distinguish between your internal drives and any external USB sticks you might have connected.
  3. Type select disk X (replace X with the actual disk number) and press Enter. Be extremely careful here; selecting the wrong disk will result in data loss on that drive.
  4. Type clean and press Enter. This command wipes the disk clean, removing the MBR structure and all partitions.
  5. Type convert gpt and press Enter. DiskPart will now initialize the disk with a GPT partition table.
  6. Type exit twice to close both the DiskPart tool and the Command Prompt.

After completing these steps, return to the Windows Setup interface. Click Refresh to update the list of available drives. You should now see the unallocated space of the converted disk. Select this space and click Next to proceed with the installation. Windows will automatically create the necessary EFI System Partition, Microsoft Reserved Partition, and the primary Windows partition.

Handling Multiple Disks

If you have multiple hard drives connected, ensure you select the correct one. Often, users confuse their primary installation drive with secondary storage drives. Always verify the disk size and model name shown in the list disk output. If you accidentally select a secondary drive containing personal photos or documents, the clean command will erase them permanently. In such cases, consult resources on managing disk visibility during installation to avoid accidental data loss.

Post-Installation Verification

Once Windows 10 is installed, you can verify that the conversion was successful. Open the Start menu, search for Command Prompt, right-click it, and select Run as administrator. Type diskpart followed by list disk. Look at the Partition Style column for your main drive. It should display GPT instead of MBR. If it still shows MBR, the conversion did not take effect, likely because you selected a different disk or the command failed due to active partitions.

It is also worth noting that while diskpart is powerful, it offers limited flexibility for non-destructive conversions. If you need to convert an existing Windows installation from MBR to GPT without reinstalling, consider reading about migrating Windows 11 MBR to GPT without reinstalling: A Step-by-Step Guide for alternative methods involving specialized tools.

Common Issues and Troubleshooting

Sometimes, the convert gpt command may fail with an error message stating that the disk contains invalid partitions. This usually happens if there are hidden recovery partitions or data that diskpart refuses to delete automatically. Ensure you have used the clean command successfully. If the disk is marked as read-only, check for physical write-protection switches on external drives or use attributes disk clear readonly before attempting the conversion.

Another common issue arises if the BIOS/UEFI settings are not configured correctly. After converting to GPT, you must ensure that your motherboard is set to UEFI mode rather than Legacy or CSM mode. If the system remains in Legacy mode, it will not be able to boot from a GPT drive, resulting in a "No Boot Device Found" error. Adjusting these firmware settings is a crucial step that often gets overlooked during the transition.

Frequently Asked Questions

Can I convert MBR to GPT without losing data?

No, the native diskpart method requires the clean command, which erases all data. To convert without data loss, you must use third-party partition management software that supports online conversion. These tools attempt to migrate the partition table structure while preserving files, though backing up data is always recommended before attempting such operations.

What happens if I install Windows on a GPT disk but use Legacy BIOS?

You will encounter a boot failure. GPT disks require UEFI firmware to boot properly. If your motherboard is set to Legacy BIOS mode, it cannot interpret the GPT partition table for booting purposes. You must enter your BIOS settings and switch the boot mode from Legacy to UEFI to resolve this conflict.

Why does my disk show as "Offline" after conversion?

This typically occurs if you are trying to modify a disk that is currently in use by the operating system or another process. During Windows installation, this is rare, but if it happens, ensure no other drivers or utilities are locking the disk. Restarting the computer and re-entering the installation environment usually clears these locks.

Is GPT better than MBR for gaming PCs?

GPT offers advantages such as support for larger drives and improved reliability through redundant partition tables. However, for typical gaming setups under 2TB, the performance difference is negligible. The main benefit comes from compatibility with newer motherboards and features like Secure Boot, which can help protect against certain types of malware.

How do I know if my PC supports UEFI?

Most computers manufactured after 2012 support UEFI. You can check your current boot mode by searching for "System Information" in Windows. Look for "BIOS Mode" in the details; if it says UEFI, your hardware supports GPT natively. If it says Legacy, you may need to update your motherboard BIOS to enable UEFI support for GPT drives.

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