如何在 Ubuntu 上创建 OS X Mountain Lion 可启动 USB 驱动器?

Jak*_*nds 20 mac usb macosx usb-creator 12.10

我已经知道如何在 Mac OS X 上做到这一点(网上有很多说明)。

但是有可能在 Ubuntu 上做到吗?如果是,如何?

Luc*_*cio 26

当你想创建一个 LiveUSB 时,你需要一个.iso图像来制作它。Mac 镜像是一个.dmg文件,所以你必须把这个文件转换成.iso. 然后安装它。

安装 DMG2IMG

DMG2IMG ( 1 , 2 ).dmg图像转换为.iso图像。要安装,请打开终端并输入以下命令:sudo apt-get install dmg2img

转换图像

随着dmg2img您将创建一个.img文件,该文件将具有相同的格式为一个.iso文件,你只需要更换的扩展。

在终端中输入以下命令或粘贴具有必要修改的脚本:

# Replace "OriginalFile.dmg" with the filename including the extension
# of your file. The extension will be replaced where necessary unless
# you want to specify the filenames yourself.

filename="OriginalFile.dmg"

# Replace with your file name and it will create the IMG file
dmg2img -i "${filename}" -o "${filename%.dmg}.img"

# Note that the extension of the first file is ".img"!
mv "${filename%.dmg}.img" "${filename%.dmg}.iso"
Run Code Online (Sandbox Code Playgroud)

使用 ISO 映像制作 LiveUSB

现在您已经有了.iso可以制作 LiveUSB的图像。有多种工具和答案可帮助您创建可启动的 USB 驱动器,其中一些特定于 PC/MBR 启动 (Bootcamp),其中 Mac 和自 Windows 8 以来的更新 PC 需要/支持 UEFI 启动。

一个相关的问题:AskDifferent –获取 OS X ISO 文件的官方方法