请教 Vmware 如何安装从 dmg 文件安装 OSX? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
goldenapp
V2EX    macOS

请教 Vmware 如何安装从 dmg 文件安装 OSX?

  •  1
     
  •   goldenapp 2014-07-03 10:13:11 +08:00 51908 次点击
    这是一个创建于 4206 天前的主题,其中的信息可能已经有所发展或是发生改变。
    之前一直都是dmg转成iso,从10.8安装,然后升级到10.9
    不过这样好麻烦啊,而且更新时间太长了

    貌似10.9dmg的目录结构和10.8变化很大啊
    个人不太喜欢网上转好的iso,想自己动手
    求V友指导,最好有个教程啥的
    谢谢各位~
    12 条回复    2014-07-04 17:20:09 +08:00
    Niphor
        1
    Niphor  
       2014-07-03 10:28:30 +08:00
    没啥变化,解压dmg,替换 link 链接 为实体目录,打包dmg
    vmware打补丁,载入dmg安装

    不过 新版的Vmware好像和 华硕用的lucidlogix virtu mvp有冲突,3D加速会报错
    记得在 mvp里面 添加vmware的黑名单。
    Niphor
        2
    Niphor  
       2014-07-03 10:29:39 +08:00   1
    Vmware Fusion 里面似乎还有个脚本,帮你转的。。。
    qq2511296
        3
    qq2511296  
       2014-07-03 10:39:07 +08:00
    vm好像有个补丁吧?
    要么直接选择所有文件 选择这个dmg 看看能不能装
    我用cdr格式都可以直接装
    lesswest
        4
    lesswest  
       2014-07-03 14:44:35 +08:00
    .dmg文件解压出.app 能直接装的 我试过
    goldenapp
        5
    goldenapp  
    OP
       2014-07-03 19:48:29 +08:00
    @lesswest 不是应用啊 是系统~
    goldenapp
        6
    goldenapp  
    OP
       2014-07-03 19:49:08 +08:00
    @qq2511296 哪个补丁 那个是为了显示10.9的选项吧……
    goldenapp
        7
    goldenapp  
    OP
       2014-07-03 19:49:28 +08:00
    @Niphor 真的吗 可否示下 谢谢~
    goldenapp
        8
    goldenapp  
    OP
       2014-07-03 19:50:10 +08:00
    @Niphor 有的啊 10.9变成hf2什么的 文件结构和以前不一样了……
    Niphor
        9
    Niphor  
       2014-07-04 09:27:59 +08:00
    @goldenapp

    忘记在哪找的了,直接贴出来吧...
    前提是你有原始的dmg或者.app
    我是在osx下面转换的,然后vmware里面装的,可以用
    只是vmware,多数要选默认项,别去改USB3支持什么的,不然鼠标什么的不能用。

    ```
    #!/bin/bash
    #
    # This executable converts a Mavericks .app (which allows to upgrade a machine
    # from Mac OS 10.6.7+ to Mavericks) into a Mavericks .dmg (which allows to
    # install Mavericks from scratch on a machine).
    #
    # It has been tested with "Install OS X 10.9 Developer Preview.app" (build
    # 13A476u).
    #


    set -x
    set -e


    # The first argument is the path to the .app bundle (the input of the
    # executable).
    inputApp="$1"
    # The second argument is the path to the .dmg file (the output of the
    # executable), which must end with ".dmg".
    outputDmg="$2"
    [ "${outputDmg: -4}" = .dmg ]


    #
    # The problem: /System/Installation/Packages inside /BaseSystem.dmg inside
    # "$inputApp"/Contents/SharedSupport/InstallESD.dmg is a dangling symlink,
    # which prevents installing Mavericks from scratch.
    # The solution: Replace the symlink with the /Packages directory inside
    # "$inputApp"/Contents/SharedSupport/InstallESD.dmg.
    #


    tmpDir=`mktemp -d -t 'Create Mavericks Installer'`
    installMnt="$tmpDir"/install
    installPkg="$installMnt"/Packages
    outputMnt="$tmpDir"/output
    outputPkg="$outputMnt"/System/Installation/Packages


    cleanup() {
    if [ -d "$outputMnt" ]; then
    hdiutil detach "$outputMnt"
    fi


    if [ -d "$installMnt" ]; then
    hdiutil detach "$installMnt"
    fi


    rmdir -- "$tmpDir"
    }


    # Cleanup on failure.
    trap cleanup ERR


    # Mount InstallESD.dmg so we can access /BaseSystem.dmg and /Packages inside.
    hdiutil attach "$inputApp"/Contents/SharedSupport/InstallESD.dmg \
    -mountpoint "$installMnt" -nobrowse


    # Create "$outputDmg", a read/write copy of the read-only BaseSystem.dmg.
    hdiutil convert "$installMnt"/BaseSystem.dmg -format UDRW -o "$outputDmg"


    # Enlarge "$outputDmg" to accommodate for our modifications. The UDRW image
    # format is not sparse, so we must precisely compute the new size.
    curSectors=`hdiutil resize "$outputDmg" -limits | tail -1 | awk '{ print $2 }'`
    extraSectors=`BLOCKSIZE=512 du -s -- "$installPkg" | awk '{ print $1 }'`
    hdiutil resize "$outputDmg" -sectors $((curSectors + extraSectors))


    # Mount "$outputDmg".
    hdiutil attach "$outputDmg" -mountpoint "$outputMnt" -nobrowse


    # Modify "$outputDmg".
    rm -- "$outputPkg"
    cp -r -- "$installPkg" "$outputPkg"


    # Cleanup on success.
    trap ERR; cleanup


    ls -alh -- "$outputDmg"
    ```
    lesswest
        11
    lesswest  
       2014-07-04 10:24:15 +08:00
    @goldenapp 是啊,dmg 解压出的系统不就是 Install XXX.app 吗?然后 vmware 直接装那个app 就是系统啊。
    goldenapp
        12
    goldenapp  
    OP
       2014-07-04 17:20:09 +08:00
    @Niphor @lesswest 非常感谢~
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     947 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 37ms UTC 22:21 PVG 06:21 LAX 14:21 JFK 17:21
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86