Skip to main content

How to burn (write) an ISO image to USB drive in all new Mac OS X systems

There are many programs in the market that can handle it for you. But you can do it with default Mac OS X tools. Those steps must be made in terminal. You need to know what you are doing and have root password to your system.
Here is your step by step guide to do it:


1. Convert your image.

You need to change the image type from .iso to .img that dd util supports. To do this type a command like this:
hdiutil convert -format UDRW -o /path/to/destination/file.img /path/to/source/file.iso
You must see output similar to this:
Reading Image File Name Here  (Apple_UDF : 0)…... [ truncated ] .............................
Elapsed Time:  4m 57.725s
Speed: 20.9Mbytes/sec
Savings: 0.0%
created: /path/to/image/file.img.dmg

2. Remove the .dmg extension.

mv /path/to/image/file.img.dmg /path/to/image/file.img

3. Get your flash drive device name.

You can do it in various ways. one that is using standard utils here:
diskutil list
This will list all your disks mounted to your mac. Output should be similar to this:
$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *750.2 GB   disk0
   1:                  Apple_HFS Vault                   750.2 GB   disk0s1
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *128.0 GB   disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Mac OS HD               127.2 GB   disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.0 GB    disk3
   1:                 DOS_FAT_32 UNTITLED                16.0 GB    disk3s1
So in my case flash drive is named disk3. Note it is not disk3s1, that indicates a partition name not a drive name.

4. Unmount your flash drive.

Note you need to unmount, not eject this flash drive. Command may be like so:
diskutil unmountDisk /dev/disk3
Change that disk3 to your device id.

4. Write your image to flash drive.

To handle this you would use a dd utility. Note param bs=1m, indicating block size to write. Missing this parameter would force dd to run byte by byte copy, resulting run for ages with several gigs of data.
sudo dd if=/path/to/image/file.img of=/dev/rdisk3 bs=1m
Note to change that disk3 to your flash drive id.
You may use rdisk instead of dd to add some speed to this. But this particular run was ok for me.
You may see an output like this, resulting you may eject and use your flash drive farther.
$ sudo dd if=/path/to/image/file.img of=/dev/rdisk3 bs=1m
Password:
6207+1 records in
6207+1 records out
6509363200 bytes transferred in 1124.570118 secs (5788312 bytes/sec)

Hope this help somebody someday. Cheers.
Please comment and share!

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete
  3. Ive been trying for such a long time but it keeps saying dd: unknown operand HDD/Users/Daniel/Downloads/windows.img

    I dont know what to do. IVe tried a lot of things. This is my full command

    sudo dd if=/Volumes/Barracuda HDD/Users/Daniel/Downloads/windows.img of=/dev/disk3 bs=1m

    ReplyDelete
    Replies
    1. 1. Does your disk called disk3 instead of rdisk3?
      2. Have you doublechecked you can access that file by that path?
      this may spill the light.
      3. Also there is a space in path not escaped there. It may be a problem depending of the system you are using. Please escape that space. So the console would know it is not the new parameter.

      Delete
  4. There is a post that would show you how to burn an ISO to USB drive or/and copy ISO to USB flash drive for data storage only, rather than creating ISO to bootable USB flash drive:
    http://www.leawo.org/tutorial/burn-iso-to-usb-drive.html

    ReplyDelete

Post a Comment

Popular posts from this blog

Pretty git Log

SO you dislike git log output in console like me and do not use it... Because it looks like so: How about this one? It's quite easy... Just type: git log - - graph - - pretty = format : '%Cred%h%Creset -%C ( yellow ) %d%Creset %s %Cgreen ( %cr) %C ( bold blue ) <%an>%Creset' - - abbrev - commit - - It may be hard to enter such an easy command every time. Let's make an alias instead... Copypaste this to your terminal: git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --" And use simple command to see this pretty log instead: git lg Now in case you want to see lines that changed use: git lg - p In order for this command to work remove  the -- from the end of the alias. May the code be with you! NOTE: this article is a rewritten copy of  http://coderwall.com/p/euwpig?i=3&p=1&t=git   and have b...

Django: Resetting Passwords (with internal tools)

I have had a task recently. It was about adding a forms/mechanism for resetting a password in our Django based project. We have had our own registration system ongoing... It's a corporate sector project. So you can not go and register yourself. Admins (probably via LDAP sync) will register your email/login in system. So you have to go there and only set yourself a password. For security reasons you can not register. One word. First I've tried to find standart decision. From reviewed by me were: django-registration and django password-reset . These are nice tools to install and give it a go. But I've needed a more complex decision. And the idea was that own bicycle is always better. So I've thought of django admin and that it has all the things you need to do this yourself in no time. (Actually it's django.contrib.auth part of django, but used out of the box in Admin UI) You can find views you need for this in there. they are: password_reset password_reset_...

Vagrant error: * Unknown configuration section 'hostmanager'.

Sometimes you get a vagrant environment or boilerplate with a Vagrantfile config in there and do a vagrant up command. And see some errors. like this: There are errors in the configuration of this machine . Please fix the following errors and try again : Vagrant: * Unknown configuration section 'hostmanager'. To fix this one needs: $ vagrant plugin install vagrant - hostmanager Installing the ' vagrant-hostmanager ' plugin . This can take a few minutes . . . Fetching : vagrant - hostmanager - 1.8 .6 . gem ( 100 % ) Installed the plugin ' vagrant-hostmanager (1.8.6) ' ! So command to fix this as follows: vagrant plugin install vagrant-hostmanager