转:在ubuntu下将dmg文件转化为iso格式

dmg格式是Mac系统下使用的文件,在Ubuntu下不能直接使用.

iso格式则是大多数Linux和Windows下常用的镜像文件格式.

为了方便在Ubuntu或者Windows下安装Mac虚拟机,需要转换个iso格式出来.

1. 打开终端,安装dmg2img。sudo apt-get install dmg2img

2. 将dmg格式转化为img格式.  dmg2img /path/to/example.dmg /path/to/example.img

3. 挂载img文件.

sudo mkdir /media/example

sudo modprobe hfsplus

sudo mount -t hfsplus -o loop example.img /media/example

这时候会遇到一个错误:

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

这时候用

/usr/sbin/sfdisk img_Mac_X_Lion.img  来调整分区

各种回车,最后输入y即可.如图

然后把这玩意再挂载到/media/mac上

 

4. 用Brasero把img转换成iso格式. Brasero在 Applications ->Sound & Video

5. 翻刻一个iso就出来了

参考资料:

1. http://hi.baidu.com/heutsnc/blog/item/777ac861f68ab25eeaf8f850.html

2. http://webcache.googleusercontent.com/search?q=cache:-uQE6LHwnFcJ:wiki.aranym.org/afs/hd_partition_linux+unrecognized+partition+table+typeOld+situation&cd=2&hl=en&ct=clnk&gl=hk&client=ubuntu

3. http://webcache.googleusercontent.com/search?q=cache:83pRiZ6MMKEJ:www.psibo.unibo.it/areait/partitions.html+bad+superblock+on+/dev/loop0&cd=1&hl=en&ct=clnk&gl=hk&client=ubuntu

转载于:https://www.cnblogs.com/li-baibo/archive/2012/11/22/2782620.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值