制作MacOS镜像
1、获取App格式的macOS完整镜像
官网地址:https://support.apple.com/zh-cn/HT211683
Catalina:https://apps.apple.com/cn/app/macos-catalina/id1466841314?mt=12
2、创建一个大小比app镜像大500M的空白dmg镜像
保存位置在桌面上:
Moterey:
1 | hdiutil create -o~/Desktop/macOS\ Monterey -size 14.6GB -layout SPUD -fs HFS+J |
Big Sur:
1 | hdiutil create -o~/Desktop/macOS\ Big\ Sur -size 14.6GB -layout SPUD -fs HFS+J |
Catalina:
1 | hdiutil create -o ~/Desktop/macOS\ Catalina -size 10GB -layout SPUD -fs HFS+J |
Mojave:
1 | hdiutil create -o ~/Desktop/macOS\ Mojave -size 7GB -layout SPUD -fs HFS+J |
High Sierra:
1 | hdiutil create -0~/Desktop/macOS\ High\ Sierra -size 6GB -layout SPUD -fs HFS+J |
Sierra:
1 | hdiutil create -o~/Desktop/macOS\ Sierra -size 6GB -layout SPUD -fs HES+J |
3、挂载创建的dmg镜像到虚拟磁盘
1 | hdiutil attach ~/Desktop/macOs\ Monterey.dmg -noverify -mountpoint /Volumes/macOs\ Monterey |
4、把app镜像写入到创建的dmg磁盘文件
Ventura:
1 | sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume |
Moterey:
1 | sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume |
Big Sur:
1 | sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume |
Catalina:
1 | sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume |
Mojave:
1 | sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume |
High Sierra:
1 | sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume |
EI Capitan:
1 | sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app |
5、卸载挂载的dmg磁盘
1 | hdiutil detach /Volumes/Install\ macoS\ Monterey |
6、将dmg镜像转换为cdr镜像
1 | hdiutil convert ~/Desktop/macOS\ Monterey.dmg-format UDTO -o ~/Desktop/macOs\ Monterey |