Mount dmg
Jump to navigation
Jump to search
To do this we'll use a masked package: dmg2img. You'll need to unmask it using /etc/portage/package.keywords.
Apparently this package is the successor of dmg2iso. The syntax appeared to be fairly simple, but it installed to /usr/sbin so you need to be root to use it. In the example below, substitute stevejobsiswaistingmytime.dmg with the name of your .dmg file and stupidmacfile.img with your desired img file name. There are some switches so feel free to look at these for yourself.
sudo dmg2img [opts] stevejobsiswaistingmytime.dmg stupidmacfile.img
This converts the (compressed?) dmg file to an img file in hfs format.
To mount this image, you'll need support for hfs and loopback devices in your kernel.
File systems ---> [*] Miscellaneous filesystems ---> <*> Apple Macintosh file system support (EXPERIMENTAL) <*> Apple Extended HFS file system support Device Drivers ---> [*] Block devices ---> <*> Loopback device support
Once you have these prereqs, you can mount the img file.
mkdir ihatemac sudo mount -t hfsplus -o loop stupidmacfile.img ihatemac