Hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/esdĪsr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/iso -noprompt -noverify -erase Hdiutil attach /tmp/tmp_ -noverify -nobrowse -mountpoint /Volumes/iso
Hdiutil create -o /tmp/tmp_iso.cdr -size 7316m -layout SPUD -fs HFS+J I don’t think I have any particular problems. However, since the folder structure from OS X 10.7 Lion to OS X 10.12 Sierra is different from 10.13 High Sierra or later, the commands are slightly different, but if you use the script on this page, that will also be supported.
The spelling of the command changes depending on the OS version, making it difficult to understand, but what you are doing is simple.
#CREATE BOOTABLE ISO FROM MAC SOFTWARE#
I think that the ISO file for macOS installation is often used with virtual environment software such as VMware and VirtualBox.