sodcalculator

10 Tech How-To

Error 0x80070057 Windows Could Not Format Partition? Fix

Guide 10-13179 · Updated · Step by step

Error 0x80070057 during Windows installation means the installer cannot format the selected partition, usually due to a corrupted partition table, an invalid disk layout, or a failing drive. The fix is to delete all partitions on the target disk and let Windows create a fresh one, or use DiskPart’s clean command to reset the disk completely. Below is a step-by-step guide for both methods, plus what to do when they fail.

What Causes Error 0x80070057 During Formatting

The error code 0x80070057 translates to “The parameter is incorrect.” When Windows Setup tries to format a partition, it sends a request to the disk subsystem. If the partition table contains invalid entries, leftover GPT/MBR metadata, or a partition size that doesn’t align with the drive’s logical sector size, the formatting call fails and Setup shows this error. Common triggers include:

  • A disk that was previously used with a RAID controller or a different operating system, leaving incompatible partition structures.
  • An MBR disk that has more than four primary partitions or a corrupted extended partition.
  • A USB drive or SD card being used as the installation media that is itself the target disk (rare but happens).
  • A failing hard drive with bad sectors that prevent the format operation from completing.
  • BIOS/UEFI mode mismatch: the disk is GPT but the system is booting in legacy BIOS mode, or vice versa.

Understanding the cause matters because the fix differs. If it’s a partition table issue, deleting and recreating partitions solves it. If it’s a firmware mode mismatch, you need to change the boot mode or convert the disk. If the drive is failing, no software fix will work reliably.

Method 1: Delete All Partitions in Windows Setup

This is the quickest fix and works for most partition table corruption. It erases everything on the disk, so back up any data you need first.

  1. Boot from your Windows installation USB or DVD.
  2. When you reach the “Where do you want to install Windows?” screen, look at the list of partitions on Disk 0.
  3. Select each partition on Disk 0 one by one and click Delete. Confirm each deletion. You should also delete the small system reserved partitions (usually 100 MB to 500 MB).
  4. After all partitions are gone, the disk will show as “Unallocated Space”.
  5. Select the unallocated space and click Next. Windows will automatically create the necessary partitions and format them.

If the delete option is greyed out, or if you see multiple disks and you’re not sure which is Disk 0, proceed to Method 2.

Method 2: Use DiskPart to Clean the Disk

DiskPart is a command-line tool that gives you more control. The clean command removes all partition information and sector-level data, effectively resetting the disk to a blank state. This is more thorough than deleting partitions in the GUI.

  1. At the Windows Setup screen, press Shift + F10 to open a Command Prompt.
  2. Type diskpart and press Enter.
  3. Type list disk and press Enter. Note the disk number that matches your target drive (usually Disk 0, but verify by size).
  4. Type select disk 0 (replace 0 with the correct number) and press Enter.
  5. Type clean and press Enter. This removes all partitions and the partition table.
  6. Type exit and press Enter, then close the Command Prompt.
  7. Back in Windows Setup, click Refresh. The disk should now show as unallocated space.
  8. Select it and click Next to install.

If you need to convert the disk to GPT (for UEFI) or MBR (for legacy BIOS), you can use convert gpt or convert mbr after cleaning, but only if you know which firmware mode your system uses. Windows Setup will usually handle this automatically when you install on unallocated space.

Method 3: Check BIOS/UEFI Boot Mode

A mismatch between the disk partition style and the firmware boot mode is a frequent cause of formatting errors. UEFI systems require GPT disks, while legacy BIOS requires MBR. If you try to install Windows on a GPT disk while booting in legacy mode, Setup may fail with 0x80070057 or a similar error.

  • Enter your BIOS/UEFI settings (usually by pressing Del, F2, F12, or Esc during boot).
  • Look for a setting called Boot Mode, UEFI/Legacy, or CSM (Compatibility Support Module).
  • If you want to use UEFI (recommended for Windows 10/11), set it to UEFI and disable CSM.
  • If you must use legacy mode, enable CSM or set to Legacy.
  • Save changes and reboot, then try the installation again.

If you’re not sure which mode you’re in, check the boot menu: UEFI boot entries often have “UEFI” in the name (e.g., “UEFI: USB Drive”). If you see only the drive name without “UEFI”, you’re booting in legacy mode.

What to Do If the Error Persists

If you’ve cleaned the disk and checked the boot mode, but the error still appears, the problem is likely hardware-related or the installation media is corrupted.

  • Try a different USB port – preferably a USB 2.0 port on the back of the PC. Some USB 3.0 ports can cause issues during installation.
  • Recreate the installation media – use Microsoft’s Media Creation Tool to make a fresh USB. A corrupted ISO or a faulty USB stick can cause random errors.
  • Test the hard drive – use a tool like CrystalDiskInfo (if you can boot into another OS) or the built-in chkdsk from the Command Prompt. Run chkdsk C: /f if you can access the drive, or use the manufacturer’s diagnostic tool.
  • Check the SATA cable and power connection – a loose or damaged cable can cause intermittent errors. Try a different SATA port.
  • Remove other drives – disconnect any secondary hard drives or SSDs during installation. Sometimes the installer gets confused by multiple disks.

If the drive is failing, you’ll need to replace it. If it’s a new drive and still fails, try updating the BIOS/UEFI firmware from the manufacturer’s website.

Frequently Asked Questions

Will this erase all my data?

Yes, both methods delete all partitions and data on the target disk. There is no way to format a partition without erasing its contents. If you have important files, you need to back them up before proceeding. If the disk won’t boot, you can use a live Linux USB to copy files to an external drive.

Can I fix this without losing data?

In rare cases, the error is caused by a temporary glitch, and a simple reboot fixes it. But if the partition table is corrupted, you might be able to recover data using third-party partition recovery tools before formatting. However, these tools are not guaranteed to work, and the safest approach is to accept data loss and restore from backups.

Why does Disk 0 show multiple partitions?

Windows creates several partitions during installation: a small EFI system partition (100-500 MB), a Microsoft Reserved partition (16 MB), and the main C: drive. If the disk was previously used, it may have recovery partitions or OEM partitions. Deleting all of them is necessary to get a clean slate.

Is DiskPart’s clean command safe?

Yes, but only if you select the correct disk. The clean command completely wipes the selected disk, so double-check the disk number in list disk. If you accidentally select the wrong disk (like an external backup drive), you’ll lose all its data.

What if the error occurs on a secondary drive, not Disk 0?

The same methods apply. Just select the correct disk number in DiskPart or delete the partitions on that specific disk in Setup. The error message usually specifies the disk number, so pay attention to that.

Can I use a third-party partitioning tool instead?

Yes, tools like GParted (from a live Linux USB) or MiniTool Partition Wizard can also delete and recreate partitions. They can sometimes handle corrupted partition tables that Windows Setup cannot. However, the built-in DiskPart method is free and works in most cases.

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

The whole Tech How-To bed →