Make Ubuntu USB boot disk on Mac
First, download the ubuntu ISO image
II. convert ISO to img file
$ hdiutil Convert-format Udrw-o/path/to/generate/img/file/path/to/your/iso/file
The command generates an. IMG disk image file, but Mac OSX appends a. DMG by default, that is, the resulting file suffix is. img.dmg, this suffix does not matter, can be ignored
Third, view the USB drive letter
$ 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_corestorage Macintosh HD 250.0 GB disk0s2
3:apple_boot Recovery HD 650.0 MB disk0s3
/dev/disk1 (internal, virtual):
#: TYPE NAME SIZE IDENTIFIER
0:macintosh HD +249.7 GB Disk1
Logical Volume on Disk0s2
3839de4f-18a9-4409-964f-03c32b1dab93
Unlocked Encrypted
/dev/disk2 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0:fdisk_partition_scheme *31.1 GB Disk2
1:APPLE_HFS Hsy 31.1 GB disk2s1
This command looks at the disk that is mounted on the current system, where/dev/disk1 is my USB disk. Different systems the number after disk may not be the same, but it is generally diskn mode
Iv. Uninstalling the USB disk
$ diskutil Unmountdisk/dev/disk2
Unmount of all volumes on Disk2 is successful
Using Diskutil unmountdisk to uninstall the USB disk, note the difference between uninstall (Umount) and eject (eject):
V. Write the image to usb
$ sudo dd if=ubuntu.img.dmg of=/dev/rdisk2 bs=1m
Writes the img file generated by the second step to the USB disk/dev/rdisk2.
Six, eject USB
$ diskutil Eject/dev/disk2
Make u disk boot disk on Mac