在mac上制作 U盘 启动盘

1. 用hdiutil将ISO转dmg

[echo@EchoMa software]$ hdiutil convert -format UDRW -o CentOS-7-x86_64-DVD-1804 CentOS-7-x86_64-DVD-1804.iso
Reading Master Boot Record (MBR : 0)…
Reading CentOS 7 x86_64                  (Apple_ISO : 1)…
Reading  (Type EF : 2)…
Reading CentOS 7 x86_64                  (Apple_ISO : 3)…
……………………………………………………………………………..
Elapsed Time:  2m 55.451s
Speed: 24.3Mbytes/sec
Savings: 0.0%
created: /Volumes/data/software/CentOS-7-x86_64-DVD-1804.dmg

这个时候我们就得到了一个.dmg硬盘镜像文件。

2. Unmount U盘
查看U盘,路径通常为/dev/diskN

diskutil list

Unmount U盘

[echo@EchoMa software]$ diskutil unmountDisk /dev/disk4
Unmount of all volumes on disk4 was successful

3. 然后拷入镜像

[echo@EchoMa software]$ sudo dd if=CentOS-7-x86_64-DVD-1804.dmg of=/dev/disk4 bs=1m
4262+1 records in
4262+1 records out
4469153792 bytes transferred in 2602.575198 secs (1717204 bytes/sec)

 
4. 最后弹出U盘

diskutil eject /dev/disk4

No Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

粤ICP备15062915号-1