How can I open a .dmg file?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I've got a .dmg file, and I can't figure out how to open it. How can I open it?
files file-format archive
add a comment |
I've got a .dmg file, and I can't figure out how to open it. How can I open it?
files file-format archive
add a comment |
I've got a .dmg file, and I can't figure out how to open it. How can I open it?
files file-format archive
I've got a .dmg file, and I can't figure out how to open it. How can I open it?
files file-format archive
files file-format archive
edited Feb 5 '14 at 11:12
kiri
19.4k1360106
19.4k1360106
asked Apr 29 '11 at 18:01
jrg♦jrg
39.6k50152236
39.6k50152236
add a comment |
add a comment |
8 Answers
8
active
oldest
votes
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:
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:
sudo modprobe hfsplus
When done, you can unmount it by running:
sudo umount /mnt
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
4
I get this error -mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
1
@tuxdna Do you really have a HFS image? Check the output offile file.dmg
. You can also try7z l file.dmg
to list the contents.
– Lekensteyn
Feb 5 '14 at 10:55
I am usingdmg2img v1.6.2
. I ran dmg2img onmysql-5.5.28-osx10.6-x86_64.dmg
which createdmysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.
– tuxdna
Feb 5 '14 at 10:57
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
add a comment |
To extract it, it is much more easier to use 7zip. Simply do:
7z x file.dmg
7
Thanks,7z
did the job, whereasdmg2img
complained about a corrupted dmg image.
– rinni
Jun 30 '14 at 12:42
2
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
This just created a file called0.unknown partition
for me.
– Aaron Franke
Jan 10 '18 at 15:13
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
add a comment |
This works for me:
- Extract using
7z x
- Locate the
hfs
partition file - Mount it to a directory
Extract using 7z x
root # aptitude install p7zip-full
root # 7z x ../mysql-5.5.28-osx10.6-x86_64.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: ../mysql-5.5.28-osx10.6-x86_64.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 125475840
Compressed: 117543935
root # ls
0.MBR 1.Primary GPT Header 2.Primary GPT Table 3.free 4.hfs 5.free 6.Backup GPT Table 7.Backup GPT Header
Locate the hfs
partition ( here it is 4.hfs
file ):
root # ls -l
total 122548
-rw-r--r-- 1 root root 512 Feb 5 16:06 0.MBR
-rw-r--r-- 1 root root 512 Feb 5 16:06 1.Primary GPT Header
-rw-r--r-- 1 root root 16384 Feb 5 16:06 2.Primary GPT Table
-rw-r--r-- 1 root root 3072 Feb 5 16:06 3.free
-rw-r--r-- 1 root root 125435904 Feb 5 16:06 4.hfs
-rw-r--r-- 1 root root 2560 Feb 5 16:06 5.free
-rw-r--r-- 1 root root 16384 Feb 5 16:06 6.Backup GPT Table
-rw-r--r-- 1 root root 512 Feb 5 16:06 7.Backup GPT Header
Mount it to folder:
root # mkdir t
root # mount -oloop 4.hfs t
root # cd t/
root # ls
mysql-5.5.28-osx10.6-x86_64.pkg MySQL.prefPane MySQLStartupItem.pkg ReadMe.txt
You can specify the single file you want to extract:7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
add a comment |
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+
$ dmg2img -l file.dmg
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3: (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5: (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)
$ dmg2img -p 4 file.dmg imagefile.img
- Current Ubuntu versions come with 1.6.5 as of version 14.04
add a comment |
When using dmg2img file.dmg imagefile.img
on linux if you get
ERROR: Inflation failed message, just install 7zip as
sudo aptitude install p7zip-full
and issue the following command on terminal
7z x your_file.dmg
- find the InstallMacOSX.pkg/InstallESD.dmg
- issue the command
dmg2img InstallESD.dmg imagefile.img
on the terminal.
Now you can mount imagefile.img with
modprobe hfsplus
and then
mount -t hfsplus -o loop mountain.img /mnt
add a comment |
First of all install DMG2IMG. Now you can convert it to IMG
:
dmg2img your.dmg new.img
The IMG
can be mounted with:
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop new.img /mnt
And take a look at /mnt
add a comment |
In the case of some .dmg
s, you can neither 7z x
them, nor mount
the result of dmg2img
.
In that case, the .img
resulting from dmg2img your.dmg new.img
can have its paritions extracted with 7z x
:
$ 7z x factor-macosx-x86-64-0.98.dmg
[...]
Extracting archive: factor-macosx-x86-64-0.98.dmg
ERROR: factor-macosx-x86-64-0.98.dmg
factor-macosx-x86-64-0.98.dmg
Open ERROR: Can not open the file as [Dmg] archive
$ dmg2img factor-macosx-x86-64-0.98.dmg factor.img
[...]
factor-macosx-x86-64-0.98.dmg --> factor.img
[...]
Archive successfully decompressed as factor.img
$ sudo mount -o loop -t hfsplus factor.img /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.
$ 7z x factor.img
[...]
Extracting archive: factor.img
[...]
Everything is Ok
Folders: 2717
Files: 10266
Size: 176431113
Compressed: 264214528
$ ls -lah factor factor/factor/
factor:
total 24K
drwx------ 6 cat cat 4.0K Jul 30 2018 .
drwxr-xr-x 21 cat cat 4.0K Feb 19 16:28 ..
drwx------ 8 cat cat 4.0K Jul 30 2018 factor
drwx------ 2 cat cat 4.0K Jul 30 2018 '[HFS+ Private Data]'
drwx------ 2 cat cat 4.0K Jul 30 2018 '.HFS+ Private Directory Data'$'r'
drwx------ 2 cat cat 4.0K Jul 30 2018 .Trashes
factor/factor/:
total 97M
drwx------ 8 cat cat 4.0K Jul 30 2018 .
drwx------ 6 cat cat 4.0K Jul 30 2018 ..
drwx------ 163 cat cat 4.0K Jul 30 2018 basis
drwx------ 45 cat cat 4.0K Jul 30 2018 core
-rw-r--r-- 1 cat cat 702 Jul 30 2018 .dir-locals.el
drwx------ 288 cat cat 12K Jul 30 2018 extra
-rw-r--r-- 1 cat cat 32 Jul 30 2018 factor
drwx------ 3 cat cat 4.0K Jul 30 2018 Factor.app
-rw-r--r-- 1 cat cat 97M Jul 30 2018 factor.image
-rw-r--r-- 1 cat cat 40 Jul 30 2018 .gitattributes
-rw-r--r-- 1 cat cat 43 Jul 30 2018 git-id
-rw-r--r-- 1 cat cat 366K Jul 30 2018 libfactor.dylib
-rw-r--r-- 1 cat cat 16K Jul 30 2018 libfactor-ffi-test.dylib
-rw-r--r-- 1 cat cat 1.3K Jul 30 2018 LICENSE.txt
drwx------ 9 cat cat 4.0K Jul 30 2018 misc
-rw-r--r-- 1 cat cat 4.6K Jul 30 2018 README.md
-rw-r--r-- 1 cat cat 3.6K Jul 30 2018 .travis.yml
drwx------ 2 cat cat 4.0K Jul 30 2018 work
Success!
Multiple answers suggest directly using7z
on the dmg file. Why convert it then?
– Olorin
Feb 19 at 4:18
@Olorin this is for when7z x your.dmg
fails withCan't open as archive: 1
, and whendmg2img
's output won't be accepted bymount
either. I'll clarify
– cat
Feb 19 at 21:24
add a comment |
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 :
- extracting with 7z in a temp folder
- looking for which partition to mount
- copy the hfs/hfsplus folder/partition somewhere else
- delete the temp folder
- mount the partition
find it here: https://github.com/aurelien-rainone/scripts/blob/master/mountdmg.sh
example of use:
panty@Computerino:[~/scripts]: mountdmg.sh -t hfsplus -d /mnt ~/Downloads/cutecom-ng.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: /home/panty/Downloads/cutecom-ng.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 33549312
Compressed: 10059312
mountdmg.sh: successfully mounted 4.hfs on /dev/loop0
mountdmg.sh: run sudo umount /dev/loop0 when finished
add a comment |
protected by Community♦ Feb 16 '16 at 4:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
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:
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:
sudo modprobe hfsplus
When done, you can unmount it by running:
sudo umount /mnt
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
4
I get this error -mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
1
@tuxdna Do you really have a HFS image? Check the output offile file.dmg
. You can also try7z l file.dmg
to list the contents.
– Lekensteyn
Feb 5 '14 at 10:55
I am usingdmg2img v1.6.2
. I ran dmg2img onmysql-5.5.28-osx10.6-x86_64.dmg
which createdmysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.
– tuxdna
Feb 5 '14 at 10:57
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
add a comment |
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:
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:
sudo modprobe hfsplus
When done, you can unmount it by running:
sudo umount /mnt
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
4
I get this error -mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
1
@tuxdna Do you really have a HFS image? Check the output offile file.dmg
. You can also try7z l file.dmg
to list the contents.
– Lekensteyn
Feb 5 '14 at 10:55
I am usingdmg2img v1.6.2
. I ran dmg2img onmysql-5.5.28-osx10.6-x86_64.dmg
which createdmysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.
– tuxdna
Feb 5 '14 at 10:57
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
add a comment |
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:
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:
sudo modprobe hfsplus
When done, you can unmount it by running:
sudo umount /mnt
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:
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:
sudo modprobe hfsplus
When done, you can unmount it by running:
sudo umount /mnt
edited Mar 11 '17 at 19:00
Community♦
1
1
answered Apr 29 '11 at 18:11
LekensteynLekensteyn
124k49270361
124k49270361
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
4
I get this error -mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
1
@tuxdna Do you really have a HFS image? Check the output offile file.dmg
. You can also try7z l file.dmg
to list the contents.
– Lekensteyn
Feb 5 '14 at 10:55
I am usingdmg2img v1.6.2
. I ran dmg2img onmysql-5.5.28-osx10.6-x86_64.dmg
which createdmysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.
– tuxdna
Feb 5 '14 at 10:57
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
add a comment |
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
4
I get this error -mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
1
@tuxdna Do you really have a HFS image? Check the output offile file.dmg
. You can also try7z l file.dmg
to list the contents.
– Lekensteyn
Feb 5 '14 at 10:55
I am usingdmg2img v1.6.2
. I ran dmg2img onmysql-5.5.28-osx10.6-x86_64.dmg
which createdmysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.
– tuxdna
Feb 5 '14 at 10:57
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
This will not work if the dmg file has 10.6+ compressed files in it.
– HDave
Oct 23 '13 at 20:14
4
4
I get this error -
mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
I get this error -
mount: wrong fs type, bad option, bad superblock on /dev/loop0
– tuxdna
Feb 5 '14 at 10:40
1
1
@tuxdna Do you really have a HFS image? Check the output of
file file.dmg
. You can also try 7z l file.dmg
to list the contents.– Lekensteyn
Feb 5 '14 at 10:55
@tuxdna Do you really have a HFS image? Check the output of
file file.dmg
. You can also try 7z l file.dmg
to list the contents.– Lekensteyn
Feb 5 '14 at 10:55
I am using
dmg2img v1.6.2
. I ran dmg2img on mysql-5.5.28-osx10.6-x86_64.dmg
which created mysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.– tuxdna
Feb 5 '14 at 10:57
I am using
dmg2img v1.6.2
. I ran dmg2img on mysql-5.5.28-osx10.6-x86_64.dmg
which created mysql-5.5.28-osx10.6-x86_64.img
, but it doesn't mount.– tuxdna
Feb 5 '14 at 10:57
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
@Lekensteyn Thanks! Now it works. Check my answer below.
– tuxdna
Feb 5 '14 at 11:12
add a comment |
To extract it, it is much more easier to use 7zip. Simply do:
7z x file.dmg
7
Thanks,7z
did the job, whereasdmg2img
complained about a corrupted dmg image.
– rinni
Jun 30 '14 at 12:42
2
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
This just created a file called0.unknown partition
for me.
– Aaron Franke
Jan 10 '18 at 15:13
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
add a comment |
To extract it, it is much more easier to use 7zip. Simply do:
7z x file.dmg
7
Thanks,7z
did the job, whereasdmg2img
complained about a corrupted dmg image.
– rinni
Jun 30 '14 at 12:42
2
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
This just created a file called0.unknown partition
for me.
– Aaron Franke
Jan 10 '18 at 15:13
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
add a comment |
To extract it, it is much more easier to use 7zip. Simply do:
7z x file.dmg
To extract it, it is much more easier to use 7zip. Simply do:
7z x file.dmg
answered Feb 15 '13 at 9:19
rumpelrumpel
79969
79969
7
Thanks,7z
did the job, whereasdmg2img
complained about a corrupted dmg image.
– rinni
Jun 30 '14 at 12:42
2
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
This just created a file called0.unknown partition
for me.
– Aaron Franke
Jan 10 '18 at 15:13
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
add a comment |
7
Thanks,7z
did the job, whereasdmg2img
complained about a corrupted dmg image.
– rinni
Jun 30 '14 at 12:42
2
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
This just created a file called0.unknown partition
for me.
– Aaron Franke
Jan 10 '18 at 15:13
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
7
7
Thanks,
7z
did the job, whereas dmg2img
complained about a corrupted dmg image.– rinni
Jun 30 '14 at 12:42
Thanks,
7z
did the job, whereas dmg2img
complained about a corrupted dmg image.– rinni
Jun 30 '14 at 12:42
2
2
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
Note that 7z works only for unencrypted dmg images
– vog
Dec 23 '16 at 18:19
This just created a file called
0.unknown partition
for me.– Aaron Franke
Jan 10 '18 at 15:13
This just created a file called
0.unknown partition
for me.– Aaron Franke
Jan 10 '18 at 15:13
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
A lot faster then the accepted answer. Thanks
– Kevin Lemaire
Feb 19 '18 at 14:14
add a comment |
This works for me:
- Extract using
7z x
- Locate the
hfs
partition file - Mount it to a directory
Extract using 7z x
root # aptitude install p7zip-full
root # 7z x ../mysql-5.5.28-osx10.6-x86_64.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: ../mysql-5.5.28-osx10.6-x86_64.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 125475840
Compressed: 117543935
root # ls
0.MBR 1.Primary GPT Header 2.Primary GPT Table 3.free 4.hfs 5.free 6.Backup GPT Table 7.Backup GPT Header
Locate the hfs
partition ( here it is 4.hfs
file ):
root # ls -l
total 122548
-rw-r--r-- 1 root root 512 Feb 5 16:06 0.MBR
-rw-r--r-- 1 root root 512 Feb 5 16:06 1.Primary GPT Header
-rw-r--r-- 1 root root 16384 Feb 5 16:06 2.Primary GPT Table
-rw-r--r-- 1 root root 3072 Feb 5 16:06 3.free
-rw-r--r-- 1 root root 125435904 Feb 5 16:06 4.hfs
-rw-r--r-- 1 root root 2560 Feb 5 16:06 5.free
-rw-r--r-- 1 root root 16384 Feb 5 16:06 6.Backup GPT Table
-rw-r--r-- 1 root root 512 Feb 5 16:06 7.Backup GPT Header
Mount it to folder:
root # mkdir t
root # mount -oloop 4.hfs t
root # cd t/
root # ls
mysql-5.5.28-osx10.6-x86_64.pkg MySQL.prefPane MySQLStartupItem.pkg ReadMe.txt
You can specify the single file you want to extract:7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
add a comment |
This works for me:
- Extract using
7z x
- Locate the
hfs
partition file - Mount it to a directory
Extract using 7z x
root # aptitude install p7zip-full
root # 7z x ../mysql-5.5.28-osx10.6-x86_64.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: ../mysql-5.5.28-osx10.6-x86_64.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 125475840
Compressed: 117543935
root # ls
0.MBR 1.Primary GPT Header 2.Primary GPT Table 3.free 4.hfs 5.free 6.Backup GPT Table 7.Backup GPT Header
Locate the hfs
partition ( here it is 4.hfs
file ):
root # ls -l
total 122548
-rw-r--r-- 1 root root 512 Feb 5 16:06 0.MBR
-rw-r--r-- 1 root root 512 Feb 5 16:06 1.Primary GPT Header
-rw-r--r-- 1 root root 16384 Feb 5 16:06 2.Primary GPT Table
-rw-r--r-- 1 root root 3072 Feb 5 16:06 3.free
-rw-r--r-- 1 root root 125435904 Feb 5 16:06 4.hfs
-rw-r--r-- 1 root root 2560 Feb 5 16:06 5.free
-rw-r--r-- 1 root root 16384 Feb 5 16:06 6.Backup GPT Table
-rw-r--r-- 1 root root 512 Feb 5 16:06 7.Backup GPT Header
Mount it to folder:
root # mkdir t
root # mount -oloop 4.hfs t
root # cd t/
root # ls
mysql-5.5.28-osx10.6-x86_64.pkg MySQL.prefPane MySQLStartupItem.pkg ReadMe.txt
You can specify the single file you want to extract:7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
add a comment |
This works for me:
- Extract using
7z x
- Locate the
hfs
partition file - Mount it to a directory
Extract using 7z x
root # aptitude install p7zip-full
root # 7z x ../mysql-5.5.28-osx10.6-x86_64.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: ../mysql-5.5.28-osx10.6-x86_64.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 125475840
Compressed: 117543935
root # ls
0.MBR 1.Primary GPT Header 2.Primary GPT Table 3.free 4.hfs 5.free 6.Backup GPT Table 7.Backup GPT Header
Locate the hfs
partition ( here it is 4.hfs
file ):
root # ls -l
total 122548
-rw-r--r-- 1 root root 512 Feb 5 16:06 0.MBR
-rw-r--r-- 1 root root 512 Feb 5 16:06 1.Primary GPT Header
-rw-r--r-- 1 root root 16384 Feb 5 16:06 2.Primary GPT Table
-rw-r--r-- 1 root root 3072 Feb 5 16:06 3.free
-rw-r--r-- 1 root root 125435904 Feb 5 16:06 4.hfs
-rw-r--r-- 1 root root 2560 Feb 5 16:06 5.free
-rw-r--r-- 1 root root 16384 Feb 5 16:06 6.Backup GPT Table
-rw-r--r-- 1 root root 512 Feb 5 16:06 7.Backup GPT Header
Mount it to folder:
root # mkdir t
root # mount -oloop 4.hfs t
root # cd t/
root # ls
mysql-5.5.28-osx10.6-x86_64.pkg MySQL.prefPane MySQLStartupItem.pkg ReadMe.txt
This works for me:
- Extract using
7z x
- Locate the
hfs
partition file - Mount it to a directory
Extract using 7z x
root # aptitude install p7zip-full
root # 7z x ../mysql-5.5.28-osx10.6-x86_64.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_IN,Utf16=on,HugeFiles=on,4 CPUs)
Processing archive: ../mysql-5.5.28-osx10.6-x86_64.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 125475840
Compressed: 117543935
root # ls
0.MBR 1.Primary GPT Header 2.Primary GPT Table 3.free 4.hfs 5.free 6.Backup GPT Table 7.Backup GPT Header
Locate the hfs
partition ( here it is 4.hfs
file ):
root # ls -l
total 122548
-rw-r--r-- 1 root root 512 Feb 5 16:06 0.MBR
-rw-r--r-- 1 root root 512 Feb 5 16:06 1.Primary GPT Header
-rw-r--r-- 1 root root 16384 Feb 5 16:06 2.Primary GPT Table
-rw-r--r-- 1 root root 3072 Feb 5 16:06 3.free
-rw-r--r-- 1 root root 125435904 Feb 5 16:06 4.hfs
-rw-r--r-- 1 root root 2560 Feb 5 16:06 5.free
-rw-r--r-- 1 root root 16384 Feb 5 16:06 6.Backup GPT Table
-rw-r--r-- 1 root root 512 Feb 5 16:06 7.Backup GPT Header
Mount it to folder:
root # mkdir t
root # mount -oloop 4.hfs t
root # cd t/
root # ls
mysql-5.5.28-osx10.6-x86_64.pkg MySQL.prefPane MySQLStartupItem.pkg ReadMe.txt
answered Feb 5 '14 at 11:11
tuxdnatuxdna
404411
404411
You can specify the single file you want to extract:7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
add a comment |
You can specify the single file you want to extract:7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
You can specify the single file you want to extract:
7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
You can specify the single file you want to extract:
7z x ../mysql-5.5.28-osx10.6-x86_64.dmg 4.hfs
– Lekensteyn
Feb 5 '14 at 15:56
add a comment |
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+
$ dmg2img -l file.dmg
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3: (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5: (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)
$ dmg2img -p 4 file.dmg imagefile.img
- Current Ubuntu versions come with 1.6.5 as of version 14.04
add a comment |
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+
$ dmg2img -l file.dmg
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3: (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5: (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)
$ dmg2img -p 4 file.dmg imagefile.img
- Current Ubuntu versions come with 1.6.5 as of version 14.04
add a comment |
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+
$ dmg2img -l file.dmg
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3: (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5: (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)
$ dmg2img -p 4 file.dmg imagefile.img
- Current Ubuntu versions come with 1.6.5 as of version 14.04
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+
$ dmg2img -l file.dmg
partition 0: Protective Master Boot Record (MBR : 0)
partition 1: GPT Header (Primary GPT Header : 1)
partition 2: GPT Partition Data (Primary GPT Table : 2)
partition 3: (Apple_Free : 3)
partition 4: disk image (Apple_HFS : 4)
partition 5: (Apple_Free : 5)
partition 6: GPT Partition Data (Backup GPT Table : 6)
partition 7: GPT Header (Backup GPT Header : 7)
$ dmg2img -p 4 file.dmg imagefile.img
- Current Ubuntu versions come with 1.6.5 as of version 14.04
edited Apr 18 '16 at 2:50
Jorge Castro
37.3k107422618
37.3k107422618
answered Dec 22 '12 at 1:37
user107033
add a comment |
add a comment |
When using dmg2img file.dmg imagefile.img
on linux if you get
ERROR: Inflation failed message, just install 7zip as
sudo aptitude install p7zip-full
and issue the following command on terminal
7z x your_file.dmg
- find the InstallMacOSX.pkg/InstallESD.dmg
- issue the command
dmg2img InstallESD.dmg imagefile.img
on the terminal.
Now you can mount imagefile.img with
modprobe hfsplus
and then
mount -t hfsplus -o loop mountain.img /mnt
add a comment |
When using dmg2img file.dmg imagefile.img
on linux if you get
ERROR: Inflation failed message, just install 7zip as
sudo aptitude install p7zip-full
and issue the following command on terminal
7z x your_file.dmg
- find the InstallMacOSX.pkg/InstallESD.dmg
- issue the command
dmg2img InstallESD.dmg imagefile.img
on the terminal.
Now you can mount imagefile.img with
modprobe hfsplus
and then
mount -t hfsplus -o loop mountain.img /mnt
add a comment |
When using dmg2img file.dmg imagefile.img
on linux if you get
ERROR: Inflation failed message, just install 7zip as
sudo aptitude install p7zip-full
and issue the following command on terminal
7z x your_file.dmg
- find the InstallMacOSX.pkg/InstallESD.dmg
- issue the command
dmg2img InstallESD.dmg imagefile.img
on the terminal.
Now you can mount imagefile.img with
modprobe hfsplus
and then
mount -t hfsplus -o loop mountain.img /mnt
When using dmg2img file.dmg imagefile.img
on linux if you get
ERROR: Inflation failed message, just install 7zip as
sudo aptitude install p7zip-full
and issue the following command on terminal
7z x your_file.dmg
- find the InstallMacOSX.pkg/InstallESD.dmg
- issue the command
dmg2img InstallESD.dmg imagefile.img
on the terminal.
Now you can mount imagefile.img with
modprobe hfsplus
and then
mount -t hfsplus -o loop mountain.img /mnt
edited Feb 19 at 4:18
Olorin
1
1
answered May 7 '14 at 8:22
amanaman
314
314
add a comment |
add a comment |
First of all install DMG2IMG. Now you can convert it to IMG
:
dmg2img your.dmg new.img
The IMG
can be mounted with:
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop new.img /mnt
And take a look at /mnt
add a comment |
First of all install DMG2IMG. Now you can convert it to IMG
:
dmg2img your.dmg new.img
The IMG
can be mounted with:
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop new.img /mnt
And take a look at /mnt
add a comment |
First of all install DMG2IMG. Now you can convert it to IMG
:
dmg2img your.dmg new.img
The IMG
can be mounted with:
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop new.img /mnt
And take a look at /mnt
First of all install DMG2IMG. Now you can convert it to IMG
:
dmg2img your.dmg new.img
The IMG
can be mounted with:
sudo modprobe hfsplus
sudo mount -t hfsplus -o loop new.img /mnt
And take a look at /mnt
answered Apr 29 '11 at 18:09
binfalsebinfalse
83758
83758
add a comment |
add a comment |
In the case of some .dmg
s, you can neither 7z x
them, nor mount
the result of dmg2img
.
In that case, the .img
resulting from dmg2img your.dmg new.img
can have its paritions extracted with 7z x
:
$ 7z x factor-macosx-x86-64-0.98.dmg
[...]
Extracting archive: factor-macosx-x86-64-0.98.dmg
ERROR: factor-macosx-x86-64-0.98.dmg
factor-macosx-x86-64-0.98.dmg
Open ERROR: Can not open the file as [Dmg] archive
$ dmg2img factor-macosx-x86-64-0.98.dmg factor.img
[...]
factor-macosx-x86-64-0.98.dmg --> factor.img
[...]
Archive successfully decompressed as factor.img
$ sudo mount -o loop -t hfsplus factor.img /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.
$ 7z x factor.img
[...]
Extracting archive: factor.img
[...]
Everything is Ok
Folders: 2717
Files: 10266
Size: 176431113
Compressed: 264214528
$ ls -lah factor factor/factor/
factor:
total 24K
drwx------ 6 cat cat 4.0K Jul 30 2018 .
drwxr-xr-x 21 cat cat 4.0K Feb 19 16:28 ..
drwx------ 8 cat cat 4.0K Jul 30 2018 factor
drwx------ 2 cat cat 4.0K Jul 30 2018 '[HFS+ Private Data]'
drwx------ 2 cat cat 4.0K Jul 30 2018 '.HFS+ Private Directory Data'$'r'
drwx------ 2 cat cat 4.0K Jul 30 2018 .Trashes
factor/factor/:
total 97M
drwx------ 8 cat cat 4.0K Jul 30 2018 .
drwx------ 6 cat cat 4.0K Jul 30 2018 ..
drwx------ 163 cat cat 4.0K Jul 30 2018 basis
drwx------ 45 cat cat 4.0K Jul 30 2018 core
-rw-r--r-- 1 cat cat 702 Jul 30 2018 .dir-locals.el
drwx------ 288 cat cat 12K Jul 30 2018 extra
-rw-r--r-- 1 cat cat 32 Jul 30 2018 factor
drwx------ 3 cat cat 4.0K Jul 30 2018 Factor.app
-rw-r--r-- 1 cat cat 97M Jul 30 2018 factor.image
-rw-r--r-- 1 cat cat 40 Jul 30 2018 .gitattributes
-rw-r--r-- 1 cat cat 43 Jul 30 2018 git-id
-rw-r--r-- 1 cat cat 366K Jul 30 2018 libfactor.dylib
-rw-r--r-- 1 cat cat 16K Jul 30 2018 libfactor-ffi-test.dylib
-rw-r--r-- 1 cat cat 1.3K Jul 30 2018 LICENSE.txt
drwx------ 9 cat cat 4.0K Jul 30 2018 misc
-rw-r--r-- 1 cat cat 4.6K Jul 30 2018 README.md
-rw-r--r-- 1 cat cat 3.6K Jul 30 2018 .travis.yml
drwx------ 2 cat cat 4.0K Jul 30 2018 work
Success!
Multiple answers suggest directly using7z
on the dmg file. Why convert it then?
– Olorin
Feb 19 at 4:18
@Olorin this is for when7z x your.dmg
fails withCan't open as archive: 1
, and whendmg2img
's output won't be accepted bymount
either. I'll clarify
– cat
Feb 19 at 21:24
add a comment |
In the case of some .dmg
s, you can neither 7z x
them, nor mount
the result of dmg2img
.
In that case, the .img
resulting from dmg2img your.dmg new.img
can have its paritions extracted with 7z x
:
$ 7z x factor-macosx-x86-64-0.98.dmg
[...]
Extracting archive: factor-macosx-x86-64-0.98.dmg
ERROR: factor-macosx-x86-64-0.98.dmg
factor-macosx-x86-64-0.98.dmg
Open ERROR: Can not open the file as [Dmg] archive
$ dmg2img factor-macosx-x86-64-0.98.dmg factor.img
[...]
factor-macosx-x86-64-0.98.dmg --> factor.img
[...]
Archive successfully decompressed as factor.img
$ sudo mount -o loop -t hfsplus factor.img /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.
$ 7z x factor.img
[...]
Extracting archive: factor.img
[...]
Everything is Ok
Folders: 2717
Files: 10266
Size: 176431113
Compressed: 264214528
$ ls -lah factor factor/factor/
factor:
total 24K
drwx------ 6 cat cat 4.0K Jul 30 2018 .
drwxr-xr-x 21 cat cat 4.0K Feb 19 16:28 ..
drwx------ 8 cat cat 4.0K Jul 30 2018 factor
drwx------ 2 cat cat 4.0K Jul 30 2018 '[HFS+ Private Data]'
drwx------ 2 cat cat 4.0K Jul 30 2018 '.HFS+ Private Directory Data'$'r'
drwx------ 2 cat cat 4.0K Jul 30 2018 .Trashes
factor/factor/:
total 97M
drwx------ 8 cat cat 4.0K Jul 30 2018 .
drwx------ 6 cat cat 4.0K Jul 30 2018 ..
drwx------ 163 cat cat 4.0K Jul 30 2018 basis
drwx------ 45 cat cat 4.0K Jul 30 2018 core
-rw-r--r-- 1 cat cat 702 Jul 30 2018 .dir-locals.el
drwx------ 288 cat cat 12K Jul 30 2018 extra
-rw-r--r-- 1 cat cat 32 Jul 30 2018 factor
drwx------ 3 cat cat 4.0K Jul 30 2018 Factor.app
-rw-r--r-- 1 cat cat 97M Jul 30 2018 factor.image
-rw-r--r-- 1 cat cat 40 Jul 30 2018 .gitattributes
-rw-r--r-- 1 cat cat 43 Jul 30 2018 git-id
-rw-r--r-- 1 cat cat 366K Jul 30 2018 libfactor.dylib
-rw-r--r-- 1 cat cat 16K Jul 30 2018 libfactor-ffi-test.dylib
-rw-r--r-- 1 cat cat 1.3K Jul 30 2018 LICENSE.txt
drwx------ 9 cat cat 4.0K Jul 30 2018 misc
-rw-r--r-- 1 cat cat 4.6K Jul 30 2018 README.md
-rw-r--r-- 1 cat cat 3.6K Jul 30 2018 .travis.yml
drwx------ 2 cat cat 4.0K Jul 30 2018 work
Success!
Multiple answers suggest directly using7z
on the dmg file. Why convert it then?
– Olorin
Feb 19 at 4:18
@Olorin this is for when7z x your.dmg
fails withCan't open as archive: 1
, and whendmg2img
's output won't be accepted bymount
either. I'll clarify
– cat
Feb 19 at 21:24
add a comment |
In the case of some .dmg
s, you can neither 7z x
them, nor mount
the result of dmg2img
.
In that case, the .img
resulting from dmg2img your.dmg new.img
can have its paritions extracted with 7z x
:
$ 7z x factor-macosx-x86-64-0.98.dmg
[...]
Extracting archive: factor-macosx-x86-64-0.98.dmg
ERROR: factor-macosx-x86-64-0.98.dmg
factor-macosx-x86-64-0.98.dmg
Open ERROR: Can not open the file as [Dmg] archive
$ dmg2img factor-macosx-x86-64-0.98.dmg factor.img
[...]
factor-macosx-x86-64-0.98.dmg --> factor.img
[...]
Archive successfully decompressed as factor.img
$ sudo mount -o loop -t hfsplus factor.img /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.
$ 7z x factor.img
[...]
Extracting archive: factor.img
[...]
Everything is Ok
Folders: 2717
Files: 10266
Size: 176431113
Compressed: 264214528
$ ls -lah factor factor/factor/
factor:
total 24K
drwx------ 6 cat cat 4.0K Jul 30 2018 .
drwxr-xr-x 21 cat cat 4.0K Feb 19 16:28 ..
drwx------ 8 cat cat 4.0K Jul 30 2018 factor
drwx------ 2 cat cat 4.0K Jul 30 2018 '[HFS+ Private Data]'
drwx------ 2 cat cat 4.0K Jul 30 2018 '.HFS+ Private Directory Data'$'r'
drwx------ 2 cat cat 4.0K Jul 30 2018 .Trashes
factor/factor/:
total 97M
drwx------ 8 cat cat 4.0K Jul 30 2018 .
drwx------ 6 cat cat 4.0K Jul 30 2018 ..
drwx------ 163 cat cat 4.0K Jul 30 2018 basis
drwx------ 45 cat cat 4.0K Jul 30 2018 core
-rw-r--r-- 1 cat cat 702 Jul 30 2018 .dir-locals.el
drwx------ 288 cat cat 12K Jul 30 2018 extra
-rw-r--r-- 1 cat cat 32 Jul 30 2018 factor
drwx------ 3 cat cat 4.0K Jul 30 2018 Factor.app
-rw-r--r-- 1 cat cat 97M Jul 30 2018 factor.image
-rw-r--r-- 1 cat cat 40 Jul 30 2018 .gitattributes
-rw-r--r-- 1 cat cat 43 Jul 30 2018 git-id
-rw-r--r-- 1 cat cat 366K Jul 30 2018 libfactor.dylib
-rw-r--r-- 1 cat cat 16K Jul 30 2018 libfactor-ffi-test.dylib
-rw-r--r-- 1 cat cat 1.3K Jul 30 2018 LICENSE.txt
drwx------ 9 cat cat 4.0K Jul 30 2018 misc
-rw-r--r-- 1 cat cat 4.6K Jul 30 2018 README.md
-rw-r--r-- 1 cat cat 3.6K Jul 30 2018 .travis.yml
drwx------ 2 cat cat 4.0K Jul 30 2018 work
Success!
In the case of some .dmg
s, you can neither 7z x
them, nor mount
the result of dmg2img
.
In that case, the .img
resulting from dmg2img your.dmg new.img
can have its paritions extracted with 7z x
:
$ 7z x factor-macosx-x86-64-0.98.dmg
[...]
Extracting archive: factor-macosx-x86-64-0.98.dmg
ERROR: factor-macosx-x86-64-0.98.dmg
factor-macosx-x86-64-0.98.dmg
Open ERROR: Can not open the file as [Dmg] archive
$ dmg2img factor-macosx-x86-64-0.98.dmg factor.img
[...]
factor-macosx-x86-64-0.98.dmg --> factor.img
[...]
Archive successfully decompressed as factor.img
$ sudo mount -o loop -t hfsplus factor.img /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/loop5, missing codepage or helper program, or other error.
$ 7z x factor.img
[...]
Extracting archive: factor.img
[...]
Everything is Ok
Folders: 2717
Files: 10266
Size: 176431113
Compressed: 264214528
$ ls -lah factor factor/factor/
factor:
total 24K
drwx------ 6 cat cat 4.0K Jul 30 2018 .
drwxr-xr-x 21 cat cat 4.0K Feb 19 16:28 ..
drwx------ 8 cat cat 4.0K Jul 30 2018 factor
drwx------ 2 cat cat 4.0K Jul 30 2018 '[HFS+ Private Data]'
drwx------ 2 cat cat 4.0K Jul 30 2018 '.HFS+ Private Directory Data'$'r'
drwx------ 2 cat cat 4.0K Jul 30 2018 .Trashes
factor/factor/:
total 97M
drwx------ 8 cat cat 4.0K Jul 30 2018 .
drwx------ 6 cat cat 4.0K Jul 30 2018 ..
drwx------ 163 cat cat 4.0K Jul 30 2018 basis
drwx------ 45 cat cat 4.0K Jul 30 2018 core
-rw-r--r-- 1 cat cat 702 Jul 30 2018 .dir-locals.el
drwx------ 288 cat cat 12K Jul 30 2018 extra
-rw-r--r-- 1 cat cat 32 Jul 30 2018 factor
drwx------ 3 cat cat 4.0K Jul 30 2018 Factor.app
-rw-r--r-- 1 cat cat 97M Jul 30 2018 factor.image
-rw-r--r-- 1 cat cat 40 Jul 30 2018 .gitattributes
-rw-r--r-- 1 cat cat 43 Jul 30 2018 git-id
-rw-r--r-- 1 cat cat 366K Jul 30 2018 libfactor.dylib
-rw-r--r-- 1 cat cat 16K Jul 30 2018 libfactor-ffi-test.dylib
-rw-r--r-- 1 cat cat 1.3K Jul 30 2018 LICENSE.txt
drwx------ 9 cat cat 4.0K Jul 30 2018 misc
-rw-r--r-- 1 cat cat 4.6K Jul 30 2018 README.md
-rw-r--r-- 1 cat cat 3.6K Jul 30 2018 .travis.yml
drwx------ 2 cat cat 4.0K Jul 30 2018 work
Success!
edited Feb 19 at 21:49
answered Feb 19 at 2:47
catcat
9381338
9381338
Multiple answers suggest directly using7z
on the dmg file. Why convert it then?
– Olorin
Feb 19 at 4:18
@Olorin this is for when7z x your.dmg
fails withCan't open as archive: 1
, and whendmg2img
's output won't be accepted bymount
either. I'll clarify
– cat
Feb 19 at 21:24
add a comment |
Multiple answers suggest directly using7z
on the dmg file. Why convert it then?
– Olorin
Feb 19 at 4:18
@Olorin this is for when7z x your.dmg
fails withCan't open as archive: 1
, and whendmg2img
's output won't be accepted bymount
either. I'll clarify
– cat
Feb 19 at 21:24
Multiple answers suggest directly using
7z
on the dmg file. Why convert it then?– Olorin
Feb 19 at 4:18
Multiple answers suggest directly using
7z
on the dmg file. Why convert it then?– Olorin
Feb 19 at 4:18
@Olorin this is for when
7z x your.dmg
fails with Can't open as archive: 1
, and when dmg2img
's output won't be accepted by mount
either. I'll clarify– cat
Feb 19 at 21:24
@Olorin this is for when
7z x your.dmg
fails with Can't open as archive: 1
, and when dmg2img
's output won't be accepted by mount
either. I'll clarify– cat
Feb 19 at 21:24
add a comment |
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 :
- extracting with 7z in a temp folder
- looking for which partition to mount
- copy the hfs/hfsplus folder/partition somewhere else
- delete the temp folder
- mount the partition
find it here: https://github.com/aurelien-rainone/scripts/blob/master/mountdmg.sh
example of use:
panty@Computerino:[~/scripts]: mountdmg.sh -t hfsplus -d /mnt ~/Downloads/cutecom-ng.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: /home/panty/Downloads/cutecom-ng.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 33549312
Compressed: 10059312
mountdmg.sh: successfully mounted 4.hfs on /dev/loop0
mountdmg.sh: run sudo umount /dev/loop0 when finished
add a comment |
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 :
- extracting with 7z in a temp folder
- looking for which partition to mount
- copy the hfs/hfsplus folder/partition somewhere else
- delete the temp folder
- mount the partition
find it here: https://github.com/aurelien-rainone/scripts/blob/master/mountdmg.sh
example of use:
panty@Computerino:[~/scripts]: mountdmg.sh -t hfsplus -d /mnt ~/Downloads/cutecom-ng.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: /home/panty/Downloads/cutecom-ng.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 33549312
Compressed: 10059312
mountdmg.sh: successfully mounted 4.hfs on /dev/loop0
mountdmg.sh: run sudo umount /dev/loop0 when finished
add a comment |
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 :
- extracting with 7z in a temp folder
- looking for which partition to mount
- copy the hfs/hfsplus folder/partition somewhere else
- delete the temp folder
- mount the partition
find it here: https://github.com/aurelien-rainone/scripts/blob/master/mountdmg.sh
example of use:
panty@Computerino:[~/scripts]: mountdmg.sh -t hfsplus -d /mnt ~/Downloads/cutecom-ng.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: /home/panty/Downloads/cutecom-ng.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 33549312
Compressed: 10059312
mountdmg.sh: successfully mounted 4.hfs on /dev/loop0
mountdmg.sh: run sudo umount /dev/loop0 when finished
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 :
- extracting with 7z in a temp folder
- looking for which partition to mount
- copy the hfs/hfsplus folder/partition somewhere else
- delete the temp folder
- mount the partition
find it here: https://github.com/aurelien-rainone/scripts/blob/master/mountdmg.sh
example of use:
panty@Computerino:[~/scripts]: mountdmg.sh -t hfsplus -d /mnt ~/Downloads/cutecom-ng.dmg
7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Processing archive: /home/panty/Downloads/cutecom-ng.dmg
Extracting 0.MBR
Extracting 1.Primary GPT Header
Extracting 2.Primary GPT Table
Extracting 3.free
Extracting 4.hfs
Extracting 5.free
Extracting 6.Backup GPT Table
Extracting 7.Backup GPT Header
Everything is Ok
Files: 8
Size: 33549312
Compressed: 10059312
mountdmg.sh: successfully mounted 4.hfs on /dev/loop0
mountdmg.sh: run sudo umount /dev/loop0 when finished
edited Aug 2 '15 at 15:10
answered Aug 2 '15 at 15:04
arainonearainone
1135
1135
add a comment |
add a comment |
protected by Community♦ Feb 16 '16 at 4:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?