startosinstall has been updated in 10.12.4 with modified options

bpavlov
Honored Contributor

I know there's a few scripts out there that are using the startosinstall tool built into the macOS app installer so figured I'd post this in case you aren't aware already:
https://babodee.wordpress.com/2017/03/29/startosinstall-updated-in-macos-10-12-4-app-installer-and-c...

12 REPLIES 12

dpertschi
Valued Contributor

@bpavlov Good find! Thanks for sharing.

seann
Contributor

That's good to know. FYI, not sure if anyone saw this article https://www.jamf.com/blog/streamlining-your-macos-upgrade-process/, but it has multiple problems. Kind of odd that the author didn't actually test this? Anyway, my command to kick everything off is

/Users/Shared/Install macOS Sierra.app/Contents/Resources/startosinstall --applicationpath "/Users/Shared/Install macOS Sierra.app" --nointeraction --pidtosignal $jamfHelperPID &

egill
New Contributor III

Thanks for the heads up guys, appreciate it!

spalmer
Contributor III

@seann Could you expand on the multiple problems? Obviously I assume one of them is the change in startosinstall where you can no longer specify the volume. Just curious about any other issues you see as I was considering making the script from the Jamf Blog available for our Site Admins to use.

bradtchapman
Valued Contributor II

@bpavlov : you're missing an open quotation in your blog post, just before the first / of Applications. If someone copy/pastes the command as printed, it won't work.

bpavlov
Honored Contributor

Thanks. Just fixed it! I need to get a technical proof reader when I write blog posts.

seann
Contributor

@spalmer The application path has to be within quotes, and like you said the lack of volume flag, which may not be fair because he wrote the post a few weeks ago. I discovered the error before I learned the volume flag was eliminated.

So basically, just replace his last line with what I wrote above, unless of course you're caching it elsewhere.

If you need to run post-upgrade stuff, create a policy scoped to a smart group w/ criteria Packages Installed by Casper: YourUpgradePkgName.pkg AND OSX version like: 10.12

ChicagoGuy1984
New Contributor III

I can confirm now that is working --- THANKS FOR POSTING THIS "startosinstall" string - now 10.12.4 is back on Self Service App!

Thanks,
Marek

anverhousseini
Contributor II

I have an issue with the startosinstall binary. If I kickstart it from Self Service the computer wants to restart but the Self Service.app won't close so the reboot gets stuck. Any idea?

bpavlov
Honored Contributor

I haven't seen that personally. But you could go ahead and add a part in your script to kill the Self Service app. The process name is "Self Service". Killing Self Service shouldn't effect the policy finishing its run since its really the jamf binary that's running the policy.

anverhousseini
Contributor II

Thanks @bpavlov

I could solve it with the "Restart Options" directly in the policy. Just changed it to "Restart immediately".

calvins
New Contributor III

I had the same problem with Self-Service hanging even though I had the "&" in the command like that blog post described. It ended up being some weird text-encoding. Fixed it by copying my command into the JAMF script editor first, then re-copying it from there into my policy.

So my policy is just this one command. No restart options, no scripts.

"/Applications/Install macOS Sierra.app/Contents/Resources/startosinstall" --applicationpath "/Applications/Install macOS Sierra.app" --nointeraction &