During the deployment at the step of copying the image and installing the operating system :
You get this error with the dialog box :
The Installation was canceled
Any changes made to your computer won't be saved.
Windows could not format a partition on disk 0 or x. The target Disk, partition, or volume does not support the specified operation. The error occurred while preparing the partition selected for installation. Error code: 0x80300024.
- The MSR should be located after the EFI System Partition (ESP) and any OEM service partitions, but it must be located before any primary partitions of bootable Windows operating systems. Microsoft expects an MSR to be present on every GPT disk, and recommends it to be created as the disk is initially partitioned.
Disk size | MSR size |
---|---|
Less than 16 GB | 32 MB (32 × 220 bytes) |
Greater than 16 GB | 128 MB |
- But with the installation of windows 11 takes care of the creation of this partition, so it is not necessary to create it beforehand.
- Other point to install windows 11 tips of Microsoft : Ways to install Windows 11
- Duplicate this Pre-install default task for delete the ligne of code not appropriate : "ECHO Create partition msr size=128"
[DISK] Create BIOS/UEFI Partitions
@echo off
wpeutil UpdateBootInfo
for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET FIRMWARE=%%B
echo Firmware Type: %FIRMWARE%
echo Explanation of Firmware Type: (0x1 is BIOS, 0x2 is UEFI)
if %FIRMWARE%==0x1 goto BIOS
if %FIRMWARE%==0x2 goto UEFI
goto END
:UEFI
(
ECHO select disk 0
ECHO clean
ECHO convert gpt noerr
ECHO create partition efi size=500
ECHO assign letter=s
ECHO format quick fs=FAT32
ECHO Create partition msr size=128
ECHO create partition primary
ECHO assign letter=c
ECHO format quick fs=NTFS
ECHO exit
)>X:\Windows\System32\UEFI.txt
diskpart /s X:\Windows\System32\UEFI.txt
goto END
:BIOS
(
ECHO select disk 0
ECHO clean
ECHO create partition primary
ECHO select partition 1
ECHO assign letter=c
ECHO active
ECHO format quick fs=NTFS
ECHO exit
)>X:\Windows\System32\BIOS.txt
diskpart /s X:\Windows\System32\BIOS.txt
goto END
:END
After duplicate for example rename to Duplicate this : [DISK] Create BIOS/UEFI Partitions / For windows 11 without MSR partition
- Then delete this line of code which is used to create the MSR partition on UEFI part :
And ECHO Create partition msr size=128 on EUFI part deleted :
Version corrected :
@echo off
wpeutil UpdateBootInfo
for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFirmwareType') DO SET FIRMWARE=%%B
echo Firmware Type: %FIRMWARE%
echo Explanation of Firmware Type: (0x1 is BIOS, 0x2 is UEFI)
if %FIRMWARE%==0x1 goto BIOS
if %FIRMWARE%==0x2 goto UEFI
goto END
:UEFI
(
ECHO select disk 0
ECHO clean
ECHO convert gpt noerr
ECHO create partition efi size=500
ECHO assign letter=s
ECHO format quick fs=FAT32
ECHO create partition primary
ECHO assign letter=c
ECHO format quick fs=NTFS
ECHO exit
)>X:\Windows\System32\UEFI.txt
diskpart /s X:\Windows\System32\UEFI.txt
goto END
:BIOS
(
ECHO select disk 0
ECHO clean
ECHO create partition primary
ECHO select partition 1
ECHO assign letter=c
ECHO active
ECHO format quick fs=NTFS
ECHO exit
)>X:\Windows\System32\BIOS.txt
diskpart /s X:\Windows\System32\BIOS.txt
goto END
:END
© 2024 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center