Skip to content

Latest commit

 

History

History
779 lines (531 loc) · 44.2 KB

CHANGELOG.md

File metadata and controls

779 lines (531 loc) · 44.2 KB

CHANGELOG

Known Issues in current release

For open issues and known bugs, please see the Issues page.

Notice for installing erase-install package on macOS Sequoia

Since the package on this site is not signed, if you download this package from a browser and try to install it from Finder on a Mac running macOS Sequoia, it will fail to install, even if running Ctrl-Click. To solve this, do one of these:

  1. Go to System Settings, Privacy & Security, scroll down, click on "Open Anyway".
  2. Install from the command line, e.g. sudo installer -tgt / -pkg /path/to/erase-install-36.0.pkg
  3. Remove the quarantine bit, e.g. xattr -d com.apple.quarantine /path/to/erase-install-36.0.pkg

No date

17.09.2026

Updates in 36.0

  • Added support for macOS Sequoia, including the icon.
  • Added Ukrainian localization (#512, thanks to @liubkkkko for this contribution).
  • Added --cloneuser option.
  • Bumped mist-cli version to 2.1.1.
  • Bumped swiftDialog version to 2.5.2 except for systems running macOS 11 which still get 2.2.1. Note that the installer package includes both version 2.5.2 and 2.2.1, and the appropriate one will be installed.
  • Switched from using /bin/echo to using the built-in echo.

Bugfixes in 36.0

  • Ensured icons directory is created when running as standalone script.
  • Updated Makefile to use a GitHub Personal Access Token to allow builds where an API rate limit had been reached. If you're building you're own version, put your GitHub Personal Access Token into /Users/Shared/gh_token (or edit the Makefile accordingly).

11.06.2024

Updates in 35.0

  • Added the --min-battery option which, in conjunction with --check-power allows to set a minimum battery percentage, above which the power check is ignored. For example, --check power --min-battery 30 sets the minimum percentage to 30%. The minimum allowed is 15% (addresses #455, thanks @PhillyPhoto). --check power without --min-battery still requires AC power.
  • Added a 5-minute timeout to the password dialogs to prevent people ignoring it (addresses #501, thanks @PhillyPhoto).
  • Added the --language option to give the ability to override the language of the dialog windows - the default is either the system language or English if there is no translation of the system language available. Now you can set the language to any of the available translations using the short language codes, which are en, de, fr, nl, es, pt, ja. For example, --language de or --language=de will set the language to German regardless of the system language setting.
  • Bumped mist-cli version to 2.1 which fixes a bug downloading macOS Sequoia beta installers.
  • Bumped swiftDialog version to 2.5.0 except for systems running macOS 11 which still get 2.2.1. Note that the installer package includes both version 2.5.1 and 2.2.1, and the appropriate one will be installed.
  • Added the catalog https://swscan.apple.com/content/catalogs/others/index-15seed-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog, which can be used with --beta and --catalog 15 to obtain macOS Sequoia beta installers. Note that this will be replaced with the production macOS 15 catalog once it is published.

Bugfixes in 35.0

  • Fixed the comparison check of installer pkgs with current system when using --pkg mode.
  • Changed lock symbol colour on the password dialog from grey to black as grey seems to have stopped working.
  • Fixed code comment error (#508, thanks @jarrodCoombes).
  • Fixed some function output labels.

19.04.2024

Updates in 34.0

  • Added Japanese localization (#496, thanks to @teddi for this contribution).
  • Enforced the required version of mist-cli to prevent reported issues of older versions downloading incompatible macOS installers (#500, thanks @cchsadmin).
  • Started using the GitHub API to obtain swiftDialog and mist-cli download URL (#494, thanks @bartreardon).

Bugfixes in 34.0

  • Fixed the comparison check of this script with latest available version.

14.03.2024

Bugfixes in 33.1

  • Changed swiftDialog download URL which has changed again.
  • Fixed logic for comparing OS versions with the --os and --sameos options, which is broken in 33.0.

01.03.2024

Updates in 33.0

  • Removed searches for cached DMG and sparseimages (addresses #480).
  • Added experimental --check-activity option. This checks for an active meeting when using --reinstall or --erase options, and quits silently if so (#483, thanks @amadotejada for the idea, and thanks to the folks of installomator for the improved function, and to @BigMacAdmin for pointing me in that direction).
  • Bumped swiftDialog version to 2.4.2 except for systems running macOS 11 which still get 2.2.1.
  • The installer package now includes both swiftDialog 2.4.2 and 2.2.1, and the postinstall script determines which version to install on the system based on the system OS.
    • NOTE: This also limits the package installation to macOS 11 and newer. If you wish to use erase-install on macOS 10.15 or older, it is recommended to use v27.3.
  • --fetch-full-installer no longer attempts to set a seed program using seedutil as this functionality has been removed since 13.4 and it's unlikely that betas for older major OSs will ever be listed again. Therefore, the --seedprogram option has been removed (it was already superfluous in the mist-cli workflows). To list/use beta versions in either normal (mist-cli) mode or with --fetch-full-installer, add the --beta option.
  • Switched to using the zsh function is-at-least for simpler version comparisons throughout the script (thanks to the folks of installomator for the inspiration).

Bugfixes in 33.0

  • Removed quotes from the value obtained from any inputted --parameter="value" option.
  • Added missing --credentials=XYZ option (previously only --credentials XYZ worked) (thanks @allanp81).
  • Fixed the --fetch-full-installer option from failing due to a bug in the code change made in v31.0 to remove seedutil options (addresses #479 and #488).
  • Fixed the simultaneous use of --sameos and --update options, so that an outdated installer of the same OS as the system will be replaced when using both these optipons together (addresses #485).
  • Removed the previous bugfix that was introduced in version 30.2 to workaround a bug in mist-cli at the time that would list RCs as regular builds.
  • Fix erroneous error in output (ERROR: Notifications are not allowed for this application) when checking existing Dialog version.

10.01.2024

Updates in 32.0

  • Included a compatibility check for cached installers, utilising data from the com_apple_MobileAsset_MacSoftwareUpdate.xml file within the Shared Support.dmg. This should prevent installers that were not obtained using erase-install from running if they are not compatible with the system.
  • Added the ability to change the default icon size in dialogs, and to supply an alternative icon for confirmation dialogs (#462, addressed in #463, thanks to @popaprozac).
  • Bumped swiftDialog version to 2.3.3 except for systems running macOS 11 which still get 2.2.1. Note that the installer package includes version 2.3.3. If running on Big Sur, this will be deleted and an internet connection is required to download version 2.2.1.
  • Fixed swiftDialog URL, which has moved (#469, thanks to @scottborcherdt).
  • Replaced some SF Symbol icons in dialogs for compatibility with macOS 11 (fixes #470, thanks to @BigMacAdmin).

Bugfixes in 32.0

  • Fixed swiftDialog URL, which has moved (#469, thanks to @scottborcherdt).
  • Replaced some SF Symbol icons in dialogs for compatibility with macOS 11 (fixes #470, thanks to @BigMacAdmin).

27.09.2023

Updates in 31.0

  • Bumped mist-cli version to 2.0.
  • Bumped swiftDialog version to 2.3.2 except for systems running macOS 11 which still get 2.2.1. Note that the installer package includes version 2.3.2. If running on Big Sur, this will be deleted and an internet connection is required to download version 2.2.1.
  • Added localisation for Brazilian Portuguese (#432, thanks to @hooleahn).
  • --os searches will search for the relevant version name rather than number, to avoid a bug in mist-cli that may result in download an inappropriate installer if the chosen major OS is not available. Note that this bug is fixed in mist-cli 2.0, but I'll leave the workaround in place for the time being.
  • Now uses icons in the GitHub repo instead of using the InstallAssistant icon which occasionally doesn't render.
  • Moved up the log rotation so that we get all output of the current run, and made it less verbose.
  • Added the macOS Sonoma catalog.
  • Invalid package is now removed when using --replace-invalid or --update regardless of whether the --pkg option is selected or not.

Bugfixes in 31.0

  • Stopped trying to use seedutil on 13.4 or newer when using the --ffi option as it doesn't work any more.

24.08.2023

Bugfixes in 30.2

  • Fixed the erroneous listing of 13.6 RC in the regular lists. This is caused due to the mist-cli default catalogs including the seed catalogs. Now the production catalog is specified unless using the --beta option.

28.07.2023

  • Removed ANSI formatting from mist-cli output when listing installers.

Bugfixes in 30.1

  • Worked around a bug in mist-cli where it isn't setting the permissions of the Install application properly.
  • Now outputs stderr from swiftDialog to dev/null to avoid occasional Xfont error warnings in logs

18.07.2023

  • Converted to zsh (but the filename remains erase-install.sh).
  • Bumped the compatible version of mist-cli to v1.14.
  • Bumped the compatible version of swiftDialog to 2.2.1.4591.
  • Can now run erase-install.sh --list safely as the current user (without sudo); logs and files are written to a temporary location.
  • A notification is shown if running an older version of erase-install than the latest available (on macOS 13 or newer).
  • Now allows mist to use a caching server (addresses #406). Add the following option:
    • --caching-server https://YOUR_URL_HERE
  • It is now possible to supply credentials in base64 format to avoid the prompt for credentials on Apple Silicon computers.
    • NOTE THIS IS VERY INSECURE! ONLY USE IN A SAFE ENVIRONMENT!!!
    • Use the supplied script set-credentials.sh to generate the base64-encoded credentials.
    • Alternatively use the following shell command: printf "%s:%s" "<USERNAME>" "<PASSWORD>" | iconv -t ISO-8859-1 | base64 -i -
    • Add the following option: --credentials ENCODEDCREDENTIALS
    • Also add this option: --very-insecure-mode (this is required in addition to the --credentials option!).
  • If running the script on macOS 11, it now checks to see if the swiftDialog version is too new (addresses #392).
  • erase-install-launcher.sh is also converted to zsh.
  • erase-install-launcher.sh should now respect parameters that have spaces in them, such as commands called by the --postinstall-command option.
  • Pre- and post-install commands are now run in --test-run mode.
  • Now exits out when some incompatible arguments are provided at the same time.

Bugfixes in 30.0

  • Fixed version comparisons where there is a point release (fixes #410).
  • --update no longer ignores --sameos (fixes #407).

[29.2]

07.06.2023

  • Bumped mist-cli to v1.12, which includes a less verbose output for the download logs (one register per percentage download instead of one register per second).

Bugfixes in 29.2

  • Fixed downloads from mist only selecting compatible builds.

27.02.2023

  • --os can now be used along with --fetch-full-installer.
  • Removed audible sound when 1 hour timeout is reached.
  • Log output from mist is now somewhat reduced due to the use of the no-ansi mode.
  • Added --quiet option to prevent output from mist during download. Note that with this mode enabled, there is no download progress bar, since the output is required to read the download progress.
  • Log files are now rotated up to 9 times (#369, thanks to @aschwanb).

Bugfixes in 29.1

  • No longer lists deferred updates when using along --list with --fetch-full-installer (addresses #347).
  • Fixed issue with swiftDialog windows not showing up. This was due to a change in behaviour in swiftDialog version 2.1 enforcing running the app as the local user rather than root, which meant that the log file could not be overwritten. The log file is now deleted after use and each run creates a random logfile path (addresses #352, #366 and #368).
  • Reintroduced --skip-validation functionality.
  • Fixed issue with using --version along with --fetch-full-installer.
  • Fixed a problem where mist did not correctly output (addresses #357).

10.02.2023

  • Added a new --check-fmm option to prompt the user to disable Find My Mac if it is enabled (in --erase mode only). The default wait limit is 5 minutes before failing. This can be altered using a new --fmm-wait-limit option.

Bugfixes in 29.0

  • Fixed Minimum Drive Space dialog not showing (fixes #353).
  • Fixed incorrect full screen "reboot delay" screen (fixes #348). If --fs mode is used, the fullscreen preparation window now remains until the end of the reboot delay period.
  • Fixed some incorrect/inconsistent window and icon sizes.
  • Fixed some missing window titles.
  • Fixed missing icon on macOS<13.

28.01.2023

  • Added a new --cache-downloads option. In 28.0, mist cached downloads into /private/tmp/com.ninxsoft.mist. This is now optional.
  • Added a new experimental --set-securebootlevel option (in --erase mode only) uses the command bputil -f -u $current_user -p $account_password to ensure that the OS is reset to a high secure boot level after reinstallation (thanks to @mvught).
  • Added a new experimental --clear-firmware option (in --erase mode only) uses the command nvram -c to ensure that the OS is reset to a high secure boot level after reinstallation (thanks to @mvught).
  • erase-install now reports a non-zero exit code (143 to be exact) when it is being abnormally terminated (e.g. by pressing CTRL+C or getting terminated by SIGTERM). Previously it would return the exit code of the last command being executed at time of termination, which could be non-zero or zero depending on the specific circumstances, which then could have been reported as successful execution in a Jamf policy. This change will make it easier to discover such errors. The exit code of the last executed command will be logged in addition to returning 143 to facilitate debugging (#318, thanks @cvgs).

Bugfixes in 28.1

  • mist result is now correctly interpreted when checking for a newer version.
  • The --update option now triggers an invalid installer to be overwritten.
  • Progress is now once again shown during the preparation phase, and the progress bar properly shows incremental progress.

24.01.2023

  • Calls to installinstallmacos.py have been replaced with calls to mist. Minimum OS requirement for this is macOS 10.15.
  • Dialogues are now all presented using swiftDialog. Minimum OS requirement for this is macOS 11.
  • The minimum compatible OS for swiftDialog is macOS Big Sur 11. If you need to upgrade a Mac on an older version of macOS, use Version 27.x of erase-install.
  • Downloads are now only available as a pkg or an app. Downlaoding of a sparseimage has been discontinued, though the script will continue to search for them to allow for upgrade from earlier versions of erase-install without having to re-download the installer.
  • The log has moved to /Library/Management/erase-install/log/erase-install.log
  • New --silent mode. The script can now be run without any dialogues. On Apple Silicon, this requires the use of the keychain method to provide credentials. Minimum OS requirement for this is macOS 10.15.
  • Add Spanish dialogs.
  • For testing purposes, a username and password may be placed in a custom keychain. Username is optional as the current user can be used. To create the keychain and add the keys, run the following commands:
    • security create-keychain -P NAME_OF_KEYCHAIN - this will prompt you to create a password for the keychain. The keychain will be stored in ~/Library/Keychains. NAME_OF_KEYCHAIN must match the value you give to the --kc key. The password you create must match the value you give to the --kc-pass key.
    • security add-generic-password -s NAME_OF_SERVICE -a NAME_OF_USER -w PASSWORD NAME_OF_KEYCHAIN - NAME_OF_SERVICE must match the value you provide to the --kc-service key. NAME_OF_USER and PASSWORD must be the valid credentials of an account on the computer with Volume Ownership.

24.01.2023

  • (change to installinstallmacos.py): version comparisons are now done with the python module packaging.version.LegacyVersion, as parse_version proved unreliable.

14.12.2022

  • Better handling of replacing broken sparseimage files. If --overwrite, --update, or --replace-invalid are used and the version cannot be obtained from the sparseimage, the installer should be downloaded again. This also fixes --overwrite where an existing sparseimage is present.
  • Add --no-timeout option which extends the timeout period to 24h.

24.10.2022

  • Add catalog for macOS Ventura to installinstallmacos.py, update checksum in erase-install.sh.

14.10.2022

  • Allows for logs to be reported back to Jamf Pro by changing the method startosinstall is launched. This requires rebootdelay to be set, which allows uploading the script result to Jamf Pro before startosinstall force-quits our script and reboots the machine (thanks to @cvgs).
  • Adds launcher script erase-install-launcher.sh which can be used to start the pkg-delivered version of erase-install from the Scripts section of Jamf Pro (it also supports more than 8 arguments for erase-install because you can add multiple arguments in one Jamf Parameter field) (thanks to @cvgs).
  • Adds some fallbacks for the --fetch-full-installer option.
  • If no build ID is found in the existing installer, we set it as invalid instead of exiting the script (addresses #271, thanks to @sphen13).
  • Fix the fallback free disk space calculation (df was returning disk size in kb and not gb) (#274 - thanks to @sphen13).
  • --update option now uses new logic in installinstallmacos.py to restrict searches to a certain OS or version (addresses #287).
  • Improved function descriptions in the script.
  • Changed the Makefile to download the correct version of installinstallmacos.py during the make process.
  • Improved checksum checks for installinstallmacos.py - if an incorrect checksum is found, the correct version is downloaded rather than the script failing (unless --no-curl option has been added).
  • Add titles to username and password dialog boxes (#289, thanks to @cvgs)
  • Now correctly deletes a sparseimage from the cache when --move is used and the sparseimage is downloaded (#297, thanks to @andyincali)
  • Now correctly fails if an invalid installer is found and --replace-invalid, --update, --overwrite or --skip-validation are not set (addresses #298).

23.07.2022

  • Allows rebootdelay for 10.15 (thanks to @cvgs).
  • New --newvolumename key which will set the volume name after an eraseinstall workflow (thanks to @bmacphail).
  • Now correctly validates whether a selected build value matches the cached installer.

27.06.22

  • Universal python build packages.
  • Use pkg_resources instead of distutils where available (allows for removal if distutils in python 3.12 - addresses grahampugh/macadmin-scripts/issues/47).
  • Improves the --fetch-full-installer option by looking for the latest version if not specified, and checking that a pre-chosen version is in the list. --list in conjunction with --ffi also now uses --list-full-installers instead of reverting to installinstallmacos.py.
  • Allows the usage of spaces in --workdir and --path (thanks to @cvgs).
  • Added --max-password-attempts=NN option, which can also be set to infinite to prevent canceling the password dialog (addresses #216, thanks to @cvgs).
  • Changes dialogs so that the Cancel button is on the left, and default button is on the right (thanks to @cvgs).
  • Script now uses sysctl to check for Apple Silicon (addresses #225, thanks to @cvgs).
  • Some minor changes to the German translation (thanks to @cvgs).
  • Adds an additional check for --min-drive-space right before start of the installation (should address #242, thanks to @cvgs).
  • Adds -nobrowse to all instances of hdiutil to prevent mounted images appearing on the desktop (thanks to @cvgs).

No date

  • Adds --catalog to allow an easier way to select which software update catalog to use, rather than the defaults set in installinstallmacos.py. Example: --catalog 10.15 will use the catalog for Darwin version 19, --catalog 11 will use Darwin version 20. This is to address omissions in the catalogs for older OSes (somewhat addresses #169, #160).
  • Allow for more lenient checks for Volume Ownership against the entered username (#177, thanks to @cvgs)
  • Adds --rebootdelay option (Big Sur or later) (#193).
  • DEPNotify counts down the rebootdelay time.
  • Adds --fs option which makes all the DEPNotify windows full screen (download, confirm, preparation).
  • User can dismiss the DEPNotify download and preparation windows if --rebootdelay is set to at least 10 seconds.
  • Multiple --preinstall-command arguments can now be supplied. These run immediately before startosinstall is run.
  • Multiple --postinstall-command arguments can now be supplied. These run after startosinstall has finished.
  • Checksums of installinstallmacos.py are now pinned to a tag of the macadmins-scripts repo so that updates to the script don't break a particular version of erase-install.sh from working.
  • Add a message about process Terminations, which some people were mistakenly believing to be errors.
  • Fixed the actual killing of jamfHelper and caffeinate.
  • osascript dialog windows now run as the user (addresses #198, thanks to @anewhouse).
  • Fixed an issue concerning the catalog for macOS High Sierra 10.13 which has an item without a version string listed, which was causing installinstallmacos.py to error out (addresses #169).

23.11.2021

  • Determines free space better by checking free and purgeable space (partial fix for #152; thanks to Pico in MacAdmins Slack).
  • Uses exit traps to clean up after all abnormal exits (fixes #140, #141; thanks to @ryangball).
  • Adds -nobrowse to hdiutil to prevent mounted images appearing on the desktop (thanks to @ryangball).
  • Allows 5 password attempts (fixes #159).
  • Adds dialog to show how much time is left in the power check (#144; thanks to @dan-snelson).
  • Some dialog changes, to replace the word "reinstall", which some people have found confusing, with "install" (addresses #149).
  • Changed log location to the $workdir so that it persists after an upgrade, and also so it is wiped if using the --cleanup-after-use option (fixes #161).
  • Remove check for membership of staff group for Apple Silicon Macs, since Volume Ownership is already checked it's not necessary, and was preventing non-admin AD users from proceeding (fixes #166).
  • Re-order some initial statements to ensure that the chosen $workdir has been created before DEPNotify is downloaded and the log file is determined (fixes #165).
  • Some minot changes to the Dutch translation (addresses #164, thanks @Alitekawi).

27.10.2021

  • Script now exits if an incorrect password is entered (partially fixes #136).
  • Makefile uses curl to obtain DEPNotify.app without adding a quarantine bit (fixes #138).
  • Fixes for certain workflows involving the --fetch-full-installer (#140) and --pkg (#141) options.
  • Fixed --user option, which was not reading in the given user (#142, thanks @chymb).

25.10.2021

  • Removed the "0." from the version, as it's arbitrary and meaningless.
  • --seed is now analogous to --seedprogram.
  • New --cleanup-after-use option to delete the entire working directory after use (#131).
  • --move will now move the installer even when using --erase or --reinstall.
  • --update option now honours --beta and --seed options.
  • The --depnotify option will download DEPNotify.app if it's not already installed.
  • Fixed a problem with the osascript dialog when downloading an installer.
  • Makefile now includes depnotify and nopython methods. depnotify bundles DEPNotify.app into the package, and expects DEPNotify.zip in the root of the cloned repo - must be copied there. nopython omits the relocatable-python framework (and also omits DEPNotify.app).
  • Updated SHA key of installinstallmacos.py to reflect merged in upstream changes (updated software catalog URL for macOS 12).

21.10.2021

  • The package now includes a relocatable python installation (version 3.9.5) for use with installinstallmacos.py. This replaces the reliance on the macOS python2.7 distribution.
  • For standalone script runs, erase-install.sh will now check for an existing relocatable python or MacAdmins Python installation. If neither exists, and --no-curl is not set, the script will download and install the minimum MacAdmins Python signed package, for use with installinstallmacos.py. If --no-curl is set, the script will fall back to python 2.
  • If installinstallmacos.py is downloaded using curl, it is now checked against a defined SHA256 checksum. Note: this is calculated using the command: shasum -a 256 installinstallmacos.py | cut -d' ' -f1.
  • Add download progress information to the DEPNotify bar (#127, thanks @andredb90, addresses #116).
  • Rationalised version comparisons in the code from 3 to 1.

01.10.2021

  • Add preparation progress information to the DEPNotify bar (#122, thanks @andredb90).
  • SIP check only checks for partial SIP enablement (#110, thanks @anverhousseini).
  • New --preinstall-command option to run a command prior to the beginning of the startosinstall run (thanks Fredrik Virding for the idea).
  • Fix build version comparisons (this affected macOS 11.6) (#124, thanks @boberito)
  • Allow use of --confirm option for reinstallation (#123)
  • Improve version comparisons in check_newer_available function (should improve --update reliability)
  • Fix erase or reinstall from a InstallAssistant package if it has not already been extracted with the --move option (#111).

20.07.2021

  • Add French translation (thanks @Darkomen78).
  • Fix version for which --allowremoval is set when doing a reinstall (thanks @anverhousseini).
  • Kill DEPNotify in places where jamfHelper is killed (#106, thanks @julienvs).
  • Added '$script_name' variable - if you want to change the script name, the echo statements will reflect this value rather than 'erase-install'.
  • Added --clear-cache-only option, which works in conjunction with --overwrite or --update to perform the removal of cached installers but then quit rather than carry on with any further workflow (#105).
  • Added a more verbose message that --test-run has been implemented (#93).

12.05.2021

  • The Cancel button is now default in the Confirm dialog when not using jamfHelper or DEPNotify. Note that DEPNotify only offers one button so we cannot provide a straightforward Cancel button.
  • The contents of the README.md have been replaced with a wiki.

07.05.2021

  • --depnotify option. Uses DEPNotify instead of jamfHelper, if it is installed.
  • --no-jamfhelper option. Ignores the jamfHelper installation. Useful for testing the osascript dialogs.

26.04.2021

  • Another fix to the check that --fetch-full-installer can be used.
  • Edited Dutch localizations (thanks to Thijs Vught)

17.04.2021

  • Fix for check that --fetch-full-installer can be used.
  • Dutch localizations (thanks to Thijs Vught)

07.04.2021

  • Output from erase-install.sh is now written to /var/log/erase-install.sh in addition to stdout.
  • Checks that the supplied user is an admin when performing --eraseinstall on M1, which appears to be a requirement (not for startosinstall without --eraseinstall). If it is not, it promotes the user to admin.
  • Checks that the supplied user is a Volume Owner on M1 (rather than merely having a Secure Token)
  • Runs diskutil apfs updatePreboot / prior to startosinstall to (experimentally) address a problem seen by some user accounts that were promoted using Privileges.app.
  • Adds localization for osascript dialogs

10.03.2021

  • Add --check-power option. Set this to check for AC power. Also --power-wait-limit sets a time limit to wait for power (default is 60 seconds).
  • Merge in upstream changes to installinstallmacos.py. This improves download resumption.

03.03.2021

  • Default minimum drive space now set to 45GB, but can now be overridden with the --min-drive-space NN option.
  • Fixed the --confirm option.
  • Improved the --help output with more recent keys.

20.01.2021

  • For Catalina and earlier, do OS validation only as far as the minor release. This allows for the mismatch between advertised build and DTSDKBuild (fixes Issue #53).
  • Fix for when VolumeName is not Macintosh HD or any two-word name (fixes Issue #58).
  • Added exit 1 code if script exists due to not successfully downloading an installer (fixes Issue #52).
  • Increase munimum disk space required to 30GB, which aligns better Apple's recommendation for macOS Big Sur (see HT211238).

06.01.2021

  • Testing moving caffeinate to the end of the script but using a second --pidtosignal argument in startosinstall to kill caffeinate. It is not documented that --pidtosignal can be called multiple times, so this is experimental, but seems necessary on Big Sur as the "preparing upgrade" step is much longer than with previous OSs.

05.01.2021

  • Added --test-run option which runs everything except the startosinstall command. Useful for testing new workflows.
  • Moved the prompt for user details for Apple Silicon Macs up the script so users don't get prompted later.
  • No longer checks to see if the user is an administrator as this is apparently not a criterion - only Secure Token matters.
  • Bug fix: remove alignment flags in the jamfHelper commands to solve a product issue with jamfHelper on Apple Silicon Macs.

15.12.2020

  • New --current-user option to use the current logged in user for startosinstall authorisation on M1/DTK Macs.
  • New --user option to specify a user for startosinstall authorisation on M1/DTK Macs.
  • Now checks whether the specified user is an administrator.
  • Now checks whether the specified user has a Secure Token.
  • Now checks if the given password is correct.
  • New --no-fs option for replacing the full-screen display with a utility window (for testing purposes).
  • Now quits caffeinate before beginning startosinstall.
  • Now correctly identifies Apple Silicon Mac Device IDs for compatibility checks.
  • Now gets the installer version from /Volumes/Shared Support/com_apple_MobileAsset_MacSoftwareUpdate/com_apple_MobileAsset_MacSoftwareUpdate.xml as this is a more reliable build number than the one in Info.plist.
  • Now makes more reliable version comparisons using BuildVersion by splitting the check into more sections (AABCCDDE instead of AABCCCCD).
  • Script version number is now displayed when running the script. I just have to remember to update it...
  • added --list-full-installers option which runs softwareupdate --list-full-installers according to the seedprogram selected.
  • test-erase-install.sh script is now included in the installer package.

10.12.2020

  • Bug fix: --auto was being incorrectly assigned when using --os, --build etc.

10.12.2020

  • Added the --pkg option allowing the download of an InstallAssistant package, utilising an update alresdy made to the installinstallmacos.py fork. For Big Sur or greater only. This will probably need some more error checking.
  • Added the --keep-pkg option which prevents the deletion of the package if the --move option is used to extract the package to /Applications. By default, the package will be deleted on successful extraction.
  • Added the --force-curl and --no-curl options, allowing the control of whether to download installinstallmacos.py. This is in anticipation of a Makefile and package release of erase-install.sh.
  • Added Makefile. This allows you to build a self-contained package containing erase-install.sh and installinstallmacos.py so that curl is not used during the run of erase-install.sh to update installinstallmacos.py. This requires munkipkg and expects to find the grahampugh fork of installinstallmacos.py in ../macadmins-scripts. Make sure you don't bundle in Greg Neagle's version of installinstallmacos.py inadvertently (or this script will fail). A package will be provided on GitHub for this and subsequent versions. Note that erase-install.sh is installed into /Library/Management/erase-install. I deliberately have not put erase-install.sh into the PATH.
  • Added the --user and --stdinpass arguments when running on a Silicon Mac. Silicon Macs require an admin user and password to run startosinstall.
  • Now treats 10.x or 11+ as major versions for OS comparisons.
  • Fix in installinstallmacos.py for os comparisons failing where no Version is provided from the catalog.

20.11.2020

  • Fixed comparison of build numbers when checking the installed build is newer than the build in the downloaded installer.

07.10.2020

  • Version comparisons are now done based on BuildVersion instead of ProductVersion so as not to rely on Major/Minor/Point comparisons (thanks to Greg Neagle's MacSysAdmin 2020 presentation about Big Sur for tips on this).
  • code clean up using ShellCheck.

31.07.2020

  • Added --pythonpath option so that you can select a different python with which to run installinstallmacos.py. Default is $(which python).
  • installinstallmacos.py now has a --warnings option about whether to show the Notes/Warnings in the list output or not. This has been hard-coded into erase-install.sh to maintain current behaviour.

22.07.2020

  • Fixed another small piece of failed logic around the check for whether there is already an installer which was finding other apps with macOS in the name. Now, only apps with Install macOS*.app will be found.

14.07.2020

  • Fixed some failed logic around the check for whether there is already an installer in the /Applications folder which was erroneously also looking in other locations.

23.06.2020

  • Parameters can now be supplied as --argument value as an alternative to --argument=value to provide more consistency with the included tools (installinstallmacos.py and softwareupdate).

09.06.2020

  • Adds --allowremoval option to the startosinstall command by default. This is an undocumented flag which is required under certain circumstances where there are backup files on the system disk.

06.05.2020

  • Adds --replace_invalid option for the option to overwrite a cached installer if it is not valid for use with --erase or --reinstall.
  • Adds --update option for the option to overwrite a cached installer if a newer installer is available.

04.05.2020

  • Adds --preservecontainer option for workflows that need to retain a container when performing eraseinstall.
  • Adds additional flags to caffeinate to attempt to more robustly prevent device sleeping.
  • Fix for missing heading in the full screen display of the --reinstall option.
  • Added a test script tests/test-erase-install.sh for testing out functionality.

14.04.2020

  • Use --forcequitapps when using the macOS Catalina installer, rather than just when running on a macOS Catalina client (issue #25).

13.02.2020

  • Removed downloaded OS validity check for modes where the installer is not required for reinstall or eraseinstall, to prevent unnecessary exit failures.
  • Fixed a problem preveting --move from working when overwriting a valid installer.
  • Other small bugfixes.

03.02.2020

  • Restricted the add forcequitapps install_args option to macOS 10.15 or greater, as this is not functional with older versions (#35). Thanks to '@ahousseini' for the contribution.

22.01.2020

  • Added the --sameos option, so you can have a single command which will always try to reinstall whatever macOS (major) version is currently installed on the host.

11.12.2019

  • Removed check that a user is logged in before proceeding with startosinstall - apparently not necessary after all, and caused at least one user's workflow to break (#33).

27.11.2019

  • Add a check that there is enough disk space before proceeding
  • Added --forcequitapps argument for 10.15 and above
  • Check that a user is logged in before proceeding with startosinstall
  • Improved find commands when checking that there is a mounted installer
  • Improved German descriptions for reinstallation
  • Improved checks for successful downloads from the --fetch_full_installer option

Thanks to '@ahousseini' for various contributions to this release

15.11.2019

  • Move a comment that states that --fetch-full-installer is available to the correct place (#31)

07.10.2019

  • Added support for softwareupdate --fetch-full-installer and seedutil for clients running macOS 10.15 or greater.

27.09.2019

  • Fixed caffeinate (forgot to make it a background process)
  • Added 'Confirm' option for erasing. Thanks to '@ryan-alectrona' for the contribution.

26.09.2019

  • Added caffeinate to the script to prevent the computer going to sleep during long download phases etc.

12.07.2019

  • Added --beta option.
  • Changed behaviour of --os, --version and auto (i.e. no flag) options to get the latest rather than earliest valid build.
  • Removed install-macos.sh script. Use erase-install.sh with --reinstall option instead.

19.06.2019

  • Added --reinstall option, which obsoletes the install-macos.sh script.

16.04.2019

  • Bug fix for empty extra packages folder.
    Thanks to '@Avartharian' for contributions
  • Added --catalogurl and --seedprogram options

02.04.2019

  • Added localisation of Jamf Helper messages.
    Thanks to '@ahousseini' for contributions
  • Added --os, --path, --extras, --list options.
    Thanks to '@mark lamont' for contributions

13.12.2018

  • Bug fix for --build option, and for exiting gracefully when nothing is downloaded.

21.09.2018

  • Added ability to specify a macOS version.
  • Fixed the --overwrite flag.
  • Added ability to specify a build in the parameters, and we now clear out the cached content.

03.09.2018

  • Additional and amended options for selecting non-standard builds.

09.07.2018

  • Automatically selects a non-beta installer.

0.1.0

29.03.2018

  • Initial version. Expects a manual choice of installer from installinstallmacos.py.