Skip to content

Instantly share code, notes, and snippets.

@wesinator
Created November 16, 2025 02:40
Show Gist options
  • Select an option

  • Save wesinator/403b7fc1a6b8ff8d207c6236437ef074 to your computer and use it in GitHub Desktop.

Select an option

Save wesinator/403b7fc1a6b8ff8d207c6236437ef074 to your computer and use it in GitHub Desktop.
WinPE ISO for EFI platforms

https://support.microsoft.com/en-us/kb/947024

Oscdimg command arguments

m

Ignores the maximum size limit of the image.

o

Optimizes storage by encoding duplicate files only one time.

u2

Produces an ISO image that has only the Universal Disk Format (UDF) file system on it.

udfver102

Specifies the UDF version 1.02 format.

bootdata

Specifies a multiboot image. This image uses an x86-based boot sector as the default image. This sector starts the Etfsboot.com boot code. A secondary EFI boot image starts an EFI boot application.

c:\winpe_x64\ISO

Represents the path of the files for the image.

c:\winpe_x64\winpeuefi.iso

Represents the output image file.

Bootdata command arguments

2

Specifies the number of boot catalog entries.

#

Functions as the separator between root entries to be put into the boot catalog.

p0

Sets the platform ID to 0 for the first, default boot entry for the BIOS.

e

Specifies the floppy disk emulation in the El Torito catalog.

bc:\winpe_x64 \etfsboot.com

Puts the specified file (Etfsboot.com) in the boot sectors of the disk.

#

Functions as the separator between the first and second boot entries.

pEF

Sets the platform ID to "EF," as defined by the UEFI specification.

bc:\winpe_x64\efisys.bin

Puts the specified file (Efisys.bin) in the boot sector of the disk. Efisys.bin is the binary floppy disk layout of the EFI boot code. This disk image contains the files that are used to start from the EFI firmware in the Efi\boot\x64boot.efi folder.

See also

https://www.deploymentresearch.com/how-to-really-create-a-windows-10-build-10041-iso-no-3rd-party-tools-needed/

:: https://learn.microsoft.com/en-us/troubleshoot/windows-server/setup-upgrade-and-drivers/create-iso-image-for-uefi-platforms
oscdimg -m -o -u2 -udfver102 -bootdata:2#p0,e,bc:\winpe_x64\etfsboot.com#pEF,e,bc:\winpe_x64\efisys.bin c:\winpe_x64\ISO c:\winpe_x64\winpeuefi.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment