The application seems to convert .dmg to a file that can be mounted using the mount command:
dmg2img file.dmg imagefile.img
From your Wikipedia article, the next command seems to be available to do that:
sudo mount -o loop -t hfsplus imagefile.img /mnt
In this way, the file imagefile.img is a result from dmg2iso and the contents will be available at /mnt. If the hfsplus type is not detected, you might need to load the kernel module for it:
If you succeed with the instructions from Lekensteyn and binfalse more power to you. If you are getting
$ lsmod | grep hfs
hfs 54782 0
hfsplus 84912 0
$ sudo mount -o loop,ro -t hfsplus imagefile.img /mnt
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
Right now Ubuntu only comes with dmg2img version 1.6.2 and version 1.6.4 sometimes makes a difference. Also you can extract specific partitions from a dmg and only some of them are hfs+
The instructions in some of the posts to this topic only work on older versions of 7z.
If you want to extract JUST the 4.hfs file from a .dmg file (i.e: just one level deep) and are using a newer version of 7-zip then you need to use different parameters:
To extract it, it is much easier to use 7zip:
Install dmg2img.
Next, read the package information page and the manual page to see if it is useful to you.
The application seems to convert .dmg to a file that can be mounted using the
mount
command:From your Wikipedia article, the next command seems to be available to do that:
In this way, the file
imagefile.img
is a result fromdmg2iso
and the contents will be available at/mnt
. If the hfsplus type is not detected, you might need to load the kernel module for it:When done, you can unmount it by running:
This works for me:
7z x
hfs
partition fileExtract using
7z x
Locate the
hfs
partition ( here it is4.hfs
file ):Mount it to folder:
If you succeed with the instructions from Lekensteyn and binfalse more power to you. If you are getting
Right now Ubuntu only comes with dmg2img version 1.6.2 and version 1.6.4 sometimes makes a difference. Also you can extract specific partitions from a dmg and only some of them are hfs+
When using
dmg2img file.dmg imagefile.img
on linux if you get ERROR: Inflation failed message, just install 7zip asand issue the following command on terminal
dmg2img InstallESD.dmg imagefile.img
on the terminal.Now you can mount imagefile.img with
and then
In the case of some
.dmg
s, you can neither7z x
them, normount
the result ofdmg2img
.In that case, the
.img
resulting fromdmg2img your.dmg new.img
can have its paritions extracted with7z x
:Success!
First of all install DMG2IMG. Now you can convert it to
IMG
:The
IMG
can be mounted with:And take a look at
/mnt
following the answer of @aman and @tuxdna, because dmg2img doesn't seem to work on compressed dmg images.
so i made a bash script (tested on ubuntu 14.10) to automatize the process of :
find it here: https://github.com/aurelien-rainone/scripts/blob/master/mountdmg.sh
example of use:
The instructions in some of the posts to this topic only work on older versions of 7z.
If you want to extract JUST the 4.hfs file from a .dmg file (i.e: just one level deep) and are using a newer version of 7-zip then you need to use different parameters:
In 7-Zip [64] 9.20 you can use this command:
In 7-Zip [64] 16.02 you need to use this command: