Skip to content

Instantly share code, notes, and snippets.

@jamieparfet
Last active February 11, 2023 19:16
Show Gist options
  • Save jamieparfet/0479c938495f88d1b75b30aff318f735 to your computer and use it in GitHub Desktop.
Save jamieparfet/0479c938495f88d1b75b30aff318f735 to your computer and use it in GitHub Desktop.
Create an ISO from the mojave installer app
#!/bin/bash
# This assumes that the ~6GB mojave installer is in the /Applications folder.
# If it's not, just open the App Store, search Mojave, and you can download the installer file from there.
hdiutil create -o /tmp/mojave.cdr -size 6g -layout SPUD -fs HFS+J
hdiutil attach /tmp/mojave.cdr.dmg -noverify -mountpoint /Volumes/install_mojave
sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave
mv /tmp/mojave.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ mojave
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/mojave.iso
mv ~/Desktop/mojave.iso.cdr ~/Desktop/mojave.iso
rm ~/Desktop/InstallSystem.dmg
# Now there should be an ISO on your desktop called mojave.iso
# Once mojave is installed, in order to install VMware tools to enable full-screen resolution, run:
sudo spctl --master-disable
# on the guest OS. That will disable Gatekeeper and allow any apps and the necessary kexts to run
@croose
Copy link

croose commented Sep 5, 2019

When I boot the new VM with the MOJAVE.ISO file as the boot drive. I get a black screen with a WHITE "NO" symbol.

I have the same problem. Did you find a solution? I'm using a Macmini7,1 with ESXi 6.7 U2.

@chouyang
Copy link

This won't work on macOS Catalina as step 3 will fail to reformat (Erase) the temp file.

@mr-ryan-james
Copy link

This won't work on macOS Catalina as step 3 will fail to reformat (Erase) the temp file.

This happened to me as well - I had to use a Volume on an external hard drive reformatted with Mac OS Extended to get it to work.

@mrblog47
Copy link

This worked on Catalina for me if I opened disk utility (GUI) and erased the disk there first. Then I could continue after step 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment