项目作者: coreprocess

项目描述 :
Create UEFI USB Drive for Windows Installation
高级语言:
项目地址: git://github.com/coreprocess/wininst-uefi-usb.git
创建时间: 2018-12-14T20:11:41Z
项目社区:https://github.com/coreprocess/wininst-uefi-usb

开源协议:

下载


Create UEFI USB Drive for Windows Installation

… on macOS

  1. # Download Windows 10 ISO
  2. # Note: might take a while, you can procede with the partitioning and formatting
  3. open https://www.microsoft.com/en-us/software-download/windows10ISO
  4. # Install required tools
  5. brew install dosfstools wimlib
  6. # Find USB drive device path
  7. diskutil list
  8. # Partitioning and formatting of USB drive
  9. # Note: Replace /dev/diskX with the device path of your USB drive
  10. diskutil umountDisk /dev/diskX
  11. # Note: Destroy operation is required to delete an existing GPT partition table
  12. sudo gpt destroy /dev/diskX
  13. # Note: The -f flag is only required to overwrite an existing MBR partition table
  14. sudo gpt create -f /dev/diskX
  15. # Note: Click ignore in case a dialog is shown by macOS
  16. sudo gpt add -t EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 /dev/diskX
  17. sudo /usr/local/opt/dosfstools/sbin/mkfs.fat -F 32 -I -n WININST /dev/diskXs1
  18. diskutil mountDisk /dev/diskX
  19. # Validate results
  20. # Note: FAT32 partition should be mounted at /Volumes/WININST now
  21. diskutil list
  22. mount
  23. # Mount Windows ISO
  24. # Note: Replace the path to the ISO file
  25. hdiutil attach ~/Downloads/Win10_VERSION_LANG_ARCH.iso -mountpoint /Volumes/WINISO
  26. # Copy all files except install.wim
  27. rsync -v -r -I --no-links --no-perms --no-owner --no-group --exclude sources/install.wim /Volumes/WINISO/ /Volumes/WININST/
  28. # Split-copy install.wim
  29. wimlib-imagex split /Volumes/WINISO/sources/install.wim /Volumes/WININST/sources/install.swm 1024
  30. # Ensure all data is written and detach all devices
  31. sync
  32. hdiutil detach /Volumes/WINISO
  33. # Note: Replace /dev/diskX with the device path of your USB drive
  34. diskutil umountDisk /dev/diskX
  35. diskutil eject /dev/diskX