RSS



Ubuntu Quicktip – Converting Mac .dmg images into .iso images

Tue, Jan 23, 2007

Linux, Quicktips, Ubuntu

Talk about it in our Forums

I recently came across a handy script that allows you to convert a Mac OSX or Apple’s iPod (iPod firmware generated images) to standard .iso files.

You’ll need to have perl installed. Also, you may need to add an additional dependency in the form of a perl zlib module. So, here’s how to install it:

sudo apt-get install libcompress-zlib-perl

cd /usr/bin

sudo wget http://www.blinkenlights.ch/gnupod/dmg2iso.pl

Now, in my Ubuntu install I had to make one change to the dmg2iso.pl script.

sudo gedit dmg2iso.pl

At the very top you should see a line that says ‘#!/usr/local/bin/perl‘. This tells the script where to find perl. On my installation, perl is located in ‘/usr/bin/perl‘. So change that line if you need to.

Now let’s make it excecutable.

sudo chmod 777 dmg2iso.pl

Back to your home directory now.

cd

If you have a .dmg file in your home directory (or any directory) called bloodspell.dmg, and you want to convert it to a .iso file you can type:

dmg2iso.pl bloodspell.dmg bloodspell.iso

The script will take care of the rest.

Popularity: 14% [?]

Share and Enjoy:
  • Digg
  • del.icio.us
  • MisterWong
  • Reddit
  • Technorati
  • BlinkList
  • Facebook
  • Fark
  • Mixx
  • Slashdot

This post was written by:

arsgeek - who has written 1980 posts on ArsGeek.


Contact the author

29 Comments For This Post

  1. Elez J. Shenhar Says:

    ok, let me just go right ahead and ask…
    Why would you need to do something like turn a dmg to an iso?

  2. arsgeek Says:

    Good question. Here’s my answer – may be different for other folks.

    I work in an environment that has a bunch of Macs. A coworker of mine is constantly making images of various work related stuff on his Mac and then putting it out there for others to use.

    I’m on Linux/Windows. When I download his workstuff.dmg file I’ve got a 600MB file I can’t do much with.

    So I convert it to an ISO and either mount it directly or burn it to a CD/DVD.

  3. Elez J. Shenhar Says:

    oh… I thought .dmg is like a .deb or .rpm
    …doesn’t dmg stand for “disk image” or something?

  4. arsgeek Says:

    Something along those lines. :)

  5. Jess Says:

    hi i have troubles with this, i have those line at the end of my terminal look

    wiseo@wiseo-desktop:~/Escritorio$ dmg2iso.pl 1.dmg 1.iso
    dmg2iso v0.2a by vu1tur (vu1tur@gmx.de)

    PropertyList is corrupted

    whats wrong with this :S help

  6. Jamie Says:

    I am getting the same thing as Jess

  7. Martens Says:

    sudo: unable to execute /usr/bin/dmg2iso.pl: Access Deneid

    Help! It does not work properly
    I’m trying to turn this file http://support.aficio.com/bb/pub_e/dr_ut_e/0001061/0001061510/V120/I21649L9.dmg into a usable file for Ubuntu 8.04. I like to install a network printer, and it worked sofar, wright now it spits paper all over me. I used the PostScript driver from the WinXP intallation files.

    Can someone please help me?

  8. Maxxxx Says:

    bad interpreter: No such file or directory
    what i must do !!!

  9. n3p3nthess Says:

    Thank you, works fine

  10. LoneStar Says:

    WinXP/Ubuntu dual boot machine. Ubuntu is on the 5th partition.

    First off, just using the command dmg2iso.pl returns “Command not found”. I have to use ./dmg2iso.pl. Then I get …

    lonestar@LoneStar:~$ ./dmg2iso.pl Desktop/Mac\ OS\ X\ Install\ DVD.dmg Desktop/Mac_OSX_10-5-6_Install_DVD.iso
    dmg2iso v0.2a by vu1tur (vu1tur@gmx.de)

    reading property list…found 6 partitions
    decompressing:
    partition 0
    partition 1

    Conversion failed. File may be corrupted.

  11. jonbonjovi Says:

    Same answer from terminal like LoneStar!!

    dmg2iso v0.2a by vu1tur (vu1tur@gmx.de)

    reading property list…found 5 partitions
    decompressing:
    partition 0
    partition 1

    Conversion failed. File may be corrupted.

  12. derek Says:

    i have the problem of trying to make this work; it’s saved to usr/bin but my comp searches usr/local/bin

  13. MIlton Says:

    Great!

  14. Noel Says:

    I use 7zip for Windows because it can read and decompress dmg mac files. Give it a try, it’s free.

  15. Noel Says:

    For those people getting the “^M: bad interpreter: No such file or directory” error, try editing dmg2iso.pl with vi instead.

    I tried gedit to edit and save dmg2iso.pl and for some reason when viewing the file with vi, ^M appears at the end of every line. I removed these characters using vi editor and the perl script proceeded successfully.

  16. Hauke Says:

    Thanks a lot! I tried dmg2img before (which failed), but this solution finally works out just fine.

    Hauke

  17. Nice Says:

    Nice guide, but chmod +x, never use 777.

  18. Yosi Says:

    Thats what i get: bash: /usr/bin/dmg2iso.pl: /usr/local/perl15: bad interpreter: No such file or directory

    i supouse that means that perl is not there…now the question is how do i know where perl is???? thanks in advance

  19. h3retic Says:

    Awesome! Works like a charm!

  20. JeremyG Says:

    Worked perfectly, thanks very much for the clear and precise instructions, couldn’t be better!

  21. Azhar Says:

    I meaned “dmgextractor” not “hfsexplorer”
    sorry

  22. daakadence Says:

    yosi : try “which perl” to find out where perl is stored on your system

  23. Lash Says:

    Great, works a charm! well done there that man….

  24. DevelopX Says:

    Hay everyone! I did everything as sayd but here what I’v got

    root@developx:/media/98EAD0EAEAD0C5A2/Users/Dev/Desktop/mac# dmg2iso.pl Mac_OS_X_Install_DVD.dmg Mac_OS_X_Install_DVD.iso
    dmg2iso v0.2a by vu1tur (vu1tur@gmx.de)

    reading property list…found 6 partitions
    decompressing:
    partition 0
    partition 1
    partition 2
    partition 3
    partition 4
    partition 5
    Hexadecimal number > 0xffffffff non-portable at /usr/bin/dmg2iso.pl line 82.
    Out of memory!
    root@developx:/media/98EAD0EAEAD0C5A2/Users/Dev/Desktop/mac#

    Please help me. Thanks!

  25. David Marceau Says:

    Worked like a charm. God bless you.

  26. dante Says:

    Cool .. now I’m converting .dmg to .iso … Snow Leopard .. many thanks

  27. Eric Says:

    Acetoneiso will do this for you, if you prefer gui tools.

  28. german Says:

    AAAHHHH! Don’t EVER make things in /usr/bin chmod 777! It needs to be world executable, not world WRITABLE! You want chmod 755!

  29. Zip Says:

    Awesome guide, but chmod +x, never use 777.

2 Trackbacks For This Post

  1. Sprazzi di lucidità » Convertire DMG in ISO: MacOSX, Windows e Linux Says:

    [...] via macosxhints, vu1tur, arsgeek. [...]

  2. Mengubah *.dmg (Mac) ke *.iso di Linux « Hary Mulyadi Says:

    [...] Ref: http://www.arsgeek.com/2007/01/23/ubuntu-quicktip-converting-max-dmg-images-into-iso-images/ [...]

Leave a Reply