在MacBook上制作Ubuntu安装盘

1. 格式化USB盘

分区格式为Mac OS扩展 (日志型) / 方案设置为:GUID Partition Map

2. 将ISO转为DMG

yuyang@yuyangdeMacBook-Pro:~/Downloads $ hdiutil convert -format UDRW -o ubuntu-18.04.2-desktop ubuntu-18.04.2-desktop-amd64.iso
正在读取Driver Descriptor Map(DDM:0)…
正在读取Ubuntu 18.04.2 LTS amd64        (Apple_ISO:1)…
正在读取Apple(Apple_partition_map:2)…
正在读取Ubuntu 18.04.2 LTS amd64        (Apple_ISO:3)…
.......................................................................................................
正在读取EFI(Apple_HFS:4)…
.......................................................................................................
正在读取Ubuntu 18.04.2 LTS amd64        (Apple_ISO:5)…
.......................................................................................................
已耗时:17.526s
速度:108.6M 字节/秒
节省:0.0%
created: /Users/yuyang/Downloads/ubuntu-18.04.2-desktop.dmg

3. 卸载U盘设备上的所有卷

yuyang@yuyangdeMacBook-Pro:~/Downloads $ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         121.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +121.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume disk                    108.4 GB   disk1s1
   2:                APFS Volume Preboot                 62.5 MB    disk1s2
   3:                APFS Volume Recovery                522.7 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *15.5 GB    disk2
   1:                  Apple_HFS KINGSTON                15.5 GB    disk2s1

yuyang@yuyangdeMacBook-Pro:~/Downloads $ diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful

4. 创建可启动的USB

yuyang@yuyangdeMacBook-Pro:~/Downloads $ sudo dd if=ubuntu-18.04.2-desktop.dmg of=/dev/disk2 bs=1m
Password:
1904+0 records in
1904+0 records out
1996488704 bytes transferred in 635.873740 secs (3139756 bytes/sec)

5. 弹出磁盘

yuyang@yuyangdeMacBook-Pro:~/Downloads $ diskutil eject /dev/disk2
Disk /dev/disk2 ejected