sh 创建OSX Mojave ISO

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 创建OSX Mojave ISO相关的知识,希望对你有一定的参考价值。

#!/bin/bash

# Install OSX Mojave through App Store. After downloading, the "InstallESD" is automatically mounted, which causes this script to fail.
# Therefore, "/Volumes/InstallESD" should be unmounted before running this script!

# Summary of instructions
#1 Download Mojave from App Store
#2 open terminal and run "umount /Volumes/InstallESD"
#3 make script executable: "chmod +x make_mojave_iso.sh"
#4 Run "./make_mojave_iso.sh"
#5 After running this script, if successful, you end up with "Mojave.iso" on your desktop

hdiutil attach /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/mojave
hdiutil create -o /tmp/MojaveBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/MojaveBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -R /Volumes/mojave/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/mojave/
mv /tmp/MojaveBase.cdr.dmg /tmp/BaseSystem.dmg

# Restore the 10.14 Installer's BaseSystem.dmg into file system and place custom BaseSystem.dmg into the root
hdiutil create -o /tmp/Mojave.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp /tmp/BaseSystem.dmg /Volumes/OS\ X\ Base\ System

hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil convert /tmp/Mojave.cdr.dmg -format UDTO -o /tmp/Mojave.iso
mv /tmp/Mojave.iso.cdr ~/Desktop/Mojave.iso
rm /tmp/Mojave.cdr.dmg

以上是关于sh 创建OSX Mojave ISO的主要内容,如果未能解决你的问题,请参考以下文章

OSX Mojave sysctl -p 非法

如何在 OSX Mojave 上安装 MySQL 5.6?

在 OSX Mojave 上安装 DateTime 时遇到问题

用于Mac OSX(10.14.6)Mojave的USB到串行驱动程序

sh 在macOS Mojave上重新安装Brew的XCode命令行工具

XAMPP 7.2.10-0 macOS Mojave - 没有可见的按钮标签