Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: How do I open .dmg on linux?

  1. #1
    Join Date
    Apr 2008
    Beans
    641

    How do I open .dmg on linux?

    Yes, .dmg can be opened on linux despite what smart people may say

    I tried following this guide

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

    And I wrote

    Code:
    joh@Johs-Zepto:~$ sudo mount -t hfs -o loop'/home/joh/Desktop/Alumin Fortis.dmg' /macdisk
    And terminal gave me

    Code:
    Usage: mount -V                 : print version
           mount -h                 : print this help
           mount                    : list mounted filesystems
           mount -l                 : idem, including volume labels
    So far the informational part. Next the mounting.
    The command is `mount [-t fstype] something somewhere'.
    Details found in /etc/fstab may be omitted.
           mount -a [-t|-O] ...     : mount all stuff from /etc/fstab
           mount device             : mount device at the known place
           mount directory          : mount known device here
           mount -t type dev dir    : ordinary mount command
    Note that one does not really mount a device, one mounts
    a filesystem (of the given type) found on the device.
    One can also mount an already visible directory tree elsewhere:
           mount --bind olddir newdir
    or move a subtree:
           mount --move olddir newdir
    One can change the type of mount containing the directory dir:
           mount --make-shared dir
           mount --make-slave dir
           mount --make-private dir
           mount --make-unbindable dir
    One can change the type of all the mounts in a mount subtree
    containing the directory dir:
           mount --make-rshared dir
           mount --make-rslave dir
           mount --make-rprivate dir
           mount --make-runbindable dir
    A device can be given by name, say /dev/hda1 or /dev/cdrom,
    or by label, using  -L label  or by uuid, using  -U uuid .
    Other options: [-nfFrsvw] [-o options] [-p passwdfd].
    For many more details, say  man 8 mount .
    What's wrong?
    My Deviantart
    Doin' it GIMP style

  2. #2
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.10 Wily Werewolf

    Re: How do I open .dmg on linux?

    Quote Originally Posted by Fzang View Post
    Code:
    joh@Johs-Zepto:~$ sudo mount -t hfs -o loop'/home/joh/Desktop/Alumin Fortis.dmg' /macdisk
    ....


    What's wrong?
    You need a space between the word loop and the ' that follows. Another way of dealing with the space in your 'Alumin Fortis.dmg' filename without using single quotes would be to escape the space with a backslash, thus:

    Code:
    sudo mount -t hfs -o loop /home/joh/Desktop/Alumin\ Fortis.dmg /macdisk

  3. #3
    Join Date
    Apr 2008
    Beans
    641

    Re: How do I open .dmg on linux?

    Now I get

    Code:
    mount: wrong fs type, bad option, bad superblock on /dev/loop0,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    What is this madness?? I read that linux could easily mount a disk image this way?
    My Deviantart
    Doin' it GIMP style

  4. #4
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.10 Wily Werewolf

    Re: How do I open .dmg on linux?

    That's interesting - I get the same as you with a variety of .dmg files, using both "-t hfs" and "-t hfsplus". Googling brings up a number of howtos with essentially the same instructions, so I think the issue is with the .dmg images, not the mount command, because I found this:

    http://www.linux4all.net/mounting_ap...mages_on_linux

    If the issue is the compression of the .dmg image, then that dmg2img utility might be the answer, although I haven't tried it myself.

    Have you got access to a Mac. It might be easier to mount the .dmg in a Mac. I'll try it myself later from a Mac terminal and see what happens. You've intrigued me.

  5. #5
    Join Date
    Apr 2008
    Beans
    641

    Re: How do I open .dmg on linux?

    Nope, I don't have access to a mac as such... or well, a couple in my class has a mac but I can't go around asking them to open my random .dmgs all the time
    My Deviantart
    Doin' it GIMP style

  6. #6
    Join Date
    Jan 2006
    Location
    Tulsa, OK
    Beans
    485
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How do I open .dmg on linux?

    I believe .dmg files can only be opened under Linux if they are not compressed or encrypted. I'm not sure how you can identify a compressed dmg though.

    [Edit]
    cofeecat's link already covered this (and how to decompress). Sorry about that.

  7. #7
    Join Date
    May 2009
    Beans
    6
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: How do I open .dmg on linux?

    Quote Originally Posted by coffeecat View Post
    You need a space between the word loop and the ' that follows. Another way of dealing with the space in your 'Alumin Fortis.dmg' filename without using single quotes would be to escape the space with a backslash, thus:

    Code:
    sudo mount -t hfs -o loop /home/joh/Desktop/Alumin\ Fortis.dmg /macdisk
    An easier, well, more user friendly way to do this is to get AcetoneISO from getdeb.net and it has a convert MacOS Image option in the conversion menu that allows you to extract the dmg file to a folder. You still can't do much with the contents though, unless they are just wallpapers or something generic.

  8. #8
    Join Date
    May 2006
    Beans
    167

    Re: How do I open .dmg on linux?

    Quote Originally Posted by komealy View Post
    An easier, well, more user friendly way to do this is to get AcetoneISO from getdeb.net and it has a convert MacOS Image option in the conversion menu that allows you to extract the dmg file to a folder. You still can't do much with the contents though, unless they are just wallpapers or something generic.
    +1 to that

  9. #9
    Join Date
    Oct 2005
    Location
    Western Canada
    Beans
    146
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Re: How do I open .dmg on linux?

    A few of the dmg files I have downloaded have proven to be bz2 compressed, for example the ogre sdk for mac. This was easily solved: I extracted it with archive manager, then mounted it from the terminal (it was of type hfsplus)

    1. Extract with archive mounter or bunzip2 (you might want to rename the dmg to have the extension bz2 to not confuse yourself. You could also now give the extracted file the extension .hfs_image (or .dmg) for clarity.
    2. mount archive as follows:
    Code:
     sudo mount -t hfsplus -o loop XXXXX.hfs_image /mnt
    TADA!
    I like cheese upon crackers. Liver upon crackers, however, is disgusting.

  10. #10
    Join Date
    Nov 2008
    Location
    Old Europe
    Beans
    79
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How do I open .dmg on linux?

    I dunno what to do. I have tried all the methods mentioned here in the thread and nothing worked. I tried to mount the image (with the "hfs" and the "hfsplus"-option, but it gave me the error-msg posted by Fzang), I tried acetoneiso (I gave me the "Process Error Code: 255" and the error-msg "*file name and location deleted*:The file format is invalid or unsupported."). Universal Extractor via Wine didn't even recognize the file ;(. Any other programm converted the dmg into an 1000MB big (trying converting it into bin with dmgextractor also didn't work ), invalid file ;( ;(
    But there is a happy end, 7-zip (via Wine) managed to open the dmg file and extract some stuff (It showed some partitions in the dmg file, I picked the biggest one with the nonsense-size of 1 GB and it was the right one).
    Last edited by cthlhu1987; May 3rd, 2010 at 02:42 AM.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •