The Windows Installer displays a 0x80070057 error code with a “Failed to prepare or format the partition during Windows installation” message when trying to install a clean copy of Windows.
The filesystem, hard drive or hard drive connector may be corrupt. This can be caused by software or hardware problems.
- Reset the BIOS.
- Go into the BIOS and “Load Optimized Defaults” for “Other OS”.
- Use a different installation media – USB, SD-Card, or DVD.
- Use DiskPart to manually create the NFTS main partition.
- Use WinToUSB to create a live boot Windows USB drive. Boot from it and use Disk Management to format the partition if DiskPart fails.
- Use the live system to update the BIOS.
- Change the SATA cable.
- Change the hard drive/SSD.
If all of these fail, then it’s probably a hardware problem. Contact your manufacturer for repair. In my case, my computer turned out to have a broken motherboard.