Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
@JulyIghor

This comment has been minimized.

Copy link

@JulyIghor JulyIghor commented Dec 23, 2018

hdiutil resize -size `hdiutil resize -limits ~/Desktop/InstallSystem.dmg | tail -n 1 | awk '{ print $1 }'`b ~/Desktop/InstallSystem.dmg

@pkIAIK

This comment has been minimized.

Copy link

@pkIAIK pkIAIK commented Jan 18, 2019

@jamieparfet Shouldn't it be:
sudo spctl --master-disable

@GB-2018

This comment has been minimized.

Copy link

@GB-2018 GB-2018 commented Apr 2, 2019

hi, what to do when i finally got this mojave.iso?
can i just use rufus to write it into a usb flash disk, and boot from usb disk to reinstall my mac os?

@GB-2018

This comment has been minimized.

Copy link

@GB-2018 GB-2018 commented Apr 2, 2019

line 8 sudo /Applications/Install\ macOS\ mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave
shoud be sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_mojave

line 10 hdiutil detach /Volumes/Install\ macOS\ mojave
should be hdiutil detach /Volumes/Install\ macOS\ Mojave

thank you, i use your command , successfully made a iso file

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented May 2, 2019

I have followed these steps, as well as about 6 other sets from other locations. These are by far the most concise.

I am trying to build a MOJAVE.ISO file so that I can stand up a second VM (the one I am on now is HIGH SIERRA 10.13).

I have the FULL 6.05GB Mojave Installer.app file.

Followed the steps (even the corrections posted) and have the MOJAVE.ISO file.

Placed on the datastore for the ESXI server (which has a 10.6, 10.8, 10.13 installation already). 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. After about 10-15 seconds, it goes the EFI BOOT screen.

Any ideas? It acts as if the ISO is not bootable.

I did one of these yesterday (another set of instructions) for SIERRA 10.12, and it booted first time, and allowed the install.

Thanks,

BH

@jamieparfet

This comment has been minimized.

Copy link
Owner Author

@jamieparfet jamieparfet commented Jul 9, 2019

@jamieparfet Shouldn't it be:
sudo spctl --master-disable

thanks, changed that

@croose

This comment has been minimized.

Copy link

@croose 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

This comment has been minimized.

Copy link

@chouyang chouyang commented Oct 19, 2019

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

@mr-ryan-james

This comment has been minimized.

Copy link

@mr-ryan-james mr-ryan-james commented Jan 18, 2020

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

This comment has been minimized.

Copy link

@mrblog47 mrblog47 commented Jan 24, 2020

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
You can’t perform that action at this time.