macOS install via jamf policy

sebastian_santo
New Contributor III

Hello, I'm working on upgrading couple of mac to Catalina but nothing I do is working I have already uploaded the .pkg file to jamf pro server but when I run this install command nothing happens.
Here is my command on the files and process tab.
/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps

Any help will be appreciated

6 REPLIES 6

mm2270
Legendary Contributor III

You might have to provide some more detail on how you've got things set up. You said you packaged up the installer file, but where is it getting deployed to on the target systems (what path), and is it being deployed successfully ahead of running the command?

Have you tested the Catalina installer you have locally to make sure it's still working? There was an issue a couple months back where all of Apple's installers had to be reissued due to an expired certificate. I would confirm the installer app you have is still valid if you haven't done that already.

sebastian_santo
New Contributor III

Yes I ran the command on a spare machine and everything attaching the screen shot
3c4af5afd58c4e3fa3a70ddc06b2a91d

3b855f58127247128cfd44e29589bcf4

b6528729cd41485f8cf2ee36d8b6a40e

9c579b25f79d43349e7183ecec074774

Thank you for the help I'm super new on this

mm2270
Legendary Contributor III

Ok, so from your screenshots, what you have is a single policy that "installs" the "Install macOS Catalina.app" file to the Mac, then runs the startosinstall command in the Execute Command field.

What I'd maybe suggest is breaking out the 2 items into their own policies, and using a Smart Group as the scope for the Self Service policy that kicks off the install.

Assuming your "Install macOS Catalina.pkg" is installing the installer app into a place like /Applications/, then add that to a policy scoped to any Macs that you would want to allow to upgrade to Catalina, and use the Check-In trigger to have that run automatically in the background.

Create a Smart Group that uses the criteria of "Packages Installed By Casper" (yes, this criteria item should be renamed by now), and add the full package name to the field, so "Install macOS Catalina.pkg" This will capture any Macs that the policy has been run on because after Jamf Pro installs anything it creates a package receipt of that item in it's own directory. This gets picked up at inventory collection time (be sure the silent install policy has an inventory collection added to it).
For added measure, you could also add in the Application Title criteria and add "Install macOS Catalina.app" to ensure that it's actually sitting there in the main Applications folder.

Then use that Smart Computer Group as the scope for the Self Service policy that will run the command to kick off the upgrade.

This has two possible advantages. One, it offloads the often long process of getting the installer app onto the machine to something the user never sees, so they won't have to stare at a progress bar for too long. When they run the Self Service policy, it should only take less than a minute before their Mac reboots and starts the upgrade process.

Two, it prevents the Self Service policy from appearing before the item it actually needs to work is in place on their machine. Of course, this is all based around inventory information, which isn't up to the minute accurate. But it should generally work for you.

Hope the above helps. I would also take a look at some of the existing OS upgrade threads here for more examples. There are entire full fledged scripts out there that can handle this all in a very robust way that you might want to look at too.

sebastian_santo
New Contributor III

Thank you so much for your help this really helped me a lot you will see me around here very often asking questions

summoner2100
Contributor

I use this to do Self Service upgrades. It looks for the installer on the machine, and if it doesn't find it. Then it tries to download from a Jamf policy you make. It has step by step instructions. https://github.com/kc9wwh/macOSUpgrade

summoner2100
Contributor

and that's the section of my policy that tells it the Catalina installer options for the script. (the custom trigger is just a policy set to all machines that will drop Catalina installer into Applications as per the Github link instructions). I've scoped it to all machines, as it's a custom trigger that will only run if they get the upgrade script scoped to their self service. Just ignore parameter 8, I'm testing an erase option to the script and I haven't made sure it works yet.)
5cea83f4d0b04fcd982db6733537fec6