Posted on 02-16-2023 09:41 AM
I have been using the erase-install.pkg successfully for some time, placing it within Self-Sevice and allowing users to install at their convenience. However, with one user, I have run into an issue where is appears that the step of grabbing the latest installer is failing.
Background:
This particular user attempted to install Ventura on their own through Software Update within System Preferences. It looks like the installer was downloaded, however they were blocked when they reached the prompt requiring an administrator to allow the installation.
I directed them to Self Service where the erase-install.pkg is loaded (28.0). The attempt to install, the progress wheel begins to spin for a bit, stops, and nothing is installed.
Log
Taking a look at the applications installed on this user's machine, it looks like they have an older version of the installer present (Install macOS Ventura.app 18.0.02) likely from when the first attempted their own update. The script sees a newer version, but something prevents it from moving forward.
Here is the History log from the failed Self-Service attempt:
[STEP 1 of 6]
Executing Policy Update to macOS Ventura
[STEP 2 of 6]
Downloading erase-install-28.0.pkg...
Downloading https://use1-jcds.services.jamfcloud.com//download/db185d068abd4034b6f8dc85eb6ea9d6/erase-install-28.0.pkg?token=500f00698a0d43ccbfbb8775b9a190b75669h3cjp57zarstv8cj2nbvs7jgmmb6...
Verifying package integrity...
Installing erase-install-28.0...
Successfully installed erase-install-28.0.
[STEP 3 of 6]
[STEP 4 of 6]
Inventory will be updated when all queued actions in Self Service are complete.
[STEP 5 of 6]
Running command /Library/Management/erase-install/erase-install.sh --update --reinstall --confirm --depnotify --check-power --fs --rebootdelay 120...
Result of command:
2023-02-15 15:37:22 [erase-install] v28.0 script execution started: Wed Feb 15 15:37:22 PST
2023 2023-02-15 15:37:22 [erase-install] System version: 12.5.1 (Build: 21G83)
2023-02-15 15:37:22 [check_for_dialog_app] dialog is installed (/Library/Application Support/Dialog/Dialog.app)
2023-02-15 15:37:22 [erase-install] Caffeinating this script (pid=60390)
2023-02-15 15:37:22 [check_free_space] OK - 225 GB free/purgeable disk space detected
2023-02-15 15:37:22 [erase-install] Looking for existing installer app or pkg
2023-02-15 15:37:22 [find_existing_installer] Installer found at /Applications/Install macOS Ventura.app.
2023-02-15 15:37:22 [check_installer_is_valid] Checking validity of /Applications/Install macOS Ventura.app.
2023-02-15 15:37:23 [check_installer_is_valid] Mounting /Applications/Install macOS Ventura.app/Contents/SharedSupport/SharedSupport.dmg
2023-02-15 15:37:24 [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml Volume Shared Support on disk2s2 force-unmounted
2023-02-15 15:37:25 [compare_build_versions] Comparing (1) 21G83 with (2) 22A400
2023-02-15 15:37:25 [check_installer_is_valid] Installer: 22A400 >= System: 21G83 : valid build.
2023-02-15 15:37:25 [erase-install] Checking for newer installer
2023-02-15 15:37:25 [check_for_mist] mist is installed (/usr/local/bin/mist)
[0;34m┌──────────────────┐
│ INPUT VALIDATION │ └──────────────────┘[0;0m
[0;32m ├─ [0;0mSearch only for latest (first) result will be 'true'...
[0;32m ├─ [0;0mInclude betas in search results will be 'false'...
[0;32m ├─ [0;0mOnly include compatible installers will be 'true'...
[0;32m ├─ [0;0mOutput type will be 'ascii'...
[0;34m┌────────┐
│ SEARCH │ └────────┘[0;0m
[0;32m ├─ [0;0mSearching for macOS Installer versions...
[0;32m └─ [0;0mFound 1 macOS Installer(s) available for download
Identifier │ Name │ Version │ Build │ Size │ Date │ Compatible
───────────┼───────────────┼─────────┼───────┼──────────┼────────────┼───────────
032-48342 │ macOS Ventura │ 13.2.1 │ 22D68 │ 12.56 GB │ 2023-02-13 │ True
2023-02-15 15:37:29 [check_newer_available] ERROR running mist, cannot continue
2023-02-15 15:37:29 [erase-install] attempting to terminate the
'caffeinate' process - Termination message indicates success
/Library/Management/erase-install/erase-install.sh: line 1172: 60415
Terminated: 15 /usr/bin/caffeinate -dimsu -w $$
2023-02-15 15:37:29 [finish] quitting dialog
2023-02-15 15:37:29 [finish] Script exit code: 1
[STEP 6 of 6]
Any ideas as to what I can do to resolve this?
Thanks!
Solved! Go to Solution.
02-16-2023 12:07 PM - edited 02-16-2023 06:12 PM
@gk To avoid the code path in erase-install with the failure do not use the --update option to check for a newer build.
Without that option you will need to delete any existing macOS installer that's not the version you want prior to running erase-install otherwise it will use the old installer. You can find the version numbers for the Install macOS apps on @ClassicII 's web site, specifically on the https://mrmacintosh.com/macos-12-monterey-full-installer-database-download-directly-from-apple/ and https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/ pages, then create a Smart Group where the criteria matches the app name and a version number not the same as the version you want to install, then use that Smart Group as the Scope for a Policy that will delete the old macOS install apps.
You might also want to update the version of erase-install you're using to 28.1 although to be clear erase-install calling mist-cli to check for newer installers has problems in 28.1 as well.
EDIT: erase-install 29.0 is out. Looking at the changes from 28.1 I do not believe it has any changes that would prevent the failure being see with the --update code path in 28.0/28.1, but ¯\_(ツ)_/¯ it may be worth a try.
Posted on 02-16-2023 10:01 AM
I'm having a similar issue but haven't had time to do much digging. It is related to mist but the quick fix is to delete the old installer first. This isn't a great solution if you are checking frequently but if your goal is to just make sure that your Macs have 13.2.1 then this will resolve it
02-16-2023 12:07 PM - edited 02-16-2023 06:12 PM
@gk To avoid the code path in erase-install with the failure do not use the --update option to check for a newer build.
Without that option you will need to delete any existing macOS installer that's not the version you want prior to running erase-install otherwise it will use the old installer. You can find the version numbers for the Install macOS apps on @ClassicII 's web site, specifically on the https://mrmacintosh.com/macos-12-monterey-full-installer-database-download-directly-from-apple/ and https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/ pages, then create a Smart Group where the criteria matches the app name and a version number not the same as the version you want to install, then use that Smart Group as the Scope for a Policy that will delete the old macOS install apps.
You might also want to update the version of erase-install you're using to 28.1 although to be clear erase-install calling mist-cli to check for newer installers has problems in 28.1 as well.
EDIT: erase-install 29.0 is out. Looking at the changes from 28.1 I do not believe it has any changes that would prevent the failure being see with the --update code path in 28.0/28.1, but ¯\_(ツ)_/¯ it may be worth a try.
Posted on 02-16-2023 12:17 PM
Thanks @sdagley .
Do you mean in this particular instance, or in general?
I am using it based on this:
--update
If the --update parameter is used, and an installer application is already cached on the system, the script will compare the version of the cached system with the installer that is available from Apple's catalogs. If a newer version is available, the cached installer is removed and the latest version is downloaded. Nothing is downloaded if the versions are the same or the cached system is newer (for example there is a cached beta installer).
02-16-2023 12:25 PM - edited 02-16-2023 12:28 PM
@gk In general. While erase-install 28.1 has changes related to mist and the --update option it's still not working in some cases. What triggers that isn't known yet, and while it's been reliable using --update on my test Macs the failure rate in the field for my users has been high so I've changed my workflows that use erase-install to not use the --update option, and run a pre-flight script that deletes any existing Install macOS app if it's not the version I want installed.
Posted on 02-23-2023 10:47 AM
Just an update to this issue:
I deleted the Ventura install application from the machine, update my erase-install package to 28.1, and attempted to run the update. Unfortunately, it failed again.
One thing to note is that I did forget to remove the --update parameter as sdagley suggested. unsure if that would have made a difference.
Details
[STEP 1 of 5]
Executing Policy Update to macOS Ventura
[STEP 2 of 5]
Downloading erase-install-28.1.pkg...
Downloading https://use1-jcds.services.jamfcloud.com//download/db185d068abd4034b6f8dc85eb6ea9d6/erase-install-28.1.pkg?token=347ead90e9744936a9cb9f3b5facef78ff01yx3i0483y7wsiqe3jzvklmbwlwk3...
Verifying package integrity...
Installing erase-install-28.1...
Successfully installed erase-install-28.1.
[STEP 3 of 5]
[STEP 4 of 5]
Running command /Library/Management/erase-install/erase-install.sh --update --reinstall --confirm --depnotify --check-power --fs --rebootdelay 120...
Result of command:
2023-02-23 10:25:14 [erase-install] v28.1 script execution started: Thu Feb 23 10:25:14 PST 2023
2023-02-23 10:25:14 [erase-install] System version: 12.5.1 (Build: 21G83)
2023-02-23 10:25:14 [check_for_dialog_app] dialog is installed (/Library/Application Support/Dialog/Dialog.app)
2023-02-23 10:25:14 [erase-install] Caffeinating this script (pid=18645)
2023-02-23 10:25:14 [check_free_space] OK - 224 GB free/purgeable disk space detected
2023-02-23 10:25:14 [erase-install] Looking for existing installer app or pkg
2023-02-23 10:25:14 [find_existing_installer] Installer sparse image found at /Library/Management/erase-install/Install_macOS_12.5.1-21G83.sparseimage.
2023-02-23 10:25:15 [check_installer_is_valid] Checking validity of /Volumes/Install_macOS_12.5.1-21G83/Applications/Install macOS Monterey.app.
2023-02-23 10:25:15 [check_installer_is_valid] Mounting /Volumes/Install_macOS_12.5.1-21G83/Applications/Install macOS Monterey.app/Contents/SharedSupport/SharedSupport.dmg
2023-02-23 10:25:16 [check_installer_is_valid] Using Build value from com_apple_MobileAsset_MacSoftwareUpdate.xml
Volume Shared Support on disk4s2 force-unmounted
2023-02-23 10:25:17 [compare_build_versions] Comparing (1) 21G83 with (2) 21G83
2023-02-23 10:25:17 [compare_build_versions] 21G83 = 21G83
2023-02-23 10:25:17 [check_installer_is_valid] Installer: 21G83 >= System: 21G83 : valid build.
2023-02-23 10:25:17 [erase-install] Checking for newer installer
2023-02-23 10:25:17 [check_for_mist] mist is installed (/usr/local/bin/mist)
[0;34m┌──────────────────┐
│ INPUT VALIDATION │
└──────────────────┘[0;0m
[0;32m ├─ [0;0mSearch only for latest (first) result will be 'true'...
[0;32m ├─ [0;0mInclude betas in search results will be 'false'...
[0;32m ├─ [0;0mOnly include compatible installers will be 'true'...
[0;32m ├─ [0;0mOutput type will be 'ascii'...
[0;34m┌────────┐
│ SEARCH │
└────────┘[0;0m
[0;32m ├─ [0;0mSearching for macOS Installer versions...
[0;32m └─ [0;0mFound 1 macOS Installer(s) available for download
Identifier │ Name │ Version │ Build │ Size │ Date │ Compatible
───────────┼───────────────┼─────────┼───────┼──────────┼────────────┼───────────
032-48342 │ macOS Ventura │ 13.2.1 │ 22D68 │ 12.56 GB │ 2023-02-20 │ True
2023-02-23 10:25:25 [check_newer_available] ERROR reading output from mist, cannot continue
2023-02-23 10:25:25 [erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success
2023-02-23 10:25:25 [finish] quitting dialog
2023-02-23 10:25:25 [finish] Script exit code: 1
Posted on 02-23-2023 11:10 AM
UPDATE 2:
I removed the --update parameter as suggested by @sdagley , and the erase-install package ran without issue, updating the machine.
Posted on 02-23-2023 11:48 AM
To close off this thread, @grahamrpugh determined the cause of the error, and checked a fix in to the main branch of erase-install on 2023-02-16 (see https://github.com/grahampugh/erase-install/commit/a53e55f86c3e26afe5a775ba339c889fae90c081) so the next release won't exhibit this problem.