Skip to content

Instantly share code, notes, and snippets.

@moisoto
Last active February 2, 2021 19:44
Show Gist options
  • Save moisoto/4134778e0d63a77053ce6e045b1d7c30 to your computer and use it in GitHub Desktop.
Save moisoto/4134778e0d63a77053ce6e045b1d7c30 to your computer and use it in GitHub Desktop.
Creating an Install Image for Windows 10 on a Mac

Creating an Install Image for Windows 10 on a Mac

Format Memory Stick

  • Insert your memory stick (16GB Minimum) and check the disk which is associated to it by executing the command diskutil list | grep external:
$ diskutil list | grep external
/dev/disk2 (external, physical):
  • To erase and format the memory stick run the following command substituting diskN with the disk displayed by the previous command:
# Be very careful with this command
diskutil eraseDisk MS-DOS "WIN10" MBR diskN

Download and Mount your Windows 10 ISO

  • Mount the Windows ISO:
$ hdiutil mount ~/Downloads/Win10_20H2_v2_English_x64.iso
/dev/disk3          	   /Volumes/CCCOMA_X64FRE_EN-US_DV9

Copy the ISO image to the Memory Stick

  • Copy files from the ISO to the Memory Stick (notice the second to last argument is the mount point returned by the previous command result):
rsync -vha --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WIN10
brew install wimlib
  • Split install.wim into 4,000MiBs chunks to the Memory Stick
wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment