Cant mount DMG file.

Issues related to software problems.
xenos1303
Posts: 7
Joined: 2009/06/25 20:26:05
Location: Russia, Moscow
Contact:

Cant mount DMG file.

Post by xenos1303 » 2010/05/07 20:55:24

Hello all.

I'm try to mount dmg file such as loop device (it's file a realy image of MAC OS X DVD maked from MAC OS X):

mount -t hfsplus -o loop file.dmg /mnt/dmg

but system dysplayed this:

mount: wrong fs type, bad option, bad superblock on /dev/loop3,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

dmesg | tail
hfs: unable to find HFS+ superblock

I was check a kernel config (may be not include support MAC OS FS module):

cat /boot/config-2.6.18-164.el5xen | grep CONFIG_MAC_PARTITION
CONFIG_MAC_PARTITION=y

I think, may be this module not load and make:
modprobe hfsplus

Result has not change. :(

Found similar problem on the forum (https://www.centos.org/modules/newbb/viewtopic.php?topic_id=25944&forum=37&post_id=105592#forumpost105592) and try use type hfs (-t hfs) - problem not solved.

Tell me, please, what can I do for solving this problem?

Thank you in advance.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Cant mount DMG file.

Post by pschaff » 2010/05/09 13:02:54

Are you sure the .dmg file is good? Can it be mounted on a Mac?

xenos1303
Posts: 7
Joined: 2009/06/25 20:26:05
Location: Russia, Moscow
Contact:

Re: Cant mount DMG file.

Post by xenos1303 » 2010/05/09 22:05:17

I can't mount dmg file into MAC because don't have it :-(. But I use "TransMac" utility for MS Windows (not advertise) and can open dmg file. Also this utility inform me about file system - HFS+. May be I use old kernel?

cat /proc/version
Linux version 2.6.18-164.el5xen (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 04:03:03 EDT 2009

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Cant mount DMG file.

Post by scottro » 2010/05/09 22:32:28

I'm trying to remember how I did this. I think I ran mkisofs on the dmg and then did mount -o loop .iso

Either that or I gave up and did it on a VM running a system with a newer kernel.

Also, take a look at this

http://baghira.sourceforge.net/dmg.htm

Sometimes, the system won't see it as a block device. For example, a dmg on a friend's machine, copied to my machine, shows as
VAX COFF executable not stripped - version 376


Ok, after loooking at that page, it came back to me, and I just tested it.


If it's a dmg that is a block type device, that is if file dmg shows

Macintosh HFS Extended version 4 data (and maybe some other things),

It can be mounted, assuming the hfsplus module is present with

mount -o loop

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Cant mount DMG file.

Post by pschaff » 2010/05/10 13:28:26

I just replicated the OP's issue with a .dmg file that I can open on a Mac. Don't have a solution yet, but will try to have a go at it when time permits, if nobody else comes up with one first.

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Cant mount DMG file.

Post by scottro » 2010/05/10 16:05:52

What does file .dmg show? On some it seems to treat them as executables. (That was the type I couldn't mount.)

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Cant mount DMG file.

Post by pschaff » 2010/05/10 16:11:44

# file STUC2.dmg
STUC2.dmg: data

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Cant mount DMG file.

Post by scottro » 2010/05/10 18:14:33

And the hfplus module is definitely loaded?

Of course, that's the one result (a simple "data"), that I haven't gotten. I either get a long one (not at that machine right now, indicating that it's some sort of executable, or else the one I mentioned, an HFS file, which are the ones that I can't mount with -o loop, as long as I have the hfsplus module loaded.

[Moderator edit: s/can't/can/ - see below.]

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Cant mount DMG file.

Post by pschaff » 2010/05/10 20:14:08

[quote]
scottro wrote:
And the hfplus module is definitely loaded?
[/quote]
# lsmod | grep hfs
hfsplus 75717 0

[quote]
Of course, that's the one result (a simple "data"), that I haven't gotten. I either get a long one (not at that machine right now, indicating that it's some sort of executable, or else the one I mentioned, an HFS file, which are the ones that I can't mount with -o loop, as long as I have the hfsplus module loaded.[/quote]

You can't mount [b]with[/b] hfsplus loaded?

Tried with RHEL6 Beta to see if a later kernel would help, but they are now building without hfs/hfsplus and no module packages seem to be available. :-(

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Cant mount DMG file.

Post by scottro » 2010/05/10 21:07:59

Blch, probably too late to edit. The ones that the file command tell me are HFS files are the ones that I CAN mount with -o loop, as long as the hfsplus module is loaded. CAN CAN CAN. Grrr, stupid typos......


Ok, let me make sure I'm clear here, I see what mental shorthand made me right "can't" before.

I mean--if the file command comes back as HFS, I can mount it with -o loop. If it comes back as that executable, I cannot mount it. As for file returning "data", I don' t have any like that, so can't test.

Sorry all, for poor phrasing---I'm not sure if it was a typo or mental shorthand, but hopefully, this post clarifies.

Post Reply