Convert ISO to .img using hdiutil under Mac OS (via Installation/FromUSBStick for Ubuntu)

Linked on Mar 25 at 4:35

These instructions to install Ubuntu on a USB stick include the following on how to convert ISO to .img on a Mac:

“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/kubuntu.iso) Note: OS X tends to put the .dmg ending on the output file automatically.”

  1. Reece Webster

    March 30, 2010 at 8:57 am

    When inputting this into terminal comes up with convert failed: no such file or directory, tried various combinations still does not work. does the ‘path to target’ need to be different to ‘path to kubuntu’?

  2. Ian Stevens

    April 12, 2010 at 9:03 pm

    Yes, those should be different paths. I hope it goes without saying that the path to the ISO should exist, the path to the output IMG should not.

  3. jake

    September 29, 2010 at 9:46 pm

    dont put the tilde in the path name…ex. ~/pathname, is wrong, just put the name without the tilde…..ex /pathname

  4. VolvoX

    October 15, 2010 at 3:49 am

    That’s it jake, thank you very much! It works like you said. So do not try to convert to .img file in the same folder of the source .iso file and do not put “~” before the path name.

  5. gyffes

    October 17, 2010 at 10:13 am

    Actually, don’t type the path at all: in Terminal, once you’ve typed the start, just drag the file to the Terminal, the path will be copied into the Terminal where the cursor was.

  6. fhdo

    January 28, 2011 at 9:38 am

    You need to specify “Rdxx” as the format, otherwise you will get an DMG file.

    Example:

    hdiutil convert -format Rdxx -o dban-2.2.6_i586.img dban-2.2.6_i586.iso

  7. John Doe

    July 13, 2011 at 11:01 pm

    This worked for me..

    hdiutil convert -format Rdxx -o /Users/Name/ubuntu-10.04.2-desktop-i386.img /Users/Name/Desktop/ubuntu-10.04.2-desktop-i386.iso

  8. johnb

    July 19, 2011 at 8:56 pm

    Use UDRW instead of Rdxx… for example:

    hdiutil convert -format Rdxx -o dban-2.2.6_i586.img dban-2.2.6_i586.iso

    that should work :)

  9. Tony

    October 14, 2011 at 10:48 am

    hdiutil convert -format Rdxx -o /path/ubuntu2.img path/ubuntu.iso
    Preparando creación de imagen…
    …………………………………………………………………….
    Finalizando creación de imagen…
    Añadiendo recursos…
    …………………………………………………………………….
    Tiempo transcurrido: 59.027s
    (2 tareas, cargas 100)
    Tamaño del archivo: 729067520 bytes, Suma: CRC $05211022
    Sectores procesados: 1423960, 1423960 copiados
    Velocidad: 11.8Mbytes/s
    created: /path/ubuntu2.img

  10. thomas

    December 24, 2011 at 4:40 pm

    I’m wanting to convert an ISO to an IMG to create a bootable SD card ubuntu, I’ve been looking ALL OVER and so far everywhere I go seems to be missing a step that maybe everyone but me knows/assumes ;-)
    When I do what seems to be suggested:
    hdiutil convert -format UDRW -o /Users/parasamagate/Desktop /Users/parasamagate/Desktop/linux/ubuntu-10.04-desktop-powerpc.iso
    I get back:
    Usage: hdiutil convert -format -o [options]
    hdiutil convert -help
    I try variations on this and sometimes get file no found, I tried reversing it and putting the ISO first and the desk-top (as target spot) second, I tried with and without the tilda ~, I tried with and without specifying .img on the end of the target, I tried using a folder instead of desktop as target… getting frustrated here.
    I’m using macbook air (version mid 2011 … 4,2) with os 10.7.2
    can anyone tell me what I’m missing?

  11. thomas

    December 24, 2011 at 4:48 pm

    I also tried both
    hdiutil convert -format UDRW -o /Users/parasamagate/Desktop/ubuntu-10.04-desktop-powerpc.img /Users/parasamagate/Desktop/linux/ubuntu-10.04-desktop-powerpc.iso

    and

    hdiutil convert -format RDxx -o /Users/parasamagate/Desktop/ubuntu-10.04-desktop-powerpc.img /Users/parasamagate/Desktop/linux/ubuntu-10.04-desktop-powerpc.iso

    nothing happens =(

  12. Travis Siegel

    January 26, 2012 at 7:52 am

    Why is it necessary to conveert to an img file first? Why not just dd the iso image? What’s the purpose of converting to img first? Nobody seems to explain why this is necessary. Any comments?

  13. Tom Witko

    February 29, 2012 at 3:38 pm

    Thomas you used hdiutil convert -format RDxx -o /Users/parasamagate/Desktop/ubuntu-10.04-desktop-powerpc.img /Users/parasamagate/Desktop/linux/ubuntu-10.04-desktop-powerpc.iso I did the same mistake Its Rdxx small d. This was the only command that worked on OSX 10.5 G4 mirror door to make a immage

  14. Lance

    March 1, 2012 at 2:41 pm

    Travis this is for the purpose of having ubuntu on a flash drive that you can boot on a mac

    thats my guess

  15. Henry S.

    April 23, 2012 at 9:20 pm

    Thanks for all the help, it has taken me hours and I’m still not quite there yet. I have managed to finally create the .img file in OS X Snow Leopard, however, after executing the sudo command I get an error message saying “The disk you inserted was not readable by this computer”. I have been sat here for hours and, as far as I can tell, am doing nothing different to the instructions above. Any thoughts or help would be greatly appreciated, thanks in advance.

  16. Cheng

    April 28, 2012 at 4:03 pm

    Hi guys, I have the same trouble as thomas. I wrote

    hdiutil convert -format Rdxx -o /Users/Jing/Documents/ubuntu-12.04-desktop-i386.img /Users/Jing/Downloads/ubuntu-12.04-desktop-i386.iso

    but got

    convert failed – not recognized.

    what have I done wrong?

  17. Anonymus

    July 6, 2012 at 8:08 pm

    All you have to do is type in “hdiutil convert -format UDRW -o” and then drag in the folder for export and then hit spacebar, then drag in the iso file and hit enter.

    Good luck!

  18. amWin

    August 15, 2012 at 3:05 pm

    This does the job. Thanks!

    hdiutil convert -format Rdxx -o /Users/Name/Desktop/ubuntu-12.04-desktop-i386.img /Users/Name/Downloads/ubuntu-12.04-desktop-i386.iso

  19. Oluwakorede

    September 14, 2012 at 11:04 am

    Applying anonymous’ solution above, after dragging the droping the destination folder into terminal, add a trailing forward slash ‘/’ before hitting spacebar…on OSx Mountain Lion

  20. Lani

    March 31, 2013 at 8:43 pm

    im trying: hdiutil convert -format UDRW -o /Users/lani/Downloads/ubuntu-12.10-desktop-i386\ \(1\).img /Users/lani/Downloads/ubuntu-12.10-desktop-i386\ \(1\).iso
    and other variations and terminal keeps telling me that convert failed- no such file or directory. help?