Page 1 of 1

Convert DMG to ISO (MacOS X, Windows or Linux)

Convert DMG to ISO (MacOS X, Windows or Linux)
   22

DMG files are very common on the MacOS X platform, used for Disk Images. With Disk Images we mean a full “copy” image of for example a CD, DVD or Harddisk. DMG‘s are typically used to distribute applications.

Some times however you’d prefer a ISO or a CDR image instead, for example for users on different platforms, or for offering other ways to burn an image to CD or DVD (if applicable).

In this article I’ll show you how you can convert a DMG file to either CDR or ISO under MacOS X, Windows or Linux.




Convert DMG to ISO options

When trying to convert a DMG to a ISO or CDR file for MacOS X, we have two options available.
The first one is by using just Disk Utility, a preferred method if you don’t like working with Terminal.
The second method is by using the command line by using Terminal.

To keep the article complete, I’ve added a method for Windows and Linux as well.

After converting a DMG to ISO, the ISO file can be burned on different platforms using popular burning applications like for example Nero under Windows.

Note : ISO images, just like DMG images, can be mounted as a drive as well under MacOS X – no special software needed, just double click the ISO file.

MacOS X – Convert DMG to ISO using ApplePi-Baker

My own little tool, ApplePi-Baker, originally intended for Raspberry Pi disk images, can assist in this as well.
Obviously you will need to download and install ApplePi-Baker first, and after that follow these steps:

  1. Mount the DMG file by double clicking it. The DMG should now appear as a “disk” in Finder.
  2. Start ApplePi-Baker and located the mounted disk. This can be done in two ways:Option 1: Click the “Select a Disk” in the “Select Disk(s)” section.
    A list will appear, and you should see your “Mounted Image” – select it.

    ApplePi-Baker - Select Mounted DMG

    ApplePi-Baker – Select Mounted DMG

    Option 2: Open the Advanced View and find the “Mounted Disk Image” disk.
    When found double click the “/dev/diskx” line to select the disk.

    ApplePi-Baker - Advanced View - Select Mounted DMG

    ApplePi-Baker – Advanced View – Select Mounted DMG

  3. Now select “Backup” and in the file dialog set the “File Format” to “IMG“. In a matter of seconds you will have a IMG of your DMG file.
    Note: the IMG can be substantially larger, since some DMG files use compression, and IMG files do not.

MacOS X – Convert DMG to ISO using Disk Utility

When using Disk Utility you will have to keep in mind that Apple uses the extension CDR for ISO images. In the end CDR and ISO files are the same, they just have a different extension. Renaming a CDR file to ISO afterwards will fix that.

The steps are straight forward:

  1. Double click the DMG so it mounts.
  2. Open Disk Utility (Utilities  Disk Utility).
  3. Right click the DMG Mount and select the “Convert” option.

    Disk Utility - Right click mounted GMD image and choose Convert

    Disk Utility – Right click mounted GMD image and choose Convert

  4. In the dialog that now opens, set the “Image Format” to “DVD/CD master” and click “Save“.

    Disk Utility - Select format and click Save

    Disk Utility – Select format and click Save

  5. After the converted file has been saved, locate it and rename it to .ISO. For example if you saved it as “example.cdr” then now rename it to “example.iso”.

MacOS X – Convert DMG to ISO from the command line

Some of us prefer the command line, I for one often forget the details of the particular thing I’d like to do so I find myself using the first option more often.

  1. Start Terminal (Utilities  Terminal).
  2. Type:
    
    
    hdiutil convert /path/to/example.dmg -format UDTO -o /path/to/example.iso

    Here /path/to/example.dmg  and /path/to/example.iso  are the paths to the files obviously.

  3. After pressing ENTER, it will take a few seconds and after completion you will find your iso file with an additional .CDR extension. Simply rename it to .ISO.
    
    
    mv example.iso.cdr example.iso

Windows – Convert DMG to ISO or IMG

For Windows we need a little free tool called DMG2IMG, a successor of DMG2ISO.

As usual the file can be downloaded from Tweaking4All, but I strongly recommend going to the developers website to grab the latest version.

Download - Dmg2img 

Filename:  dmg2img.zip
Platform:  Microsoft Windows
Version:  1.6.7
File size:  64.5 kB
Date:  2017-02-09
 Download Now  Send me a cup of Coffee    

After downloading and unzipping the file, the usage in a DOS box is simple.

For DMG to ISO:


dmg2img example.dmg example.iso

For DMG to IMG:


dmg2img example.dmg example.img

Linux – Convert DMG to ISO or IMG

A tool like DMG2IMG is also available under Linux, in Ubuntu for example, the easiest way to get it is:


1
2
sudo apt-get update
sudo apt-get install dmg2img

The command line use again is simple:

For DMG to ISO:


dmg2img example.dmg example.iso

For DMG to IMG:


dmg2img example.dmg example.img

Support Us ...


Your support is very much appreciated, and can be as easy as sharing a link to my website with others, or on social media.

Support can also be done by sponsoring me, and even that can be free (e.g. shop at Amazon).
Any funds received from your support will be used for web-hosting expenses, project hardware and software, coffee, etc.

Thank you very much for those that have shown support already!
It's truly amazing to see that folks like my articles and small applications.

Please note that clicking affiliate links, like the ones from Amazon, may result in a small commission for us - which we highly appreciate as well.

Comments


