LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How do I properly mount a DMG file on ubuntu? (https://www.linuxquestions.org/questions/linux-newbie-8/how-do-i-properly-mount-a-dmg-file-on-ubuntu-894593/)

iBasher 07-30-2011 12:47 AM

How do I properly mount a DMG file on ubuntu?
 
Hi! :)

I have a decrypted DMG file and want to mount it on /mnt/ramdisk. I ran file on it and it shows as it should:

Code:

# file ramdisk.dmg
ramdisk.dmg: Macintosh HFS Extended version 4 data last mounted by: '10.0', created: Tue Nov 16 23:25:47 2010, last modified: Wed Nov 17 01:29:16 2010, last checked: Tue Nov 16 23:25:47 2010, block size: 4096, number of blocks: 4272, free blocks: 429

So I tried to use losetup:

Code:

# losetup /dev/loop0 ramdisk.dmg
losetup: /dev/loop0: device is busy

What's wrong with that? Tried to mount anyway:

Code:

# mount -t hfsplus -o loop ramdisk.dmg /mnt/ramdisk
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so

Tail shows:
Code:

# dmesg | tail -n 2
[ 9830.638694] hfs: invalid secondary volume header
[ 9830.638705] hfs: unable to find HFS+ superblock

The command losetup sets up the loop device for mounting so what I now did:

Code:

# losetup /dev/loop0 ramdisk.dmg
# mount /dev/loop0 /mnt/ramdisk
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
      missing codepage or helper program, or other error
      In some cases useful info is found in syslog - try
      dmesg | tail  or so
# dmesg | tail -n 2
[ 196.954927 ] hfs: invalid secondary volume header
[ 196.954927 ] hfs: unable to find HFS+ superblock

Now we have a new error. Any fix or way around?

iBasher 07-30-2011 01:09 AM

Anyone? -bump-

iBasher 07-30-2011 11:00 AM

Any help? Please?

jefro 07-30-2011 12:53 PM

You should edit posts. It looks from us to be two people have helped.

Don't make a loop make a folder and then mount it to that folder instead.

Might be a compressed file too.

iBasher 07-30-2011 01:45 PM

But mount tells me that I need to use a loop device and im already trying to mount to a directory. I am kinda new to the forum thing so i didnt know about the edit. Sorry! ;)


All times are GMT -5. The time now is 06:34 AM.