-
-
Notifications
You must be signed in to change notification settings - Fork 136
FAQs
I'll try to assemble some of the most common questions relating to this tool here.
This tool requires a good network connection since you are downloading a full macOS installer which are over 10 GB in size. Poor Internet connection with interruptions may result in failure. This is generally visible in the output of curl
. For example, if you see something like the following in your output or the log, then your connection to Apple's Software Update servers has failed during the download:
curl: (18) transfer closed with 3739576598 bytes remaining to read
Could not replicate https://swcdn.apple.com/content/downloads/06/34/002-42435-A_MA7OBDUK86/6xzypeod1xebasc92qkw2iv44e1j9pv09f/InstallAssistant.pkg: Command '['/usr/bin/curl', '-fL', '--create-dirs', '-o', '/Library/Management/erase-install/content/downloads/06/34/002-42435-A_MA7OBDUK86/6xzypeod1xebasc92qkw2iv44e1j9pv09f/InstallAssistant.pkg', '-w', '%{http_code}', '--compressed', 'https://swcdn.apple.com/content/downloads/06/34/002-42435-A_MA7OBDUK86/6xzypeod1xebasc92qkw2iv44e1j9pv09f/InstallAssistant.pkg']' returned non-zero exit status 18.
Also, are you running any security software? There have been reports that tools such as CrowdStrike and Microsoft Defender are blocking the construction of the installer from the downloaded components. If this happens, you could try the --fetch-full-installer
option which uses Apple's softwareupdate
command to obtain the installer.
Downloads using the default method are not stored in Content Caching. I've had opposing reports that the installers obtained with the --fetch-full-installer
option are cached in a Content Caching server, or are not! I have not been able to test this myself.
Can you change the name of this script as it is confusing when we want to use it for upgrading macOS, not erasing it?
This is a legacy of the very first version of this script, which I released to take advantage of the then brand new --eraseinstall
option of startosinstall
, and combine it with installinstallmacos.py
. The functionality of the script has grown considerably since then, particularly in relation to using it for upgrading macOS. Unfortunately the script is now too well known to change the name.
If it overly concerns you, you can of course change the name yourself. I have written the script so that the logs and output will show whatever the name of the script is.
I'm aware of a few other tools and scripts that do a similar job to this script, so I'll cover them here:
installinstallmacos.py
is a script for downloading macOS installers. erase-install.sh
is essentially a wrapper script on top of Greg Neagle's original installinstallmacos.py script, allowing you to select an installer automatically and then proceed to use it to upgrade or reinstall your Mac.
I had to create a fork of the original so that I could automate its use, and do checks for validity of the chosen installer on the system that is running the script. My version of installinstallmacos.py
remains a fork of the original, and I continue merge in upstream changes.
erase-install.sh
can be run with the --fetch-full-installer
option, in which case it will use macOS' built-in softwareupdate --fetch-full-installer
function to obtain the installer, and then optionally use it to upgrade or erase and reinstall your Mac.
Armin Briegel's fetch-installer-pkg is a variant of Greg Neagle's installinstallmacos.py
, designed to obtain an installer package rather than an installer app. It works for macOS 11 and newer.
I have incorporated Armin's code into my fork of installinstallmacos.py
, which is implemented by using the --pkg
option of erase-install.sh
(or of my fork of installinstallmacos.py
). So you can use the downloaded package to then optionally upgrade or erase and reinstall your Mac.
Armin Briegel's DownloadFullInstaller application is a Swift-based implementation of his fetch-installer-pkg
script. As such, it is just a GUI method of obtaining the installer and cannot be used as part of an automation workflow.
Greg Neagle's getmacosipsws.py can be used to get IPSW files for use with Apple Configurator 2, in order to reinstall macOS on Apple Silicon Mac computers using DFU mode. DFU-mode restores are a very fast method of reinstalling macOS, including the ability to downgrade macOS. There is no "single-click" workflow for reinstallation using these files, however.
Nindi Gill's Mist is a Swift-based command line tool for obtaining installers. This is another tool that uses the same software catalogs as installinstallmacos.py
and fetch-installer-pkg
, and can download either the installer app, pkg, or IPSW file, depending on the options used. The tool could be built into a full automation workflow in the same way that my fork of installinstallmacos.py
can, but as yet I have not felt it necessary to add the option to incorporate Mist
into erase-install.sh
, because it does exactly the same as my fork of installinstallmacos.py
(albeit with a nicer UI).
macOSUpgrade.sh is a script that provides similar workflows to the upgrade and erase-install options of erase-install.sh
, but it does not include any functionality for obtaining the installer in the first place.
I have attempted to include all the options that macOSUpgrade
has into erase-install.sh
, such as disk space checks and a "confirm" option. Additionally, I do not believe that macOSUpgrade
has yet been updated so that it will work on Apple Silicon Mac computers.
If you have found a feature in macOSUpgrade
that you like and is not present in erase-install.sh
, let me know and I'll consider adding it.