System Partition Locked During Formatting: How to Fix It

Few things derail a clean Windows reinstall faster than a blunt error message telling you the system partition is locked. You’ve already backed up your files, booted from the USB drive, and reached the disk selection screen — then the process halts completely. The formatter refuses to touch the drive, and the error gives you almost nothing useful to work with.

This happens more often than most guides acknowledge, especially on machines that previously ran Windows 10 or 11 with BitLocker enabled, or on systems where a recovery partition is hiding in a corner of the disk. The good news is that every cause has a concrete fix, and none of them require replacing your hardware.

What “System Partition Locked” Actually Means

The error phrase “the drive where Windows is installed is locked” refers to a state where Windows Setup — or any formatting tool — is being blocked from writing to or wiping a partition flagged as active or protected. This is a software-level lock, not a physical one.

Windows applies these locks deliberately in several scenarios: when BitLocker encryption is active on the target volume, when a hibernation file (hiberfil.sys) exists and was not properly cleared, when the partition table marks a volume as a system or boot partition that another process is currently using, or when Setup detects a conflict with a secondary OS or recovery environment.

The error appears most often during in-place upgrades that stall halfway, during fresh installs attempted from within a live Windows session instead of a bootable USB, and on drives that were previously used in a RAID or dynamic disk configuration. Understanding which of these applies to your machine cuts the troubleshooting time dramatically.

It’s also worth knowing that some OEM machines ship with hidden manufacturer partitions that Windows Setup is not permitted to modify without explicit user intervention. These partitions — often labeled “RECOVERY” or “DIAGS” — carry protection flags that mimic the same locked state. Identifying them in DiskPart before starting Setup saves you from chasing a BitLocker problem that was never there to begin with.

Step 1 — Boot Correctly Before Touching Anything Else

The single most common cause of this error is attempting to reformat a drive while Windows is already running from it. You cannot format a partition that the operating system is currently using — the lock is by design.

The correct approach is to boot your machine entirely from an external source: a USB flash drive with the Windows installation media created via Microsoft’s official Media Creation Tool. Once you’re inside the Windows Setup environment, you are running from RAM and the USB, not from the internal drive. That isolation is what allows Setup to treat the target disk as fully writable.

  • Download the Media Creation Tool from Microsoft’s website and create a bootable USB (8 GB minimum).
  • Enter your BIOS/UEFI (typically F2, F12, Del, or Esc depending on the manufacturer) and set the USB as the first boot device.
  • Disable Secure Boot temporarily if Setup refuses to launch — some older USB media conflicts with strict Secure Boot settings.
  • Save changes and restart. The machine should boot directly into Windows Setup from the USB.

If you’ve already done this and the error still appears, the problem is further down the stack — likely BitLocker or a stubborn partition table entry.

Step 2 — Disable BitLocker Before Formatting

BitLocker is the most frequent culprit behind a genuinely locked system partition, and it’s one that surprises users who never consciously enabled it. Since Windows 11 version 22H2, Microsoft enabled automatic device encryption by default on eligible hardware — which means millions of machines have BitLocker active even though the user never set a password or saw a prompt.

To check and disable it before reformatting, boot into the working Windows session (if accessible) and open Control Panel → System and Security → BitLocker Drive Encryption. If the drive shows “On,” click “Turn Off BitLocker” and wait for the full decryption to complete. Decryption on a 500 GB SSD typically takes 15 to 40 minutes depending on the drive speed and how full the volume is.

If Windows no longer boots and you can’t reach that panel, you’ll need the BitLocker recovery key. That key was saved to your Microsoft account if you signed in during setup — log into account.microsoft.com from another device, navigate to Devices → BitLocker recovery keys, and note the 48-digit key. You’ll enter it during Setup when prompted.

Once BitLocker is off or the recovery key is entered, Setup can access and format the partition without obstruction. Skipping this step and trying to force-format an encrypted volume with DiskPart will sometimes appear to succeed but leaves residual metadata that causes Windows to fail during installation.

Step 3 — Use DiskPart to Clean the Disk Completely

When Setup’s built-in partition manager still refuses to format a drive even after BitLocker is resolved, the underlying issue is usually a partition table entry that marks one or more volumes as protected. DiskPart, the command-line disk utility built into Windows PE (the environment that runs during Setup), can override these flags entirely.

From the Windows Setup screen, press Shift + F10 to open a Command Prompt. Then run the following sequence carefully — the clean command is irreversible:

  • diskpart — launches the utility
  • list disk — shows all connected drives with their numbers
  • select disk 0 — selects the target drive (verify the size matches your system disk)
  • clean — removes all partition and volume information from the disk
  • convert gpt — converts the disk to GPT format (required for UEFI systems)
  • exit — closes DiskPart

Return to the Setup partition screen and click Refresh. The disk will appear as unallocated space, and Setup will create the necessary partitions automatically when you click Next. This method resolves locked partition errors caused by orphaned dynamic disk configurations, leftover OEM recovery partitions, and stale MBR/GPT hybrid tables.

After completing a clean install, you’ll need to reinstall drivers. The guide on how to download drivers without internet after formatting covers exactly that scenario if your network adapter isn’t recognized immediately after setup.

