How to read Mac .dmg images in Linux

How to read Mac .dmg images in Linux (via dmg2img) :

Quick Guide that was tested on Ubuntu Linux Jaunty Jackalope.

1. Download and compile DMG2IMG http://vu1tur.eu.org/tools/download.pl?dmg2img.tar.gz (http://vu1tur.eu.org/tools/) :

wget -O dmg2img.tar.gz http://vu1tur.eu.org/tools/download.pl?dmg2img.tar.gz
tar xfz dmg2img.tar.gz
cd dmg2img
make

2. Convert the DMG to IMG with dmg2img :

./dmg2img file.dmg

3. Install hfsplus :

sudo apt-get install hfsplus

4. Mount the image as a loopback device :

sudo mkdir /mnt/macimage
sudo mount -t hfsplus -o loop file.img /mnt/macimage

Voila.