GPT header corruption can prevent Windows 11 from booting or make a disk unreadable, often showing errors like “The disk is corrupted” or “Invalid partition table.” This guide shows you how to repair the GPT (GUID Partition Table) headers using built-in Windows tools, without third-party software. You’ll need a Windows 11 installation USB or recovery drive to access the repair environment.
What You’ll Need
- A Windows 11 installation USB drive or a recovery drive (created on another PC).
- A second working computer to create the USB if needed.
- Basic familiarity with the Command Prompt.
Step-by-Step
- Boot from the Windows 11 installation media. Insert the USB drive, restart your PC, and press the key to open the boot menu (usually F12, Esc, or Del). Select the USB drive and boot from it.
- Open the repair environment. On the first setup screen, click “Next,” then click “Repair your computer” in the bottom-left corner. This loads the Windows Recovery Environment (WinRE).
- Open Command Prompt. In WinRE, go to Troubleshoot → Advanced options → Command Prompt. A black window will open.
- Identify the corrupted disk. Type
diskpartand press Enter. Then typelist diskand press Enter. Note the disk number that corresponds to your corrupted drive (usually Disk 0, but check the size). Typeexitto leave DiskPart. - Run the repair commands. At the Command Prompt, type the following commands one by one, pressing Enter after each. Replace
Xwith the actual disk number from step 4.diskpart select disk X clean convert gpt exit
Warning: The
cleancommand erases ALL partitions and data on the disk. Only proceed if you have backups or are willing to lose the data. - Recreate the GPT headers. After cleaning and converting, Windows will write fresh GPT headers. However, this leaves the disk empty. To restore your data, you’ll need to either restore from a backup or use recovery software (not covered here). If the disk was a system drive, you’ll need to reinstall Windows.
- Check the result. Type
exitto close Command Prompt, then restart your PC and remove the USB drive. If the disk was a data drive, it should now appear in Disk Management as unallocated space. If it was a system drive, you’ll need to install Windows again.
Common Mistakes
- Selecting the wrong disk. The
cleancommand wipes the entire disk, so double-check the disk number and size before running it. - Skipping the
convert gptcommand. If you only runclean, the disk remains MBR (Master Boot Record), which may not fix GPT corruption. - Not backing up first. If you have important data on the disk, attempting a repair without a backup can lead to permanent loss.
- Using the wrong partition style. If your system originally used MBR (e.g., for older BIOS), converting to GPT may make it unbootable. Only use GPT if your firmware is UEFI.
Tips
- Check the disk before cleaning. Sometimes the GPT headers are only partially corrupted. Try running
chkdsk X: /f(replace X with the drive letter) from the Command Prompt first—it might fix the issue without wiping the disk. - Use Disk Management to verify. After the repair, open Disk Management (right-click Start → Disk Management) to see if the disk shows as “GPT” and “Healthy.”
- Prevent future corruption. Always shut down Windows properly, avoid sudden power cuts, and use a UPS if you’re in an area with frequent outages.
- Keep a recovery drive handy. Create a recovery USB on a working PC (Settings → System → Recovery → Create recovery drive) so you can access repair tools without needing a full installation media.
Troubleshooting
- “The disk is in use” error. If you get this error when trying to clean, close any open Explorer windows or programs that might be using the disk. You can also try
select disk Xthenclean all(this takes longer but forces a full wipe). - Disk still shows as RAW or unreadable. After cleaning and converting, the disk should show as unallocated. If it still shows as RAW, try running
diskpartagain, select the disk, and typeattributes disk clear readonlyto remove any read-only flag, then repeat the clean/convert steps. - Windows won’t boot after repair. If the disk was your system drive, you’ll need to reinstall Windows. Boot from the USB again, choose “Install now,” and follow the prompts. If you have a backup of your system image, you can restore it instead.
- Command Prompt says “Access denied.” Make sure you are running the Command Prompt from the recovery environment, which has elevated privileges. If you’re trying from within Windows, you need to open Command Prompt as Administrator.
Frequently Asked Questions
Will this fix a corrupted GPT header without losing data?
No, the steps in this guide use the clean command, which erases all partitions and data. If you need to recover data, use a data recovery tool before cleaning, or restore from a backup.
What causes GPT header corruption?
Common causes include sudden power loss, improper shutdown, disk write errors, malware, or physical damage to the disk. It can also happen if you try to use a GPT disk with incompatible software.
Can I repair GPT headers using the command prompt in Windows 11?
Yes, but only from the recovery environment. The standard Command Prompt in Windows does not have the necessary permissions to modify disk structures. You can also use DiskPart, but the same cleaning steps apply.
Is there a way to fix GPT corruption without a USB drive?
If Windows still boots, you can try running chkdsk on the affected drive. If that doesn’t work, you can access the recovery environment by holding Shift while clicking Restart in the Start menu. From there, follow the same steps.
What is the difference between MBR and GPT?
MBR (Master Boot Record) is the older partitioning scheme, limited to 2TB disks and 4 primary partitions. GPT (GUID Partition Table) is newer, supports larger disks and up to 128 partitions, and is required for UEFI boot. Windows 11 typically uses GPT.
Will this fix work on an external USB drive?
Yes, the same steps apply to external drives. Just make sure you select the correct disk number in DiskPart, as external drives often appear as Disk 1 or higher.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Gmail Notifications Not Working? Fixes That Work
- Fix Thumbnails Not Showing on Network Drives in Windows 11
- Stop Skype Auto-Start in Windows: 5 Fixes
- SQL Injection Prevention: Step-by-Step Guide
- Fix Windows PowerShell Popping Up
- Print iMessage or Text Conversations on iPhone & iPad