startosinstall updated in macOS 10.12.4 app installer and can no longer target a volume

I recently blogged about my upgrade process with Jamf Pro. The script I had worked well with 10.12.3. One would assume it would work well with the 10.12.4 macOS app installer as well. However it appears that Apple has removed a flag. Specifically, you can no longer specify what volume you want to target for the installation.

The command that you could use previously in 10.12.3 looked like:

"/Applications/Install macOS Sierra.app/Contents/Resources/startosinstall" --applicationpath "/Applications/Install macOS Sierra.app" --volume / --rebootdelay 30 --nointeraction

In 10.12.4, it now looks like:

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

Those are just examples of some of the flags you could use. Basically they’ve removed --volume /. All this to say I had to update my script to account for this. This led to a bunch of other code I saw that I could optimize. I have added some additional exit codes and added additional functions to reduce code re-use. The updated script can be downloaded from my GitHub repo. For instructions on how to use it, please refer to my previous blog post.

Advertisements

3 thoughts on “startosinstall updated in macOS 10.12.4 app installer and can no longer target a volume

  1. I’ve been using this script for quite some time. The only real problem I’ve noticed is that if it detects a previous version of the macOS Sierra Installer.app it seems to throw up a generic error, which leads to the users opening a ticket. Is there a way to modify the script to check for the app and throw an error (or automate) about the incorrect installer version?

    Like

    1. Glad the script has been helpful. When I made that particular error message, I made it generic with the idea that the Jamf Pro admin would check the policy log and see the error code and therefore know why the script had failed. In an environment where users do not have admin access, the user would not be able to update the macOS installer app and therefore the admin would need to take care of this on behalf of the user. I’ll have to think about this, but I rather not overwhelm the user with information that they cannot do anything about. For now, I don’t plan on doing anything about this as I have other items to address in anticipation with 10.13. Just curious, but is the correct installer not downloading on the computer? Why do they have an older installer than what you’ve specified?

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s