nerofreaks.blogg.se

Macos catalina install file
Macos catalina install file












  1. Macos catalina install file download#
  2. Macos catalina install file mac#

Proceed with Erase and Install" '/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall' -eraseinstall -agreetolicense -forcequitapps -newvolumename 'Macintosh HD' else echo "Self Service is stopped.

Macos catalina install file download#

Proceed with Download and Erase and Install" counter=$((counter + 1)) until ] || ] do rm /Library/Preferences/ killall cfprefsd /usr/sbin/softwareupdate -fetch-full-installer counter=$((counter + 1)) done echo $counter echo "Installer was successfully downloaded or try counter reached 4." '/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall' -eraseinstall -agreetolicense -forcequitapps -newvolumename 'Macintosh HD' elif & then echo "Self Service is running and Installer already exists. Though you have to have the script as a single line: caffeinate -t 10800 & selfservice=$(pgrep -x "Self Service") if & then echo "Self Service is running but no Installer exists. I generally put this into the policy's execute command in Files and Processes. Will not proceed with Erase and Install." Īs well, to obfuscate a bit more I don't usually put the above in the Scripts section as I don't want this to be a selectable item. #as a safety feature to not blow away your company due to a bad scope or wrong trigger in Jamf the reinstall will not happen unless the self service app is running Įlse echo "Self Service is stopped. Then echo "Self Service is running and Installer already exists. #if the installer is already there and self servie app is running then just start installing Įlif & '/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall' -eraseinstall -agreetolicense -forcequitapps -newvolumename 'Macintosh HD' usr/sbin/softwareupdate -fetch-full-installer Įcho "Installer was successfully downloaded or try counter reached 4." #kill the prefs daemon process to reload preferences #to avoid download issues remove the softwareupdate plist file ĭo rm /Library/Preferences/ #if it doesn't get it on the first try then try again a few times as sometimes it doesn't work on the first try Proceed with Download and Erase and Install" Then echo "Self Service is running but no Installer exists. #if the installer is not already there and self servie app is running then begin download #determine whether self service app is running and whether the macOS Catalina installer is already there #obtain variable on whether the Self Service app is running Ĭaffeinate -t 10800 & selfservice=$(pgrep -x "Self Service") Prevents computer from falling asleep when on battery #prevent computer from sleeping for the next 3 hours.

macos catalina install file

This is to prevent a résumé updating incident where a bad scope or bad trigger configuration blows aways all your Macs (maybe we wouldn't do this but a less trained Site admin.): #!/bin/sh Also, I put in safety feature to not run the policy unless the Self Service app is running. Applications/"$macOSInstallerPath"/Contents/Resources/startosinstall -agreetolicense -forcequitapps -eraseinstall -newvolumename "Macintosh HD"Įxit actually, if you are interested in my script this one will try the download a few times in case it doesn't complete on the first try (It usually works with removing the plist but I've seen it fail on the first try at least once).

Macos catalina install file mac#

# Install macOS 10.15 with the erase drive option.Įcho "Erasing drive and installing macOS Catalina"Įcho "This might take a while usually about 15-20min."Įcho "Once the mac reboots, follow the instructions on screen"

macos catalina install file

Jamf policy -trigger delete_computer_from_jss MacOSInstallerPath=$(ls -t /Applications/ | grep -m 1 Install macOS Catalina)Įcho "Error: Couldn't find macOS Catalina installer"Įcho "Exiting, disk untouched, please try running the script once more" Abort if we can't find it in the expected place. If ! /usr/sbin/softwareupdate -fetch-full-installer -full-installer-version 10.15.4 Įcho "Error: Failed to download the installer, please try running the script once more" # Download installer exit if the download fails. # Warn the user and give the user a choise to abort.Įcho "This will completly erase your data from the machine."Įcho "Your computer will be fully reset all your data will be erased."Įcho "Are you sure you want to continue, have you backed up all your important files?"Įcho "Downloading installer this might take a while" bin/echo "You need to be root to do this, so use: sudo $ScriptPath/ReInstallmacOSCatalina.sh" Version=$(sw_vers | grep ProductVersion | awk '')Įcho "This will only run on macOS 10.15 Catalina" I've created a script to run in order to do a complete wipe of the Mac and a policy to call from the script to remove the device from JSS.įor us it has, so far knock on wood, worked flaw less.














Macos catalina install file