Use dd on OSX to make liveUSB drive (linux) from ISO image

*Note that this process is slightly different for Linux and Windows systems.

The process is very simple – in three steps:
1. Determine the disk Number.
2. Unmount the disk we will write to.
3. Write the ISO using dd.
————–
1. List everything we have:

1
diskutil list

Will show the disk volumes available – use it to determine which is the correct “disk” number for the USB drive you wish to write to.

In my case the result was:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_CoreStorage 999.7 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS SSD *999.3 GB disk1
Logical Volume on disk0s2
16EC3FCD-CAE3-4C94-82C9-D3F7A5692532
Unencrypted
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *62.0 GB disk2
1: Bios Boot Partition 2.1 MB disk2s1
2: EFI ESP 536.9 MB disk2s2
3: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 536.9 MB disk2s3
4: Linux Swap 268.4 MB disk2s4
5: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 6.7 GB disk2s5
6: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 53.9 GB disk2s6
/dev/disk3
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *32.0 GB disk3
1: 0xEF 32.5 MB disk3s2

2. Unmount destination drive:

I see that the /dev/disk3 is the drive (32GB) that I would like to write to. Let’s unmount it:

1
sudo diskutil unmountDisk /dev/disk3

In the above, you would substitute disk3 for diskN, where N is the drive that you will overwrite using dd in the next step.

3. Use dd to copy image:

1
sudo dd if=/path/to/source/file.iso of=/dev/rdiskN bs=1m

Breaking it down:
if == input file
of == output file (location)
rdisk == raw disk (alt use “diskN”) – replace N with your disk#; it is generally considered that rdisk gives better performance than disk with this operation.
bs == byte size (larger gives faster performance, scale this down if you get errors)
bs=4kb == 4kb block transfer
bs=1m == 1mb block transfer

Finishing up – don’t forget to eject, either in the GUI or from the command line, using:

1
diskutil eject /dev/diskN

Where diskN is disk2, disk3, etc whatever applies in your case.

Enjoy and be careful not to kill your system!