Cần tạo USB boot Windows 10 trên Mac để sửa/cài Windows? Dùng Terminal + Homebrew + wimlib để chia file install.wim (>4GB) cho FAT32.

Phần 1. Yêu Cầu Chuẩn Bị
- File Windows 10 ISO (tải từ trang Microsoft chính thức).
- Cài Homebrew (xem bài trước) ▸ chạy
brew install wimlib. - USB 8GB+ (sẽ bị format).
Phần 2. Các Bước Tạo USB Boot Windows 10
- Gắn USB ▸ Terminal:
diskutil listđể xác định identifier (ví dụ:/dev/disk2). - Format USB FAT32 (MBR):
diskutil partitionDisk /dev/disk2 MBR FAT32 "WIN10" 100% - Mount ISO:
hdiutil mount ~/Downloads/Win10_*.iso(ghi nhớ mount point, ví dụ/Volumes/CCCOMA_X64FRE_EN-US_DV9). - Copy toàn bộ nội dung ISO vào USB (trừ file
install.wim):rsync -avh --exclude=sources/install.wim /Volumes/CCCOMA_X64FRE_EN-US_DV9/ /Volumes/WIN10/ - Chia file
install.wimbằng wimlib:wimlib-imagex split /Volumes/CCCOMA_X64FRE_EN-US_DV9/sources/install.wim /Volumes/WIN10/sources/install.swm 3800 - Unmount ISO và USB an toàn (Finder ▸ Eject).
- Cắm USB vào PC mục tiêu ▸ Boot từ USB (có thể vào BIOS chọn boot USB) ▸ Cài Windows bình thường.

Lưu ý: Mac M1/M2/M3 (Apple Silicon) không thể boot Windows qua USB này. Cần dùng Parallels/UTM ảo hóa.