Wednesday, August 22, 2018

Convert .ISO to File/USB Drive on Mac using dd

Using dd

NAME
     dd -- convert and copy a file

SYNOPSIS
     dd [operands ...]

DESCRIPTION
     The dd utility copies the standard input to the standard output.  Input
     data is read and written in 512-byte blocks.  If input reads are short,
     input from multiple reads are aggregated to form the output block.  When
     finished, dd displays the number of complete and partial input and output

     blocks and truncated input records to the standard error output.


Plug-in your USB stick and find what "/dev/diskN" it is mapped to by opening Terminal (where "N" stands for "disk0", "disk1", "disk2" etc). To do so, please execute:

# diskutil list
or
#df

Unmount USB Stick
Unmount the USB stick

# diskutil unmountDisk /dev/diskN
Where /dev/diskN is the one you have found in previous step as per our example it would be "/dev/disk2".

Write ISO to USB or
Write the content of the ISO file:

# sudo dd if=/path/to/downloaded.iso of=/dev/rdiskN bs=1m
/dev/rdiskN is the same disk you have found previously, with an r in front. r is for raw disk, as writing to /dev/rdisk2 is much faster than writing to /dev/disk2. You will be prompted for the administrator's password.

No comments: