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.
Ad Blocking Detected Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us on the left).
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:
- Mount the DMG file by double clicking it. The DMG should now appear as a “disk” in Finder.
- 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
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
- 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:
- Double click the DMG so it mounts.
- Open Disk Utility (Utilities Disk Utility).
- Right click the DMG Mount and select the “Convert” option.
Disk Utility – Right click mounted GMD image and choose Convert
- In the dialog that now opens, set the “Image Format” to “DVD/CD master” and click “Save“.
Disk Utility – Select format and click Save
- 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”.
Ad Blocking Detected Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us on the left).
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.
- Start Terminal (Utilities Terminal).
- 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.
- 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.
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
Ad Blocking Detected Please consider disabling your ad blocker for our website.
We rely on these ads to be able to run our website.
You can of course support us in other ways (see Support Us on the left).
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
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.
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
NoName
Thanks NoName for the tip!
The Windows binary (and future versions) can be found at his website or through SoftPedia.
hans
p.s. just updated the version here as well.
hans
Now I can run mac on a VM
eric
the tool for windows just won’t open anything…
uukk
Hi UUKK,
What Windows version are you running and what file types (extension) are you trying to open?
hans
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
helper
thanks for chiming in Helper
hans
After conversion to ISO, will it be used for booting into VM?
abhisek
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.
hans
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.
Anonymous
What don’t you understand?
When using dmg2img, simply type (as indicated above):
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:
hans
i convert the dmg but the disk utility saves it as .cdr file not iso
mian
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).
Hans
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 .
mian
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.
Hans
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
jack
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.
Hans
Based on your question, I’ve added an explanation for the ApplePi-Baker approach as well.
Hans
UPDATE:
Method added by using ApplePi-Baker to convert and DMG to an IMG.
Hans
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.
Carlos
Awesome, that is great to hear!
Thanks for sharing
Hans