88

what's the best way to get an ISO "burned" to a USB stick on a Mac? Restoring using Disk Utility does not work.

The ISO is ubuntu mini.iso. It is the minimalist install ISO for installing ubuntu. It needs to be bootable on a PC. I am trying to install ubuntu on a PC that has no CD-ROM. The only other computer I have around is a macbook.

  • 1
    Can you please be a bit more descriptive in what you are trying to accomplish. I think I have an idea of what the problem is but your question is vague – ricbax Oct 31 '09 at 19:18
  • I'm trying to "burn" a bootable ISO of the ubuntu mini.iso onto a USB stick for use on a PC. The PC in question does not have a CD-ROM. I don't have any other linux or win machines around. – Jason Marcell Oct 31 '09 at 19:28
115

Directly from the How to install Ubuntu on MacBook using USB Stick page (my formatting):

  1. Download the desired file
  2. Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
  3. Convert the .iso file to .img using the convert option of hdiutil (e.g., hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso)
  4. Note: OS X tends to put the .dmg ending on the output file automatically. Remove the .dmg extension as necessary, mv ~/path/to/target.img{.dmg,}
  5. Run diskutil list to get the current list of devices
  6. Insert your flash media
  7. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  8. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
  9. Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
  10. Using /dev/rdisk instead of /dev/disk may be faster.
    • If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
    • If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start Disk Utility.app and unmount (don't eject) the drive.
  11. Run diskutil eject /dev/diskN and remove your flash media when the command completes
  12. Restart your Mac and hold down Alt while the Mac is restarting to choose the USB stick

Note: On newer Macs you might have to install an EFI boot manager to boot from USB.

See also: Download Ubuntu Desktop.

  • 12
    Maybe people were not "blindly" up voting this. Maybe ... like me, they googled how to burn an ISO to a USB drive on MacOS, ya know THE TITLE OF THIS QUESTION ... found this ... and it worked. Geez. +1 – Justin Jenkins Jan 12 '12 at 7:36
  • 8
    I'm not sure what all the uproar is about. The answer is 100% on topic, works perfectly, and the resulting drive isn't any more platform-specific than the ISO you burned to it. I've used these instructions to burn OS installer ISO's (Ubuntu, WinXP, etc.) to a flash drive and the result worked perfectly on a PC. – spaaarky21 Feb 15 '12 at 3:08
  • 2
    Nope, I just failed to boot on a PC with the USB key created this method on my MacMini. The problem seems to be it lacks the ability to be booted on by the BIOS. – Nicocube Apr 16 '12 at 16:11
  • 4
    If you want to see progress, ensure you have pv installed, and run pv /path/to/downloaded.img | sudo dd of=/dev/rdiskN bs=1m instead of sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m. – jvatic May 19 '14 at 18:46
  • This failed for me as well, I needed to use @neesh answer to get the USB to be bootable on a PC. The conversion from iso to img must not preserve any boot support. Also wondering if simply skipping the conversion would work too--but as rab points out below, might not work with UEFI. – Brian Dec 30 '17 at 17:40
17

I had a very similar problem that none of these answered.

It's worth checking out UNetbootin. It will create a bootable USB disk on a Mac for a PC.

  • Once done, unetbootin said that I had to boot it on a PC and that it won't boot on a Mac. Trying the command line suggestion now. – balupton Mar 27 '13 at 14:17
  • For a Chrome Pixel, the UNetbootin method worked, command line didn't. – mjibson May 24 '13 at 21:49
  • It is to my understanding that UNetbootin doesn't work on Mountain Lion. – 2rs2ts May 30 '13 at 3:09
8

There is no need to convert the ISO to an IMG. I wasn't willing to convert an image first. This has easier steps, outlined below.

Start by listing the current disks and volumes:

diskutil list

Now unmount the current volume for the disk you are about to overwrite. (X = Drive number, in my case was 1):

diskutil unmountDisk /dev/diskX

Now dd the iso directly to the usb (again replace X with drive number of your USB drive):

sudo dd if=/pathto/mini.iso of=/dev/diskX bs=1m

Done!

  • This used to work, but I think the newer UEFI boot software doesn't understand the resulting file (2017). BIOS systems will work though. A way that works and is still easy is to use OS X's Boot Camp Assistant. Point it to an ISO and USB key, and it creates a UEFI bootable stick. – Rab Jul 5 '17 at 8:32
4

This is a very old question but still benefits from updated answers.

Etcher is now the solution recommended by Ubuntu to burn iso images to a USB drive.

Etcher makes the process almost painless if you are not comfortable with the command line. It's only 3 steps and worked on the first try for me.

2
  1. Ensure the USB Key is properly formatted (Master Boot Record, FAT32 - if necessary NTFS using NTFS-3G)
  2. You can try using the Restore feature in Disk Utility by clicking on the USB key's volume, then clicking on the Restore tab and choosing the ISO to restore onto it.
  3. If step 2 fails, you can do this manually by running ditto or cp -r; eg. ditto /Volumes/NAME_OF_MOUNTED_ISO /Volumes/NAME_OF_USB_KEY or cp -r /Volumes/NAME_OF_MOUNTED_ISO /Volumes/NAME_OF_USB_KEY to manually copy all the files (including hidden ones)
  • @Chealion thanks for your response. I was actually trying to get an Ubuntu ISO onto my USB, so I eventually just used the Ubuntu install disc to run it in Live Mode on my Macbook. From there I had access to the USB-Creator utility. – Jason Marcell Nov 24 '09 at 14:19
  • 1
    Also @Chealion I won't have time to verify your answer as correct anytime soon as I won't be near my Mac for a while (but I do know that Disk Utility was not working for me) If someone else verify's and upvotes, I'll mark as correct. – Jason Marcell Nov 24 '09 at 14:19
2

The way to do this using DiskUtility is to first format the drive using Diskutility and then copy over the files from the mounted iso to the newly formated drive using cp -R. Ex: cp -R /Volumes/mounted_iso/* /Volumes/formated_drive/

When formatting be sure to pick the ntfs file system and make the disk bootable by picking the correct option from the Options menu in the erase tab.

  • This was what worked for me to burn a Win10 bootable USB from macOS Sierra. The conversion from iso to img must strip out the master boot record on the disk. By reformatting with MBR and copying files, worked great. – Brian Dec 30 '17 at 17:38
1

Unetbootin is a tool that installs ISOs on USB keys, or you can use dropdown menus to select distributions right there in the tool.

Slightly easier than doing dd on the command line yourself.

  • Unetbootin dates back to 2008 at least. Another answer here already covered this option – Simon Sheehan Jun 12 '16 at 15:37
0

I've user SuperDuper for this task before. It does the job and not much else. Like a good program should :-) The full version is not free ($30) but you get what you need for free:

You can download SuperDuper! v2.6.2 right now and back up and clone your drives for free— forever!

  • 6
    Super Duper! doesn't support partitions that aren't formatted as HFS, so it's useless here. – rspeed Apr 28 '11 at 20:31

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.