There are 22 comments. You can read them below.
You can post your own comments by using the form below, or reply to existing comments by using the "Reply" button.

  • Jul 18, 2017 - 4:38 AM - NoName Comment Link

    Hello 

    Thank you for your tutorial and it’s  that the user can use with many OS’s 

    A new version from Dmg2img (dmg2img-1.6.7 – 09 February 2017 Peter Wu) is available, please check the website 

    Reply

    NoName

  • Jun 9, 2019 - 6:34 PM - eric Comment Link

    Now I can run mac on a VM

    Reply

    eric

  • Aug 6, 2019 - 1:26 AM - uukk Comment Link

    the tool for windows just won’t open anything…

    Reply

    uukk

    • Aug 6, 2019 - 2:48 AM - hans - Author: Comment Link

      Hi UUKK,

      What Windows version are you running and what file types (extension) are you trying to open?

      Reply

      hans

    • Aug 14, 2019 - 1:24 AM - helper Comment Link

      you have to cd to the directory you saved the file so 

      cd C:\Desktop\dmg2img 

      then use .\ to make it run so it would look like

      .\dmg2img -i mac.dmg -o mac.iso

      Reply

      helper

  • Aug 14, 2019 - 3:12 AM - abhisek Comment Link

    After conversion to ISO, will it be used for booting into VM?

    Reply

    abhisek

    • Aug 14, 2019 - 6:43 AM - hans - Author: Comment Link

      I’m not sure what you are asking.
      Once converted to ISO, it can be mounted like a CD/DVD image, or burned to DC/DVD/BluRay …
      As for booting into VM, you’d need an application to run VM’s (VMWare, Parallels, VirtualBox) and that application needs to be able to boot from an ISO file or a mounted ISO file.

      Reply

      hans

  • Sep 7, 2019 - 11:08 PM - Anonymous Comment Link

    Usage: dmg2img [-l] [-p N] [-s] [-v] [-V] [-d] <input.dmg> [<output.img>]

    or dmg2img [-l] [-p N] [-s] [-v] [-V] [-d] -i <input.dmg> -o <output.img>

    Options: -s (silent) -v (verbose) -V (extremely verbose) -d (debug)

             -l (list partitions) -p N (extract only partition N)

    write the proper command.i cant understand what is written above. 

    Reply

    Anonymous

    • Sep 8, 2019 - 6:36 AM - hans - Author: Comment Link

      What don’t you understand?
      When using dmg2img, simply type (as indicated above):

      dmg2img example.dmg example.iso

      Where example.dmg is the source DMG file, and example.iso is the ISO file you want to create?

      As for the command line tool (dmg2img);
      I didn’t write that application, as indicated above, but the description is done in a very common way, as seen with most command line tools.
      The ‘[‘ and ‘]’ characters indication an optional parameter. So [-s] means that you can optionally add the ‘-s’ parameter for silent mode.

      For example using the silent (-s) mode:

      dmg2img -s example.dmg example.iso
      Reply

      hans

  • Jan 4, 2021 - 12:04 AM - mian Comment Link

    i convert the dmg but the disk utility saves it as .cdr file not iso

    Reply

    mian

    • Jan 4, 2021 - 6:34 AM - Hans - Author: Comment Link

      Hi Mian,

      As far as I recall, you can rename the .CDR file to .ISO. (see also step 3 in the Mac solution, where I simply rename the CDR file)
      Unfortunately, I do not know what OS and tool you’re using, but most allow you to define an output file name (eg. output.iso).

      Reply

      Hans

      • Jan 4, 2021 - 10:16 PM - mian Comment Link

        i do it but the iso file did not boot up. and i am usimg mac os sierra. and i use the disk utility to convert the dmg file .

        Reply

        mian

      • Jan 5, 2021 - 4:57 AM - Hans - Author: Comment Link

        Could it be that the DMG you’re using is not intended for booting?
        Most DMGs are not setup to be used for booting from. 

        Reply

        Hans

  • Jan 16, 2021 - 2:51 PM - jack Comment Link

    After hours of researching and downloading, I finally get it together and….

    dmg2img v1.6.7 (c) vu1tur (to@vu1tur.eu.org)

    ERROR: dmg image is corrupted

    Reply

    jack

    • Jan 17, 2021 - 5:28 AM - Hans - Author: Comment Link

      Hi Jack,

      One thing to keep in mind is that DMG2IMG may be aging. Apple does occasionally add new features to the DMG format, for example a new compression format, which then may be considered “damaged”.

      Having said that, a possible trick to convert a DMG to an IMG on a Mac (I assume you have a Mac available, since this article was written for MacOS);

      1. Mount the DMG by double clicking it.
      2. Download and install ApplePi-Baker.
      3. In ApplePi-Baker, find the mounted disk (possibly in the Advanced View – click the little harddisk icon).
      4. Make a backup of that disk – this will result in an IMG or a compressed IMG.

      Hope this helps, if the DMG is indeed corrupt then obviously this may not help either.

      Reply

      Hans

    • Jan 17, 2021 - 6:01 AM - Hans - Author: Comment Link

      Based on your question, I’ve added an explanation for the ApplePi-Baker approach as well.

      Reply

      Hans

  • Jan 17, 2021 - 6:01 AM - Hans - Author: Comment Link

    UPDATE:

    Method added by using ApplePi-Baker to convert and DMG to an IMG.

    Reply

    Hans

  • Aug 20, 2021 - 10:33 AM - Carlos Comment Link

    This worked great.  I just copied the .dmg file to the directory of the tool.  I used powershell and changed the directory to the location of the tool.  I hate to use the tool full name to include the file extension.  i.e., dmg2img.exe .\sourceFile.dmg .\destinationFile.iso <Enter> and it ran successfully. 

    Reply

    Carlos



Your Comment …

Do not post large files here (like source codes, log files or config files). Please use the Forum for that purpose.

Please share:
*
*
Notify me about new comments (email).
       You can also use your RSS reader to track comments.


Tweaking4All uses the free Gravatar service for Avatar display.
Tweaking4All will never share your email address with others.