Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
# Restore the 10.13 Installer's BaseSystem.dmg into file system and place custom BaseSystem.dmg into the root
hdiutil create -o /tmp/HighSierra.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.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/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso
mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso
rm /tmp/HighSierra.cdr.dmg

fiery- commented Jun 13, 2017

First, thanks for the High Sierra iso script. You may add "rm /tmp/BaseSystem.dmg" at the end.

Using the iso in VirtualBox, I selected the "Reinstall macOS" option:
screen shot 2017-06-14 at 01 50 58

Then installer requires Internet connection (may be to download the restore image) and the Continue button does nothing. It silently fails (no errors appear). I don't see any option how to configure the Internet connection, neither I want to download anything from Apple.
screen shot 2017-06-14 at 01 44 05

So, I just can't use this iso in VirtualBox. However, I was able to install High Sierra as an update to Sierra. This blog helped me a lot.

satmandu commented Jun 29, 2017

Edit: Updated for final release.

Another way is to use the built-in createinstallmedia tool to install to that blank image, and then convert the image to iso.

(But createinstallmedia needs to be run as root via sudo.)

hdiutil create -o /tmp/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia  --volume /Volumes/install_build --applicationpath /Applications/Install\ macOS\ High\ Sierra.app --nointeraction
hdiutil detach "/Volumes/Install macOS High Sierra"
hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso
mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso
rm /tmp/HighSierra.cdr.dmg

I modified your instructions though to use the app for the Release High Sierra Installer:


# Generate a BaseSystem.dmg with High Sierra Installer Packages
hdiutil attach /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg

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

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

gencube commented Jul 15, 2017

@agentsim, do you have instruction on how to create bootable usb from Linux?

gerrior commented Jul 28, 2017

@Fiery Is that the Console app running in the background in the screen shot? How did you invoke that?

@gerrior It's just the installer's log window. When in Installer, select Log from the Window menu.

vlaxa commented Sep 26, 2017

Update for public release:
/Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg
to:
/Applications/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg

What is the terminal command steps to make the app store high sierra that got released to public how to make into a bootable dvd
Everyone i find its only for beta please help as i have no usb drives and want it on a dual layer dvd

umetzu commented Sep 27, 2017

Added 2 lines for the final release:

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

# Restore the 10.13 Installer's BaseSystem.dmg into file system and place custom BaseSystem.dmg into the root
hdiutil create -o /tmp/HighSierra.cdr -size 8965m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ High\ Sierra.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/
rm /tmp/BaseSystem.dmg

hdiutil convert /tmp/HighSierra.cdr.dmg -format UDTO -o /tmp/HighSierra.iso
mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso
rm /tmp/HighSierra.cdr.dmg

br0adband commented Sep 28, 2017

Well, I've been trying to create a functional bootable installation ISO for High Sierra for like 2 weeks now and I have to say I'm getting sick of doing it over and over again and never getting it to work. I used the original script above and had no success - what I end up with is a 9GB+ ISO file that will boot, yes, but it only boots to the remote disk install method where it has to contact Apple to pull down the installation files every single time and that seems a bit stupid considering they're all right there on the ISO I just created.

So, when I saw that newly updated one for the final release posted earlier I fired everything up yet again and gave it another shot and, well, the same results again. I don't particularly know why this is happening, perhaps Apple added some check code in High Sierra so it can detect when it's being used in a virtual machine (I'm using VMware Workstation Pro 12.5, I know that version 14 was just released but I'm not going to touch that right now) and then it just craps out with the remote disk installer instead of accessing the actual files on the ISO.

Again it just seems stupid how this is working out but that's what happens I suppose. I still have hope a solution will present itself but, even that updated script that should work for the final release seems like it would but, at least in my usage of it, still just gives me a 9GB+ ISO that can only do the most basic thing which is the remote disk installation method. Sure would be nice to figure this crap out.

Dammit Apple, why are you making things so difficult. :)

halabibk commented Oct 2, 2017

Best way to create an ISO for macOS High Sierra 5.23 GB:

hdiutil create -o /tmp/HighSierra.cdr -size 5130m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg

Final Use PowerIso to convert DMG to ISO

Enjoy..!

br0adband commented Oct 3, 2017

halabibk:

THANK YOU, finally a working solution, tested myself a short time ago without any issues whatsoever, but I added:

hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso

to the end to get the final ISO conversion done which is followed by just renaming the HighSierra.iso.cdr to HighSierra.iso manually and then deleted the InstallSystem.dmg of course to get that space back.

Again, thanks for sharing that solution.

