1、将iso文件转换为MAC下的dmg文件,也可以不转直接使用

$ hdiutil convert -format UDRW -o CentOS-7-x86_64-DVD-1611_ CentOS-7-x86_64-DVD-1611.iso 

2、插入U盘并且找到U盘的设备路径

$ diskutil list
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            250.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            NO NAME                *15.8 GB    disk1

3、将U盘从系统中卸载掉

$ diskutil unmountDisk /dev/disk1
Unmount of all volumes on disk1 was successful

4、dd镜像文件到U盘,时间较久,耐心等待

$ sudo dd if=CentOS-7-x86_64-DVD-1611_.dmg of=/dev/rdisk1 bs=1m

也可以使用brew安装pv命令来显示进度条

pv -cN source < CentOS-7-x86_64-DVD-1611_.dmg | sudo dd of=/dev/disk1 bs=4m
Logo

更多推荐