制作macOS 10.13.3安装盘
更新:HHH   时间:2023-1-7


app store下载macOS High Sierra

只能下载最新版的macOS,老版的已经下架了。有两种情况,一种是大小19M的app,一种是5G多的app。前者参考Creating a macOS High Sierra Installation ISO Image,后者参考製作 macOS High Sierra 10.13 的可開機安裝隨身碟及 ISO 映像檔。本人下载的是19M的app,参考的前者。

制作安装镜像

先准备一个U盘,在windows的diskpart中利用

sele disk x
clean
convert gpt
#有些时候磁盘efi分区少于200M,在mac上抹掉会失败,显示没有足够空间
create partition efi size=300

转换成gpt格式,并在macOS中抹掉该U盘。然后,打开安装macOS High Sierra的App,选择U盘,此时安装程序开始下载安装镜像,下载完成需要重启时退出,开始制作安装镜像。

#将下载的镜像合并到安装app中
mv "/macOS Install Data/*" "/Applications/Install macOS High Sierra.app/Contents/SharedSupport"
#创建并挂载一个磁盘
hdiutil create -o /tmp/HighSierra -size 12800m -layout SPUD -fs HFS+J -type SPARSE
hdiutil attach /tmp/HighSierra.sparseimage -noverify -nobrowse -mountpoint /Volumes/Untitled
#创建可启动磁盘
caffeinate asr restore -source "/Applications/Install macOS High Sierra.app/Contents/SharedSupport/BaseSystem.dmg" -target /Volumes/Untitled -noprompt -noverify -erase
#替换其中的安装app
sudo rm -rf "/Volumes/OS X Base System/Install macOS High Sierra.app"
caffeinate sudo cp -a "/Applications/Install macOS High Sierra.app" "/Volumes/OS X Base System/"
cp "/Applications/Install macOS High Sierra.app/Contents/Resources/InstallAssistant.icns" "/Volumes/OS X Base System/.VolumeIcon.icns"
SetFile -a C "/Volumes/OS X Base System/"
diskutil rename "OS X Base System" "Install macOS High Sierra"
hdiutil detach "/Volumes/Install macOS High Sierra"
hdiutil resize -size min /tmp/HighSierra.sparseimage
caffeinate hdiutil convert /tmp/HighSierra.sparseimage -format UDTO -o /tmp/HighSierra
mv /tmp/HighSierra.cdr /tmp/HighSierra.iso
#进入安装界面,创建安装磁盘,开始安装,要重启时关闭电源进入固件,重新从CD启动,复制安装镜像到安装磁盘。
cp "/Volumes/Install macOS High Sierra/Install macOS High Sierra.app/Contents/SharedSupport/InstallESDDmg.pkg" "/Volumes/Macintosh HD/macOS Install Data/"

unlocker

正常情况下VMware是不开放安装macOS的,需要patch。github下载DrDonk/unlocker,右键管理员打开win-install.cmd,正常安装,打开电源前修改配置文件,添加:

smc.version = "0"

最后,在app store中搜索xcode安装即可。

返回系统运维教程...