There's a few ways to do this, and I've used some different methods in the past. Right now I've got a three step process:
fneidhardt curious what is the benefit of such a congested script? Still seems like we need to download the base installers separately so why would we use this huge script over just the one line: "Install macOS Catalina.app/Contents/Resources/startosinstall' --agreetolicense --forcequitapps --nointeraction &"
"Install macOS Catalina.app/Contents/Resources/startosinstall' --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD' --nointeraction &"
Very curious to hear your thoughts.
@oartola In our environment other people are often running the upgrade. Since that one liner can fail if there is not enough space, the OS download didn't complete, or the current operating system cannot install the downloaded version, etc.. A more detailed script can save the user time by letting them know there is an issue, how to resolve it, or that they need to contact their IT admin. Before implementing more pre-install checks users would be left with the "How long do I have to wait until I know there is an issue" dilemma which could end up being a massive waste of time.
I have been just testing pushing the Catalina installer via the Mac App Store, then calling the
/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall --nointeraction --agreetolicense
So far my only issue is that it asks the user to quit self service before restarting. (Just read that if you make them have to read the description before clicking install this will cause it not to quit).
Otherwise once I know the app store catalina is on the machine, the self service command seems to work fine.
Princeton Public Schools
@gshackney Hey I don't know if you are still struggling with this or not but I created a pkg to put the "Install macOS Catalina.app" in the Applications folder, then I ran this script.
#!/bin/bash # macOS Installer Script # scope to computers where Application Title is Install macOS Catalina.app macOSinstaller="/Applications/Install macOS Catalina.app" jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" jh_title="Downloading macOS" jh_desc="macOS Catalina is now installing on your device. You will not be warned when the computer restarts!" jh_icon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertCautionIcon.icns" jh_iconsize=100 # open jamf helper tool if [[ -f "$jamfHelper" ]]; then "$jamfHelper" -windowType hud -windowPosition ul -title "$jh_title" -alignHeading center -alignDescription left -description "$jh_desc" -lockHUD -icon "$jh_icon" -iconSize $jh_iconsize & jamfPID=$(echo $!) fi # run the installer "$macOSinstaller/Contents/Resources/startosinstall" --agreetolicense --forcequitapps # kill the helper tool and Self Service [[ $jamfPID ]] && kill $jamfPID /usr/bin/killall "Self Service"
@cdouglas Hey, thanks for that, I did actually start using the script MacOSUpgrade which can be customized to either upgrade and install or wipe and install.
Princeton Public Schools