Run in Terminal:
brew install wimlib- run, ifwimlibis not installed yet (required for splitting large files)- To identify target USB device, run:
diskutil list - Format USB drive:
diskutil eraseDisk MS-DOS "$WIN_USB_NAME" MBR /dev/$DISKwhere$WIN_USB_NAMEis a new volume name (e.g. WIN) and$DISKis a target disk identificator (e.g. disk5). Alternatively, you can tryGTPpartititon style instead ofMBR(recommended for UEFI = newer Windows distributions) - To mount Windows installer image, run:
hdiutil mount ~/Desktop/$WIN_INSTALLER_IMAGE.isowhere $WIN_INSTALLER_IMAGE is installer image name. - Copy all files to the USB drive, beside the "install" file (if it's over 4GB size):
rsync -vha --exclude=sources/install.$EXT /Volumes/$WIN_INSTALLER_NAME/ /Volumes/$WIN_USB_NAMEwhere $EXT iswimoresd, $WIN_INSTALLER_NAME is the mounted Windows installer volume name and $WIN_USB_NAME is target disk name.