LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-30-2011, 12:47 AM   #1
iBasher
LQ Newbie
 
Registered: Sep 2010
Posts: 16

Rep: Reputation: 0
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?

Last edited by iBasher; 07-30-2011 at 01:46 PM.
 
Old 07-30-2011, 01:09 AM   #2
iBasher
LQ Newbie
 
Registered: Sep 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Anyone? -bump-

Last edited by iBasher; 07-30-2011 at 01:47 PM.
 
Old 07-30-2011, 11:00 AM   #3
iBasher
LQ Newbie
 
Registered: Sep 2010
Posts: 16

Original Poster
Rep: Reputation: 0
Any help? Please?
 
Old 07-30-2011, 12:53 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,993

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
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.
 
Old 07-30-2011, 01:45 PM   #5
iBasher
LQ Newbie
 
Registered: Sep 2010
Posts: 16

Original Poster
Rep: Reputation: 0
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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount an Encrypted DMG in Ubuntu or Linux in General flouran Linux - General 3 11-09-2011 11:56 AM
can't convert .dmg file to iso baronobeefdip Linux - Software 2 02-21-2011 08:43 AM
Fedora 12 : mount dmg-files jonaskellens Linux - Newbie 6 05-07-2010 02:00 AM
Cannot Properly Mount File Systems After Adding New Hard Drive w/gparted in Ubuntu bper Linux - Hardware 2 02-10-2010 09:34 PM
How to burn MacOS .dmg file on a Linux system AIM Systems Linux - Software 3 03-09-2009 11:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration