Windows Installer error 0x80300002 appears when Windows Setup cannot write to the disk or partition you selected, usually because of a partition style mismatch, a full or protected partition, or a corrupted boot configuration. The fix is to prepare the target drive correctly before installation: convert it to GPT if your firmware is UEFI, delete and recreate the partition, or run diskpart commands to clean the drive. Below are the exact steps and the reasons behind each one.
What This Error Means
Error 0x80300002 is a Windows Setup error, not a runtime error. It occurs during a clean installation or upgrade when the installer tries to apply the image to a disk but fails at the partitioning stage. The code itself is generic—it does not point to a single fault, but rather to any condition that prevents Windows from writing boot files or system files to the selected location.
Common triggers include:
- Attempting to install to a dynamic disk instead of a basic disk.
- Using a MBR (Master Boot Record) partition table on a UEFI-based computer.
- Leaving a small hidden system partition (like the 100 MB EFI partition) in an incompatible state.
- Having a disk with more than four primary partitions (MBR limit).
- Running Setup from a corrupted USB drive or a drive that contains remnants of a previous Windows installation.
UEFI vs. Legacy BIOS: The Root Cause
The most frequent cause of 0x80300002 is a mismatch between the firmware mode and the partition style. Modern computers use UEFI firmware, which expects the boot drive to use the GPT (GUID Partition Table) format. Older BIOS systems use MBR. If you boot the Windows installer in UEFI mode but the target disk is MBR, Setup cannot create the required EFI System Partition (ESP) and throws this error.
Conversely, if you boot in Legacy BIOS mode and the disk is GPT, you get a different error (0x80300024 or similar), but the underlying problem is the same: the installer cannot place the boot files where the firmware expects them.
To check your firmware mode before installing, restart the PC and enter the firmware setup (usually by pressing Del, F2, F10, or Esc during boot). Look for a setting called “Boot Mode,” “UEFI/Legacy,” or “CSM” (Compatibility Support Module). If it says UEFI, you need a GPT disk.
How to Fix Error 0x80300002
Follow these steps in order. The first two are the most likely fixes; the later ones address less common causes.
- Delete all partitions on the target drive. When you reach the “Where do you want to install Windows?” screen, select each partition on the drive you want to use and click “Delete.” This removes the partition table and any hidden system partitions. Then select the unallocated space and click “Next.” Windows will automatically create the correct partitions for your firmware mode.
- Use diskpart to clean the drive. If deleting partitions does not work, boot from the installation media, press Shift+F10 to open a command prompt, and run:
diskpart list disk select disk X (replace X with the number of your target disk) clean convert gpt (if you are using UEFI) exit
The
cleancommand removes all partition information, andconvert gptchanges the partition table to GPT. Then close the prompt and retry the installation. - Check the BIOS boot mode. If you are not sure whether your system uses UEFI or Legacy, check the firmware settings. If it is set to “Legacy” or “CSM,” change it to “UEFI” (if your hardware supports it) and try again. Alternatively, if you must use Legacy mode, convert the disk to MBR instead of GPT.
- Remove extra drives. Disconnect any secondary hard drives or SSDs during installation. Sometimes the installer tries to write boot files to a non-system drive, causing the error. After Windows is installed, reconnect the other drives.
- Recreate the installation media. A corrupted USB drive or a bad ISO image can cause Setup to fail at random points. Use Microsoft’s Media Creation Tool to create a fresh USB drive, or try a different USB port (preferably USB 2.0).
- Check disk health. If the drive has bad sectors, Setup may fail to write. Run
chkdsk /f /ron the drive from the command prompt, or use the manufacturer’s diagnostic tool. If the disk is failing, replace it.
What Not to Do
Several common “fixes” circulated online are either useless or harmful:
- Do not format the partition from within Setup and expect it to fix the error. Formatting only clears the filesystem; it does not change the partition table type or recreate the hidden system partitions.
- Do not ignore the error and restart. The installation is incomplete; you may end up with a system that boots to a black screen or a recovery loop.
- Do not use third-party partitioning tools unless you understand what they do. They can convert GPT to MBR, but if your firmware is UEFI, that will make things worse.
When the Error Appears After a Windows Update
Sometimes 0x80300002 appears not during a clean install, but when a feature update (like Windows 10/11 version upgrade) tries to apply. This is rarer but happens when the system partition is too small or the boot configuration data (BCD) is corrupted. In that case, try the following:
- Run
sfc /scannowfrom an elevated command prompt to repair system files. - Run
dism /online /cleanup-image /restorehealthto fix the component store. - If the update still fails, use the Windows Update Troubleshooter from Settings > Update & Security > Troubleshoot.
- As a last resort, perform a repair upgrade by downloading the ISO and running setup.exe from within Windows, choosing “Keep personal files and apps.”
Frequently Asked Questions
Will I lose my data if I clean the disk?
Yes, the clean command erases everything on the selected disk, including all partitions and files. Back up any important data to an external drive before running it. If you are trying to fix an existing Windows installation, consider other options first.
How do I know if my disk is GPT or MBR?
In the Windows Setup command prompt, type diskpart, then list disk. Look at the “Gpt” column—an asterisk (*) means the disk is GPT. If there is no asterisk, it is MBR.
Can I install Windows 11 on an MBR disk?
Windows 11 requires UEFI and GPT for the system drive. If your computer supports UEFI, you can convert the disk to GPT using the diskpart method above. If your computer only supports Legacy BIOS, Windows 11 is not officially supported.
What if I have a dynamic disk?
Windows Setup cannot install to a dynamic disk. You must convert it to basic. The clean command in diskpart will remove the dynamic volume structure, but it will also delete all data. Alternatively, use a third-party tool to convert dynamic to basic without data loss, but this is not guaranteed to work.
Why does the installer show multiple partitions on a new drive?
Windows Setup creates several hidden partitions (EFI, MSR, Recovery) in addition to the main C: drive. This is normal. Do not delete them unless you are troubleshooting; deleting them can cause boot problems.
Is error 0x80300002 the same as 0x80300024?
No, they are different codes. 0x80300024 usually indicates that the selected partition is too small or that the disk is not properly formatted. 0x80300002 is more often related to partition table type or boot configuration. The fixes overlap, but the diskpart clean method works for both.
Preventing the Error on Future Installations
To avoid this error on your next install, always verify the firmware mode before you start. If you are building a new PC, set the BIOS to UEFI and install Windows to a GPT disk. If you are reusing an old drive, wipe it with diskpart before starting. Also, ensure your installation media is created with the latest Media Creation Tool and that you boot from it correctly (select the UEFI entry in the boot menu, not the legacy one).
If you are installing on a system with multiple drives, disconnect all but the target drive. This prevents the installer from writing boot files to the wrong disk, a common cause of this error that is easy to overlook.
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
- How to Cool Down an Overheating Laptop
- Good Password: How to Create One
- Remove Write Protection on External Hard Drive
- How to Disable Chkdsk at Windows Startup
- Restore WiFi and Secure Your Netgear Router After Reset
- Fix Error 0x80004005: Top Easy Ways That Work