以 OS X 10.9.5 Mavericks 为例,一共12个命令:
$ hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
$ hdiutil create -o /tmp/mac.cdr -size 7316m -layout SPUD -fs HFS+J
$ hdiutil attach /tmp/mac.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
$ asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
$ rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
$ cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
$ cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/System/BaseSystem.chunklist
$ cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg
$ hdiutil detach /Volumes/install_app
$ hdiutil detach /Volumes/OS\ X\ Base\ System/
$ hdiutil convert /tmp/mac.cdr.dmg -format UDTO -o /tmp/mac.iso
$ mv /tmp/mac.iso.cdr ~/Desktop/OSX10.9.5.iso