You pick a drive in Windows Setup, click Next, and the installer stops with "We couldn't install Windows in the location you chose." The code under it, 0x80300024, says Setup couldn't create or use the partitions it needs, and there are only a handful of reasons that happens. This guide walks through each cause of error 0x80300024 from the cheapest check to the one that wipes a disk, so you fix the right thing first.
What Error 0x80300024 Means
Windows Setup needs to lay down a small set of partitions before it copies a single file: a boot partition the firmware can read, and the partition Windows lives on. Error 0x80300024 is Setup saying it couldn't do that on the drive you picked. The full message usually reads "We couldn't install Windows in the location you chose. Please check your media drive," with the code at the end.
The code doesn't say why. In practice it comes down to five causes:
- Another drive gets in the way. A second SSD, an old HDD or a USB stick is present, and Setup tries to place the boot partition on it.
- The installer booted in the wrong mode. The USB started in UEFI mode and the disk is MBR, or the other way round.
- The disk has leftover partitions. Old recovery or OEM partitions leave Setup without the layout it expects.
- The storage controller hides the disk's real shape. RAID or Intel VMD mode without the right driver.
- The media or the drive is bad. A corrupt installer, or a disk that is failing.
The first three cover the cases you'll see on a normal build. The last two are rarer and cost more to check.
Check Three Things Before You Touch Diskpart
Setup gives you a command prompt. Press Shift+F10 on any Setup screen and you get a shell with enough tools to see what's wrong before you change anything.
First, check which firmware mode the installer booted in. Microsoft's WinPE documentation gives a one-line registry query for it:
cmdreg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType
A return of 0x1 means the installer is running in legacy BIOS mode. 0x2 means UEFI. Write it down, because the fix in the next sections depends on it.
Second, look at the disks. Run diskpart, then list disk. You get every disk with its size, and an asterisk in the Gpt column for disks that already use the GPT partition style. Count the disks. If you see more than one, the first fix below is your likely answer.
Third, read the Setup log. Before Setup can write to the target drive, it logs to X:\Windows\Panther. Open setupact.log with notepad from the same prompt and search for the time of the failure. The lines just above it usually name the disk and partition Setup was working on.
Fix 1: Unplug Every Other Drive
This is the fix that surprises people, and it's free. When a machine has more than one disk, Setup can decide the boot partition belongs on a drive that isn't the one you picked. On a new build with a spare SSD, or a workstation that still has its old data drive, that decision is what trips error 0x80300024.
Power down, then disconnect every drive except the target: extra SATA and NVMe drives, external disks and card readers. Leave only the installer USB. Run Setup again. Once Windows is installed and booting, reconnect the other drives.
If you can't unplug a drive (a soldered NVMe, or a remote hands job), open the firmware setup and make the target drive the first boot device instead. It isn't as reliable as a physical disconnect, but it often gets Setup to put its partitions where you want them.
This thread from r/buildapc is the multiple-drive version of the problem, with the fix in the title.
The same logic covers USB devices. In one Microsoft Q&A thread on this exact error, the answer that worked was to unplug every USB device except the installer, not just the ones that looked like storage.
Fix 2: Boot the Installer in the Right Mode
A disk's partition style has to match the mode the installer booted in. UEFI boots from GPT disks. Legacy BIOS, including the compatibility support module (CSM) many firmware menus still ship with, boots from MBR disks. Microsoft's own partition style guide spells out the mismatch: a PC booted in UEFI mode can't install to a disk that isn't GPT.
Most of the time the mismatch is an accident of the boot menu. Firmware often lists the same USB stick twice, once as "UEFI: USB Drive" and once without the prefix. Both start the same installer, but in different modes. Pick the UEFI entry for any Windows 11 install, since Windows 11 requires UEFI with Secure Boot capability.
If you boot in UEFI mode and the disk is MBR, you have two choices: convert the disk to GPT (next section), or reboot in legacy mode and keep the MBR layout. For a new install, convert. Our guide to UEFI vs BIOS covers why UEFI is the mode to standardize on.
Fix 3: Wipe and Convert the Drive With Diskpart
When the other fixes don't clear it, the disk layout is the problem. Old recovery partitions, an OEM layout from a different machine, or a half-finished earlier install all leave Setup with nothing it can use. The fix is to give Setup an empty disk.
This erases everything on the drive. Back up first, and check the disk number twice.
The gentle version needs no commands. On the "Where do you want to install Windows?" screen, select each partition on the target drive and click Delete until the drive shows a single block of unallocated space. Select it and click Next. If Setup booted in UEFI mode, it formats the drive as GPT on its own.
If Delete is greyed out or the error comes back, use diskpart from Shift+F10. These are the steps from Microsoft's partition style guide:
cmddiskpart list disk select disk 0 clean convert gpt exit
Replace 0 with the number of your target disk from list disk, matching it by size. clean only removes the partition table, so it takes seconds. clean all zeroes every sector and can take hours on a large disk; you don't need it here.
If diskpart refuses with an error about the disk being read-only, a hardware switch or a disk attribute is blocking writes. Our guide to write-protected disks covers clearing that before you try again.
Need to keep the data? clean isn't for you. Microsoft's MBR2GPT tool converts a disk from MBR to GPT without deleting data, but it runs against an existing Windows install, not a blank drive in Setup. Use it when an installed PC needs to move to UEFI.
Fix 4: Check the Storage Controller Mode
On some business laptops and desktops, the firmware runs storage through a RAID controller or Intel's Volume Management Device (VMD) instead of plain AHCI. Setup can see the disk only through the matching driver. Without it, the disk may not show up at all, or it shows up in a way Setup can't partition.
You have two options. Load the storage driver from the PC vendor's support site on the "Where do you want to install Windows?" screen with Load driver. Or switch the controller to AHCI in firmware before installing. Only switch on a blank disk: changing the mode under an existing Windows install can stop it booting.
A firmware update sometimes fixes storage detection too, since vendors ship controller fixes that way. Our guide to BIOS updates covers when one is worth the risk.
This walkthrough covers the Setup-screen fixes, from deleting partitions to diskpart.
Fix 5: Rule Out Bad Media and a Failing Drive
If the error survives a clean disk in the right mode with nothing else plugged in, test the two things you've trusted so far. Rebuild the installer with Microsoft's Media Creation Tool on a different USB stick. Then check the target drive's health in the firmware's diagnostics, or with the vendor's drive tool from another PC.
A drive that reports errors, or whose size looks wrong in list disk, isn't worth fighting with. Swap it.
This r/techsupport thread shows how many dead ends the error can send you down before the real cause turns up.
Stop It Happening on the Next Build
Error 0x80300024 is a build-bench problem, so the prevention is a bench routine. Keep one installer per mode and label it, or strip the legacy boot files so it can only start in UEFI: Microsoft's WinPE guidance says removing bootmgr from the root of the media forces UEFI. Disconnect extra drives before you start. And check PEFirmwareType before you partition anything.
For machines already in service, know the firmware mode before a reimage. OpenFrame can run a script across a client's devices that reports each machine's firmware type and partition style, and collect the output in one place.
The Short Version
Error 0x80300024 means Setup couldn't build its partitions on the drive you chose. Unplug every other drive first. Then match the boot mode to the partition style, UEFI with GPT for Windows 11. If the disk still refuses, delete its partitions or run clean and convert gpt, and only then look at the storage controller and the drive itself.
If you're reinstalling to hand a PC to someone new, our guide on how to factory reset Windows 11 covers the options that don't need a USB stick at all.
Dmytro Koval
Head of Product Engineering
Hi! My name is Dmytro, but everyone calls me Dima. I’m a Software Developer and together with the development team, I help bring Flamingo to life — putting it on its feet from a technical perspective. Originally from Lviv, Ukraine 🇺🇦, but currently based in Spain, where I’ve been enjoying the blend of great weather, culture, and nature. I’m passionate about the mountains and love traveling — exploring new places and cultures really inspires me. These experiences constantly recharge me and give me a fresh perspective, both personally and professionally.
