Run in Terminal:
brew install wimlib
- run, ifwimlib
is 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/$DISK
where$WIN_USB_NAME
is a new volume name (e.g. WIN) and$DISK
is a target disk identificator (e.g. disk5). Alternatively, you can tryGTP
partititon style instead ofMBR
(recommended for UEFI = newer Windows distributions) - To mount Windows installer image, run:
hdiutil mount ~/Desktop/$WIN_INSTALLER_IMAGE.iso
where $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_NAME
where $EXT iswim
oresd
, $WIN_INSTALLER_NAME is the mounted Windows installer volume name and $WIN_USB_NAME is target disk name. Forinstall
file with less than 4GB size, run:rsync -vha /Volumes/$WIN_INSTALLER_NAME/ /Volumes/$WIN_USB_NAME
(if so, skip steps no. 5 and 6) - (Applicable for
install
file withesd
extension when it's over 4GB size): Export the file to the local machine by:wimexport /Volumes/$WIN_INSTALLER_NAME/sources/install.esd all ~/Desktop/install.wim --compress=LZX
where $WIN_INSTALLER_NAME is mounted Windows installer volume name. Remember to remove local copy ofinstall
file at the end of these steps. - (Applicable when
install
file (both extensions) is over 4GB size): Copy remaining "install" file (splitted) onto the installer USB drive:wimlib-imagex split /Volumes/$WIN_INSTALLER_NAME/sources/install.wim /Volumes/$WIN_USB_NAME/sources/install.swm 4000
where $WIN_INSTALLER_NAME is mounted Windows installer volume name and $WIN_USB_NAME is target USB disk name. If Step 5 was executed, notice that the "install.wim" source directory will be different (e.g.wimlib-imagex split ~/Desktop/install.wim /Volumes/$WIN_USB_NAME/sources/install.swm 4000
). - Unmount installer volumes (local and physical).
- You USB drive is bootable now! 🚀
thanks for sharing, I can create usb boot by following your guide