Step 4 — Handle UEFI vs. Legacy BIOS Conflicts

A less obvious but surprisingly common source of the locked partition error is a mismatch between the firmware boot mode and the partition style of the disk. UEFI firmware requires a GPT partition table; Legacy (CSM/BIOS) mode uses MBR. When these don’t match, Setup throws errors that can masquerade as a partition lock.

Here’s how to identify and fix this:

  • Boot into UEFI settings and check whether Secure Boot and UEFI mode are enabled. If the system is set to Legacy or CSM mode, switch it to UEFI.
  • If your disk is still formatted as MBR (visible in DiskPart with list disk — an asterisk under “GPT” column means it’s GPT; no asterisk means MBR), the clean + convert gpt sequence from Step 3 resolves the mismatch.
  • Ensure your bootable USB was also created in UEFI-compatible mode. Media Creation Tool handles this automatically, but older Rufus configurations sometimes write MBR-only media.

Systems manufactured before 2014 sometimes default to Legacy mode even when UEFI is supported. Switching to UEFI and running a clean GPT install on these machines tends to also improve boot times noticeably — typically shaving 5 to 10 seconds off cold boot on mechanical drives.

One additional detail worth checking: if your motherboard has both a UEFI and a Legacy entry for the same USB drive listed in the boot order menu, always select the entry explicitly labeled “UEFI.” Choosing the unlabeled or Legacy entry boots the USB in CSM mode, which can cause Setup to present the disk as incompatible or locked even when the partition table is correct.

Step 5 — Check for Active Partitions and Remove the Flag

On drives with multiple partitions — especially those that came with a manufacturer recovery partition — Windows Setup sometimes refuses to format because a non-system partition is marked as “active.” In MBR partition tables, only one primary partition should carry the active flag, and if the wrong one does, Setup interprets the situation as a conflict.

Inside DiskPart, after selecting the disk, you can inspect this:

  • list partition — shows all partitions on the selected disk
  • select partition X — replace X with the partition number flagged incorrectly
  • inactive — removes the active flag from that partition

If you’re comfortable with this level of intervention and you’re planning a full clean install anyway, the clean command from Step 3 is faster and eliminates any ambiguity. Reserve the manual inactive flag removal for scenarios where you need to preserve data on other partitions of the same disk.

For broader context on handling Windows-related errors and performance issues, the walkthrough on game stuttering causes and FPS lag fixes demonstrates a similar diagnostic mindset when the system misbehaves at the driver and configuration level. Separately, if you’re interested in how disabling Xbox Game Bar can boost FPS on Windows 11, that’s a useful post-install optimization worth reading after your clean setup is complete.

Conclusion

A system partition locked during formatting is almost always a solvable software conflict, not a hardware failure — so don’t let the error push you toward buying a new drive before you’ve worked through the actual causes. Start with a properly created bootable USB, confirm BitLocker status before you even open Setup, and use DiskPart’s clean command when the partition manager refuses to cooperate. Most users resolve the issue completely within Step 2 or Step 3. If you’ve gone through all five steps and the drive still won’t format, test the disk with a tool like CrystalDiskInfo or the manufacturer’s own diagnostic utility — at that point, a failing drive sector is the one scenario that genuinely warrants hardware inspection.

FAQ

Why does Windows say the drive is locked even from a bootable USB?

The most common reason is BitLocker encryption still active on the drive. Even when booting from external media, Setup detects the encrypted volume and blocks formatting until the encryption is removed or the recovery key is entered. Check your Microsoft account for the saved recovery key before proceeding.

Will the DiskPart “clean” command delete everything on the disk?

Yes — clean removes all partition and volume data from the selected disk, making all stored data unrecoverable through standard means. Always confirm you have selected the correct disk number before running it, and ensure your personal files are backed up beforehand.

Do I need to convert the disk to GPT, or can I keep MBR?

If your system uses UEFI firmware (any PC built after roughly 2012), GPT is strongly recommended and often required for Windows 11. MBR is only appropriate for very old hardware running Legacy BIOS mode. Mismatching the two is a frequent source of locked partition errors during Setup.

Can I fix this error without losing my existing files?

If the goal is only to fix the lock without a clean install, you may be able to use the inactive flag method or decrypt BitLocker while still in a working Windows session. However, if Setup is already running and the partition is inaccessible, a full clean install with prior backup is the most reliable path forward.

What if the error appears on a secondary drive, not the system drive?

For non-system drives, open Disk Management from within Windows (search “diskmgmt.msc”), right-click the volume, and select Format. If it’s blocked there too, open DiskPart, select the specific disk and partition, check its attributes with attributes disk, and clear any read-only flags with attributes disk clear readonly.

Does this error occur on NVMe drives more than SATA drives?

The locked partition error is not specific to a drive interface — it appears on NVMe, SATA SSD, and traditional hard drives equally. That said, NVMe drives on newer systems are more likely to have automatic BitLocker encryption enabled by default, which makes the error somewhat more common on recent hardware. The diagnostic and fix steps are identical regardless of the drive type connected.

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *

Rolar para cima