Marks Blog
  • PowerDNS Admin
  • About
  • Simple Ticket System

How to convert and burn a .dmg (Mac OS X) disk image on Linux

September 1, 2010 by mark

Today I wanted to burn a .dmg file, but I didn’t have an Apple computer available. So, running Linux I started to google for a solution, and found one.

You need the dmg2img tool, which can be downloaded from http://vu1tur.eu.org/tools/, if it’s not available as a pre-built package for your Linux distribution.

On Ubuntu you can easily install the dmg2img and hfsplus packages with sudo apt-get install dmg2img hfsplus.

Run the dmg2img tool to convert the .dmg file:

dmg2img -i file.dmg -o file.img

Next we want to mount the .img file (make sure you’ve got hfsplus tools installed) to a loopback device:

sudo mount -o loop file.img /mnt

The content of the image file is now available (within /mnt), so we can copy/use the files or burn an ISO image.
To create an ISO image type:

cd /mnt && genisofs -o $HOME/file.iso .

Update 2014-04-24

Install dependencies on Ubuntu/Debian with:

sudo apt-get install build-essential zlib1g-dev libbz2-dev libssl-dev hfsplus

And compile:

make
Posted in: Linux & Unix, Mac OS X Tagged: dmg, iso, linux, mac

Weather Station

Pages

  • About
  • PowerDNS Admin
  • Simple Ticket System

Affiliates

  • Danish Sensor Engineering
  • Mintr ApS
  • Nellemann Data

Social

  • BitBucket
  • GitHub
  • LinkedIn
  • Mastodon

Categories

  • Android
  • Automobile
  • Blog & Rantings
  • Development & Scripting
  • Grails
  • Linux & Unix
  • Mac OS X
  • Misc
  • No category
  • PowerDNS Admin
  • Puppet
  • Security Related
  • VirtualBox
  • Virtualization
  • VMware
  • Windows

Archives

  • January 2019
  • September 2017
  • January 2016
  • May 2015
  • March 2015
  • February 2015
  • December 2014
  • October 2014
  • September 2014
  • August 2014
  • June 2014
  • January 2014
  • July 2013
  • June 2013
  • February 2013
  • January 2013
  • December 2012
  • August 2012
  • May 2012
  • October 2011
  • April 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • March 2010
  • October 2009
  • September 2009
  • April 2009
  • January 2009
  • March 2008
  • January 2008
  • November 2007
  • January 2007
  • December 2006
  • November 2006
  • August 2006
  • June 2006
  • March 2006
  • October 2005
  • August 2005

Copyright © 2025 Marks Blog.

Mobile WordPress Theme by themehall.com