2023-07-24 21:20:37
浏览数 (2)
准备 BaseSystem.dmg
代码语言:javascript
复制hdiutil attach /Applications/Install macOS Catalina.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_esd
hdiutil create -o NewBaseSystem -size 8500m -layout SPUD -fs HFS J
hdiutil attach NewBaseSystem.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install macOS Catalina.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm -rf /Volumes/macOS Base System/System/Installation/Packages
cp -R /Volumes/install_esd/Packages /Volumes/macOS Base System/System/Installation
hdiutil detach /Volumes/macOS Base System/
hdiutil detach /Volumes/install_esd/
mv NewBaseSystem.dmg BaseSystem.dmg
构建最终镜像
代码语言:javascript
复制hdiutil create -o macOS_10.15_Catalina -size 9800m -layout SPUD -fs HFS J
hdiutil attach macOS_10.15_Catalina.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
asr restore -source /Applications/Install macOS Catalina.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp BaseSystem.dmg /Volumes/macOS Base System
diskutil rename /Volumes/macOS Base System/ Install macOS Catalina
hdiutil detach /Volumes/Install macOS Catalina/
hdiutil convert macOS_10.15_Catalina.dmg -format UDTO -o macOS_10.15_Catalina