EDIT:
Ok, I used those instructions in the post above (halabibk's post) and the first time I did it I got it to work, it installed just fine without a single issue. But then I got stupid and decided to do it again on another drive and the second time it didn't work: the ISO remained bootable, and it did the installation, but the resulting VM wasn't bootable at all. I did some checking and of course even though I had manually chosen to format the virtual hard drive as HFS+ the installer created the APFS container and that borked everything so now I'm attempting to do this in another manner (because that was done using an SSD where the virtual hard drive vmdk file resided).

raellic commented Oct 4, 2017

@br0adband, issuing your command before unmounting the install disk image produced a "resource not available" message for me. I guess it can't convert the disk image while the image is mounted. I issued this command before yours to unmount, and it worked:

hdiutil detach /Volumes/Install\ macOS\ High\ Sierra

So to recap, the following sequence combining @halabibk and @bro0adband's solutions works for generating the ISO:

hdiutil create -o /tmp/HighSierra.cdr -size 5130m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso

Then manually rename the HighSierra.iso.cdr file to HighSierra.iso.

jowaju commented Oct 4, 2017

I can confirm the following commands gave me an ISO image that successfully installed High Sierra 10.13 final downloaded from the app store to an Actual, Real Airbook via USB DVD drive, using the APFS container with zero issues. Wifi was disabled before beginning the install. Took a looooooong time to transfer files from the DVD, but it worked 100%. Looks like the APFS issue you mentioned is something in VirtualBox, not something wrong with the image itself.

hdiutil create -o /tmp/HighSierra.cdr -size 5130m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso

PS - PowerISO said no conversion was necessary when I attempted to use it to convert the DMG to ISO, and the file sizes were identical.

mykola87 commented Oct 6, 2017

when I run the script (edited for the final release) it fails on line 6.
I ran each line separately in Terminal. I even re-downloaded the installation file just in case. The error I receive is:
Mac:~ username$ cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation cp: /Volumes/OS X Base System/System/Installation/Packages: File exists cp: /Volumes/highsierra/Packages: unable to copy extended attributes to /Volumes/OS X Base System/System/Installation/Packages: No such file or directory cp: /Volumes/OS X Base System/System/Installation/Packages/Core.pkg: No such file or directory cp: /Volumes/OS X Base System/System/Installation/Packages/EmbeddedOSFirmware.pkg: No such file or directory cp: /Volumes/OS X Base System/System/Installation/Packages/FirmwareUpdate.pkg: No such file or directory cp: /Volumes/OS X Base System/System/Installation/Packages/OSInstall.mpkg: No such file or directory
Any idea why this happens ?
running this in an existing vmware install of macOS High Sierra

Doesn't work for me. The "cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation" part just errors out with 10 different errors, so it's impossible to continue.

Easy answer to this: use createinstallmedia from the official image and then rip your USB/DVD device to ISO. Two steps required and it just works. Nice script tho.

For me everything is working fine! got a working .iso and installed this on vbox on manjaro rolling release. Nice setup to play with ;)

emev commented Nov 3, 2017

@agentsum, @satmandu, @umetzu, @vbosx Thank you very much! Everything worked perfectly for me!

Be aware that the disk size may have to be adjusted. 5130m didn't work for me, but 5300m did.

pat-s commented Nov 19, 2017

This worked for me using an increased size for the base image. Thanks to all contributers!

hdiutil create -o /tmp/HighSierra.cdr -size 5500m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso

mcandre commented Nov 26, 2017

Just noting here that createinstallmedia often yields a broken disk image, that makes VirtualBox get stuck in UEFI shell. Rerunning the createinstallmedia step eventually fixes this problem. And yeah, using at least 5500MB for the image also helps. :/

pat-s's recipe worked perfectly for me.

pat-s, hat off 2 you

Candunc commented Dec 5, 2017

If you get stuck at the UEFI Shell, there is a workaround. Type the following in:

Shell> fs1:
FS1:> cd "macOS Install Data"
FS1:\macOS Install Data> cd "Locked Files"
FS1:\macOS Install Data\Locked Files> cd "Boot Files"
FS1:\macOS Install Data\Locked Files\Boot Files> boot.efi

From this github comment which credits https://raimue.blog/2017/06/09/upgrading-a-vm-from-macos-10-12-sierra-to-macos-10-13-high-sierra-in-virtualbox/

I tried pats's steps and when issuing "sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build" i get the following:

Erasing Disk: 0%... 10%...
Error erasing disk error number (1, 0)
A error occurred erasing the disk.

Any ideas?

@stylemessiah, I had the same issue. I wasn't able to quickly find a reasonable explanation/fix. Instead I created dmg using disk utility (File -> New Image -> Blank Image, Size 6000 Mb, Format Mac OS Extended Journaled, Single partition - GUID Partition Map, read/write) and it worked just fine.

mwiesen commented Dec 26, 2017

On MacOS 10.13.2: If you get a Failed to copy kernelcache, “prelinkedkernel” couldn’t be copied to “.IABootFiles”. Error during the createinstallmedia step, increasing the size of the image to 5530m worked for me. In the end, the steps that did the job for me were:

hdiutil create -o /tmp/HighSierra.cdr -size 5530m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso
mv ~/Desktop/HighSierra.iso.cdr ~/Desktop/HighSierra.iso
rm ~/Desktop/InstallSystem.dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment