Posted on 09-29-2021 03:02 PM
Hi all,
I've been running the macOSUpgrade.sh script successfully for a while now, but 11.6 is giving me some problems.
https://github.com/kc9wwh/macOSUpgrade/blob/master/macOSUpgrade.sh
We're in the process of updating some older machines (10.14 and 10.15) to 11.6. We run two separate polices, first to download the installer through Software Update, then another policy to run the macOSUpgrade.sh script. When I test the script on 11.6 installer, and this has happened to at least 3 machines now, the script will try to trigger downloading the installer and deleting the existing one that's already in /Applications/.
This is the log:
Script result: installerVersion 11.6
installerVersion_Full_Integer 110600 installerVersion_Major_Integer 1106 Killing caffeinate processes. No matching processes were found Killing startosinstall processes. No matching processes were found Killing osinstallersetupd processes. No matching processes were found Power Check: OK - AC Power Detected Disk Check: OK - 407 GB Free Space Detected Print: Entry, "Assets:0:OSVersion", Does Not Exist Installer check: Expected: 11.6 Actual: File Doesn't Exist, Will Create: /Volumes/Shared/com_apple_MobileAsset_MacSoftwareUpdate/com_apple_MobileAsset_MacSoftwareUpdate.xml Try to download installer.app. (1 / 3 ) Downloading macOS Installer... Checking for policies triggered by "recurring check-in" for user "loaner"... No policies were found for the "recurring check-in" trigger. Checking for patches... No patch policies were found. Installer check: Not found installer.app. Try to download installer.app. (2 / 3 ) Downloading macOS Installer... Checking for policies triggered by "recurring check-in" for user "loaner"... No policies were found for the "recurring check-in" trigger. Checking for patches... No patch policies were found. Installer check: Not found installer.app. Try to download installer.app. (3 / 3 ) Downloading macOS Installer... Checking for policies triggered by "recurring check-in" for user "loaner"... No policies were found for the "recurring check-in" trigger. Checking for patches... No patch policies were found. macOS Installer.app downloaded 3 Times. But installer check failed. 0
Apparently, the script can't see the installer for 11.6 so it's been deleting it. Are there any others running into this issue lately and have found a workaround?
Thanks for reading!
Posted on 09-29-2021 09:04 PM
Hmm, Didn't know about this script, I am going to have a look at the one you've listed when I am onsite tomorrow. Our main hurdle from 10.5 to 11 is storage, as a lot of our fleet are 128gb and don't have the approx 34gb to complete the install or the additional 11gb for the installer.
Of recent, what I observed with my basic command line process running the following: sudo softwareupdate -d --background -l -i -a
which only does the current OS flavour...
the issue I found was the softwareupdate command either needing user interaction to allow softwareupdate to run in terminal, or not at all due to no admin rights for the user, I created a pppc profile to allow the softwareupdate app, with out security prompts, but never got around to testing or confirming if that helped. the updates weren't a super priority at time, and through our past experiences of it causing issues, where all our users are off site, I shelved forcing updates for the time being, but I am looking forward to revisiting this tomorrow.
09-30-2021 07:10 AM - edited 09-30-2021 07:11 AM
Just confirming that you have the file path correctly set for where the installer is located in the parameters for the script. The variable of
currentInstallerVersion
within the script does not seem to point to a valid file path, which may be due to an invalid path to the installer set in the parameters
Posted on 09-30-2021 10:13 AM
We were using the same upgrade path; a policy for caching the macOS installer, a smart group to verify the checksum, a policy (Roskos' script) to install the cached macOS installer with the smart group as the scope. This worked fine until we introduced M1 Macs into the environment.
Jamf's solution was to use Remote Commands (Computers > Advanced Computer Search > Action > Send Remote Commands > Update OS Version...). This method involves removing any restrictions which block the update from showing in System Preferences > Software Update as it will only install items listed in this pane. It also cannot be scheduled, is inconsistent (runs commands, reboots, but no upgrade took place) and small things like an email draft or system preferences being open would stop the command, which wouldn't hit the machine until hours later in my experience.
Our solution came with Graham Pugh's erase-install pkg/script.
https://github.com/grahampugh/erase-install
We are using the pkg method which includes the installmacos.py script to pull the installer directly from Apple. This has turned two policies into one and should save time by not having to cache installers, use space on the dp, verify checksums, flush failures, etc. It also has the logic to prompt M1 Mac owners for their password as our users are Standard (non-Admin).
As with any method, there may be some outliers which do not accept this path. Typically a reboot and update policies will push it through the next go round.