- Open a Terminal (under Utilities)
- Convert the ISO to UDRW format
hdiutil convert -format UDRW -o destination_file.img source_file.iso
- Run
diskutil list
and determine the device node assigned to your flash media (e.g., /dev/disk2) - Run
diskutil unmountDisk /dev/diskN
(replace N with the disk number from the last command; in the previous example, N would be 2) - Execute
sudo dd if=/path/to/destination_file.img.dmg of=/dev/diskN bs=1m
(replace /path/to/destination_file.img.dmg with the path where the image file is located; for example, ./win7.img.dmg)- Using /dev/rdisk instead of /dev/disk will faster, 20x
- If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M
- If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the 'Disk Utility.app' and unmount (don't eject) the drive
- Run
diskutil eject /dev/diskN
, and remove your flash media when the command completes (this can take a few hours on slower drives)
如果参照上面的方式制作的启动盘无法正确启动,那么,说明系统的BIOS
把启动盘识别成了USB HDD
模式,这个模式下,是需要U
盘上存在Windows 7
的引导记录MBR
的。这种情况下,需要我们手工写入这部分信息。
首先参照让Mac也能拥有apt-get类似的功能——Brew配置好本机的HomeBrew
环境。
1. 下载ms-sys, 并且编译出来(也可本站下载ms-sys-2.5.3.tar)
2. 找一台Windows 7/Windows 10
机器,格式化U
盘为NTFS
格式。
目前尽管非常多的努力,但是从macOS High Sierra (10.13)
上编译ntfs-3g
,然后格式化出来的NTFS
格式的U
盘始终无法成功启动Windows 7
的安装镜像。原因应该是ntfs-3g
在macOS High Sierra (10.13)
上无法获取到磁盘的相关参数,从代码上看,macOS High Sierra (10.13)
上缺少磁盘的底层操作库(比如:libdh),导致启动部分的参数不正确。即使我们手工指定部分参数,也不能解决这个问题。
对于无法找到Windows
电脑的情况,目前我的解决方法是通过VirtualBox
安装一个Ubuntu 16.04
的虚拟机。插上U
盘后,macOS High Sierra (10.13)
上执行
然后手工映射U
盘到Ubuntu 16.04
系统,执行如下命令格式化:
操作完成后,关闭虚拟机或者手工从菜单中释放U
盘,之后我们才能进行下一步的操作。
3. 激活磁盘的启动属性
4. 制作安装盘
如果安装过程中,出现提示:“缺少所需的CD/DVD驱动器设备驱动程序”。如下图:
则是由于安装光盘中缺少
USB3.0
驱动导致的,请进入BIOS
暂时关闭USB3.0
,等安装完成后再打开即可。
参考链接
- How to create a bootable USB Windows OS using Mac OS X
- Create bootable USB stick from ISO in Mac OS X
- How to create a bootable USB stick on OS X
- Mac OS: dd with /dev/disk vs /dev/rdisk
- Why is “/dev/rdisk” about 20 times faster than “/dev/disk” in Mac OS X
- How to make Windows 7 USB flash install media from Linux?
- creating windows 7 bootable usb from linux
- pygettext.py and msgfmt.py on Mac OS X
- Creating a SmartOS Bootable USB Key
- Name-error when formatting NTFS on OS X 10.8.4 using “diskutil” (Terminal)
- Mac OS X: Mounting FAT32 external hard drive via Terminal command line
- OS X 原生可读写挂载NTFS分区
- mac系统下读取NTFS格式的超简单办法。
- Mac OS X Mount NTFS
- MAC下磁盘工具无法格式化U盘的时候使用终端DISKUTIL命令给U盘分区
- 制作便携式系统维护盘
- Mac OS X Mount NTFS
- Boot Sector
- r^pi3 error when ./autogen.sh.... error: possibly undefined macro: AC_MSG_CHECKING
- autogen.sh error on Raspberry PI 2
- 在Android 4.4.2上使用fuse开发自己的文件系统
- How do I get the partition offset in OS X with C/C++?
- 安装Windows7系统时,提示:缺少所需的CD/DVD驱动器设备驱动程序