六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 41|回复: 0

Tips

[复制链接]

升级  30%

3

主题

3

主题

3

主题

童生

Rank: 1

积分
15
 楼主| 发表于 2013-1-15 14:20:42 | 显示全部楼层 |阅读模式
mount DMG files under ubuntu:
The only way you can mount a dmg with the command, sudo mouunt -t hfsplus -o loop /path/to/dmg /mount/point, is to decompress it first into an img file.

In order to decompress a dmg, then mount it, download dmg2img from http://vu1tur.eu.org/tools/download.pl?dmg2img.tar.gz
Then, after saving the file, dmg2img in your home folder, open terminal, and run, tar -zxvf ./dmg2img.tar.gz, then run run, cd dmg2img, then once you are inside the dmg2img directory run, make all.

If everything goes okay, then you can decompress your dmg file by executing the command, ./dmg2img -i /path/to/inputfile.dmg -o /path/to/outputfile.img, and remember, you must be inside the dmg2img directory at all times in order to run the command listed above. Also, the img file needs to be in the same location as the original dmg file. And preferably, the img file should have the same name as the dmg file. After decompressing the dmg, run, sudo modprobe hfsplus, then if hfsplus is installed (if not, run sudo apt-get install hfsplus), run sudo mount -t hfsplus -o loop /path/to/outputfile.img /mount/point. To create the mount point, run mkdir -p /mount/location.
 
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表