Workaround for 0x80300024 Error In Windows 10/11 Setup

During the installation of Windows 10 or Windows 11, on the partition creation and formatting page, you may encounter error 0x80300024. This error occurs on hardware configurations with multiple hard drives or SSDs. It is caused by inability of Windows Setup to correctly recognize which internal storage device is bootable.

But there is a workaround for error 0x80300024: by manually transferring the bootloader, BCD registry hive and bootable ramdisk to internal bootable storage device and booting from that device, we can hint Windows Setup which of the multiple internal storage devices is bootable. Windows installation will then proceed as usual.

Contents

1. Symptoms of the problem

During the installation of Windows 10 or Windows 11 to your computer the following error occurs:

We coundn't install Windows in the location you chose. Please check your media drive. Here's more info about what happened: 0x80300024.

Windows Setup Error 0x80300024
Windows Setup Error 0x80300024

2. Cause of this problem

For hardware configurations with multiple internal storage devices (hard drives or SSDs), Windows Setup must determine which one of these storage devices is set as bootable in firmware (BIOS or UEFI) settings. Then Windows Setup will install its bootloader together with configuration file (BCD hive) to the separate partition on that storage device.

Error 0x80300024 occurs when Windows Setup is unable to determine which internal storage device is bootable or when Windows Setup, for some reason, misdetects bootable storage device.

3. Solution in a nutshell

  1. Start diskpart in console window of the Windows Setup.
  2. Depending on intended boot mode (UEFI or CSM/BIOS), initialize appropriate disk layout on the target storage device (GPT in UEFI boot mode, MBR in CSM/BIOS boot mode).
  3. Create small 512-768 MB partition for Windows bootloader and its registry hive on the target storage device (EFI System Partition in UEFI boot mode, System Reserved Partition in CSM/BIOS boot mode).
  4. Format that small partition (using FAT32 filesystem in UEFI boot mode, or using NTFS filesystem in CSM/BIOS boot mode).
  5. Mark that partition as active and install volume boot record there (only in CSM/BIOS boot mode).
  6. Copy Windows bootloader files, BCD hive and boot ramdisk of Windows Setup to that small partition.
  7. Reboot computer from internal storage device with Windows Setup USB thumbdrive plugged in.
  8. Remove boot ramdisk of Windows Setup from internal storage device (to release free space in that small bootable partition for future use by Windows Setup) and continue installation of Windows as usually.

4. Step by step guide for UEFI boot method

1) Press Shift+F10 to open console window

2) Run diskpart command. In diskpart context, run list disk command.

3) Determine target storage device you want to install Windows to (if there are multiple storage devices listed here, distinguish them by size). Note its number.

4) Run select disk N command where N is a disk number noted on the step 3.

Workaround for error 0x80300024: Step 1 (UEFI)
Workaround for error 0x80300024: Step 1 (UEFI)

5) Make sure that target disk has GPT layout. You must save your files from target disk before entering these commands, otherwise you will lose your data! Commands to forcibly change disk layout are: clean, then convert gpt. If you are absolutely sure that target disk already has GPT layout (not MBR), then you may skip this step.

6) Run create partition efi size=768 command in diskpart context. It will create unformatted EFI System Partition. Depending on size of bootable ramdisk (\sources\boot.wim) on Windows Setup media, you may choose smaller size of this partition (down to 512 MB if necessary), but generally few extra megabytes won't hurt and it's better to be safe than sorry.

7) Format newly created partition to FAT32 filesystem and assign drive letter S: to it: format fs=fat32 quick, then assign letter=s.

Workaround for error 0x80300024: Step 2 (UEFI)
Workaround for error 0x80300024: Step 2 (UEFI)

8) Run list vol command in diskpart context to determine drive letter for Windows Setup media (C: in this example). Distinguish Windows Setup media from the rest of volumes by size. Drive letter may be arbitrary, make corrections down to the end of this section if drive letter is not C: in your case.

9) Run exit command to exit diskpart.

Workaround for error 0x80300024: Step 3 (UEFI)
Workaround for error 0x80300024: Step 3 (UEFI)

10) Install Windows UEFI loader and its BCD hive to the EFI System Partition (copy from Windows Setup media). To do this, run the following commands:
mkdir S:\boot
copy /b C:\boot\boot.sdi S:\boot\boot.sdi
mkdir S:\EFI
xcopy /E /H /K C:\EFI S:\EFI
del S:\EFI\Microsoft\Boot\cdboot*
del S:\EFI\Microsoft\Boot\efisys*.bin

11) Copy boot ramdisk from Windows Setup media to the EFI System Partition:
mkdir S:\sources
copy /b C:\sources\boot.wim S:\sources\boot.wim

Workaround for error 0x80300024: Step 4 (UEFI)
Workaround for error 0x80300024: Step 4 (UEFI)

12) Finally, run wpeutil reboot command to reboot. During reboot, press boot menu key (as appropriate for your laptop or motherboard) and choose to boot from internal HDD/SSD in UEFI mode.

