Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save wecacuee/f6929a7d0db3602a379982d6de1f3952 to your computer and use it in GitHub Desktop.

Select an option

Save wecacuee/f6929a7d0db3602a379982d6de1f3952 to your computer and use it in GitHub Desktop.
Make custom windows 11 iso using mkisofs

Download the Window11 ISO

https://www.microsoft.com/en-us/software-download/windows11

extract the current iso

7z x Win11_25H2_English_x64_v2.iso -oExtracted -r

Check ISO tags and format

$ isoinfo -d -i Win11_25H2_English_x64_v2.iso
CD-ROM is in ISO 9660 format
System id: 
Volume id: CCCOMA_X64FRE_EN-US_DV9
Volume set id: CCCOMA_X64FRE_EN-US_DV9
Publisher id: MICROSOFT CORPORATION
Data preparer id: MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080
Application id: CDIMAGE 2.56 (01/01/2005 TM)
Copyright File id: 
Abstract File id: 
Bibliographic File id: 
Volume set size is: 1
Volume set sequence number is: 1
Logical block size is: 2048
Volume size is: 4136525
El Torito VD version 1 found, boot catalog is in sector 22
NO Joliet present
NO Rock Ridge present
Eltorito validation header:
    Hid 1
    Arch 0 (x86)
    ID 'Microsoft Corporation'
    Key 55 AA
    Eltorito defaultboot header:
        Bootid 88 (bootable)
        Boot media 0 (No Emulation Boot)
        Load segment 0
        Sys type 0
        Nsect 8
        Bootoff 216 534

make changes

For example add device drivers from Dell website https://www.dell.com/support/product-details/en-us/servicetag/0-UHh3d0RYdUp0bUEycGhLbmFETXdLQT090/drivers

Copy them in the iso_mnt/sources directory.

repack the iso

https://unix.stackexchange.com/questions/531012/how-to-modify-an-installation-iso-and-keep-it-bootable

mkisofs --allow-limited-size -no-emul-boot -b "boot/etfsboot.com" -boot-load-seg 0 -boot-load-size 8 -eltorito-alt-boot -no-emul-boot -e "efi/microsoft/boot/efisys.bin" -boot-load-size 1 -iso-level 4 -udf -o "win.iso" "source/"

mkisofs \
  -sysid "" \
  -V "CCCOMA_X64FRE_EN-US_DV9" \
  -volset "CCCOMA_X64FRE_EN-US_DV9" \
  -A "CDIMAGE 2.56 (01/01/2005 TM)" \
  -publisher "MICROSOFT CORPORATION" \
  -p "MICROSOFT CORPORATION, ONE MICROSOFT WAY, REDMOND WA 98052, (425) 882-8080" \
  --allow-limited-size \
  -no-emul-boot \
  -b "boot/etfsboot.com" \
  -boot-load-seg 0 \
  -boot-load-size 8 \
  -eltorito-alt-boot \
  -no-emul-boot \
  -e "efi/microsoft/boot/efisys.bin" \
  -boot-load-size 1 \
  -iso-level 4 \
  -udf \
  -o "win.iso" \
  "source/"

Copy it to device

sudo dd  if=Win11_25H2_English_x64_v2_RST.iso  of=/dev/sdc bs=4M status=progress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment