How to write a DMG Image to USB in OSX

by MD0MDI
941 views
Apple Mac Logo

Guide to writing a DMG Image to USB stick.

Open a ‘terminal‘ window and do the following

> diskutil list
...
/dev/disk5
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.0 GB    disk2
   1:                 DOS_FAT_32 SANDISK                 16.0 GB    disk2s1

You will see a list appear with entries that look similar to the above text, with each drive that you have installed having it’s own entry, i.e. starting with the text:

/dev/disk5

Find your USB stick in the output, this is easy if the USB Stick was formatted with a name such as in the example above, the USB stick has the name SANDISK.

Now type the following so that the drive is not mounted.

> diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful

Now to Transfer the DMG File to the USB Stick enter the following command, the first part in GREEN is where you just drag the DMG file to the terminal window, the second GREEN part (mine is 5) is where you will enter your drive letter for the USB stick as found earlier (above).

> sudo dd if=[drag and drop the raw file in terminal] of=/dev/rdisk5 bs=1m
sudo dd if=/Volumes/Dados/Mac\ OS\ X\ 10.8.5\ Install\ USB.raw of=/dev/rdisk2 bs=1m
5371+1 records in
5371+1 records out
5632020480 bytes transferred in 1454.529910 secs (3872055 bytes/sec)

You will then see a message asking you to enter the systems password for confirmation…

WARNING: Improper use of the sudo command could lead to data loss
 or the deletion of important system files. Please double-check your
 typing when using sudo. Type "man sudo" for more information.

To proceed, enter your password, or type Ctrl-C to abort.

Password:

To check progress press Ctrl + T

load: 0.33 cmd: dd 25137 uninterruptible 0.00u 0.21s
578+0 records in
577+0 records out
605028352 bytes transferred in 154.108873 secs (3925980 bytes/sec)

Finally, before you pull out the USB stick.

>diskutil eject /dev/disk2

Related Posts

Leave a Comment

error: Content is protected !!

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

free counters