13) After reboot, on the first page of Windows Setup, before clicking Next, press Shift+F10 to open console window and enter the following commands (otherwise Windows Setup may run out of free space in the EFI System Partition):
mountvol S: /S
rmdir /S /Q S:\sources
rmdir /S /Q S:\boot
mountvol S: /D
exit

Workaround for error 0x80300024: Step 5 (UEFI)
Workaround for error 0x80300024: Step 5 (UEFI)

14) Make sure that USB thumbdrive with Windows Setup is plugged in to the USB port. Continue Windows Setup as usually.

15) When Windows Setup completes, to remove stale boot entry from the boot menu, open elevated command prompt (press Win+X, choose "Windows PowerShell (Admin)", from there run start cmd command) and enter the following commands:
bcdedit /enum /v
bcdedit /delete {7619dcc9-fafe-11d9-b411-000476eba25f}
bcdedit /enum /v
exit
(adjust the above GUID as necessary). Voila!

Workaround for error 0x80300024: Step 6 (UEFI)
Workaround for error 0x80300024: Step 6 (UEFI)

5. Step by step guide for CSM/BIOS boot method

1) Press Shift+F10 to open console window

2) Run diskpart command. In diskpart context, run list disk command.

3) Determine target storage device you want to install Windows to (if there are multiple storage devices listed here, distinguish them by size). Note its number.

4) Run select disk N command where N is a disk number noted on the step 3.

Workaround for error 0x80300024: Step 1 (BIOS)
Workaround for error 0x80300024: Step 1 (BIOS)

5) Make sure that target disk has MBR layout. You must save your files from target disk before entering these commands, otherwise you will lose your data! Commands to forcibly change disk layout are: clean, then convert mbr. If you are absolutely sure that target disk already has MBR layout (not GPT), then you may skip this step.

6) Run create partition primary size=768 command in diskpart context. It will create unformatted System Reserved Partition. Depending on size of bootable ramdisk (\sources\boot.wim) on Windows Setup media, you may choose smaller size of this partition (down to 512 MB if necessary), but generally few extra megabytes won't hurt and it's better to be safe than sorry.

7) Format newly created partition to NTFS filesystem and assign drive letter S: to it: format fs=ntfs quick, then assign letter=s.

Workaround for error 0x80300024: Step 2 (BIOS)
Workaround for error 0x80300024: Step 2 (BIOS)

8) Mark newly created partition as active/bootable in the MBR: run active command in diskpart context.

9) Run list vol command in diskpart context to determine drive letter for Windows Setup media (D: in this example). Distinguish Windows Setup media from the rest of volumes by size. Drive letter may be arbitrary, make corrections down to the step 14 of this section if drive letter is not D: in your case.

10) Run exit command to exit diskpart.

Workaround for error 0x80300024: Step 3 (BIOS)
Workaround for error 0x80300024: Step 3 (BIOS)

11) Install Windows BIOS loader and its BCD hive to the System Reserved Partition (copy from Windows Setup media). To do this, run the following commands:
mkdir S:\boot
xcopy /E /H /K D:\boot S:\boot
copy /b D:\bootmgr S:\bootmgr

12) Write NTFS volume boot record to the System Reserved Partition:
D:\boot\bootsect.exe /nt60 S: /mbr

13) Copy boot ramdisk from Windows Setup media to the System Reserved Partition:
mkdir S:\sources
copy /b D:\sources\boot.wim S:\sources\boot.wim

Workaround for error 0x80300024: Step 4 (BIOS)
Workaround for error 0x80300024: Step 4 (BIOS)

14) Finally, run wpeutil reboot command to reboot. During reboot, press boot menu key (as appropriate for your laptop or motherboard) and choose to boot from internal HDD/SSD in CSM/BIOS mode.

15) After reboot, on the first page of Windows Setup, before clicking Next, press Shift+F10 to open console window and enter the following commands (otherwise Windows Setup may run out of free space in the System Reserved Partition):
diskpart
list vol (take a note of new drive letter of System Reserved Partition here, C: in this case)
exit
rmdir /S /Q C:\sources (adjust accordingly to the above).
exit

Workaround for error 0x80300024: Step 5 (BIOS)
Workaround for error 0x80300024: Step 5 (BIOS)

16) Make sure that USB thumbdrive with Windows Setup is plugged in to the USB port. Continue Windows Setup as usually.

17) When Windows Setup completes, to remove stale boot entry from the boot menu, open elevated command prompt (press Win+X, choose "Windows PowerShell (Admin)", from there run start cmd command) and enter the following commands:
bcdedit /enum /v
bcdedit /delete {7619dcc9-fafe-11d9-b411-000476eba25f}
bcdedit /enum /v
exit
(adjust the above GUID as necessary). Voila!

Workaround for error 0x80300024: Step 6 (UEFI)
Workaround for error 0x80300024: Step 6 (UEFI)