Big Sur Upgrade Bash Command

sgiesbrecht
Contributor III

Does anyone know the correct Bash command to upgrade to Big Sur? I tried using "/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction" but it just hangs.

1 ACCEPTED SOLUTION

Cayde-6
Release Candidate Programs Tester

I find that opening the installer app for the first time takes ages, it’ll just bounce in the dock and terminal command to it also hang.

Not sure if the app on first load does some verification steps to Apple, once it opens I then find terminal commands work instantly.

View solution in original post

88 REPLIES 88

MS2020
New Contributor II

/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction
Remove your quotes & make sure that you are placing the installer in applications folder- If that is your intention

sgiesbrecht
Contributor III

Sorry, I added the quotes in the post by default. In the actual Policy - Policies > Files and Processes > Execute Command > /Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction

Jamf 10.23.0

MS2020
New Contributor II

Taking jam out of the picture- If you run it manually in an elevated terminal window- what's your output?

sgiesbrecht
Contributor III

when run with /Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction = prompts for password

when run with sudo /Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction = runs (upgrades) with no issues

Every time I run this command "sudo /Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction" it keeps asking me for password on my test machine I am logged in as a standard account

 

sgiesbrecht
Contributor III

8562d3f7c54a4d6dad515eaa742ad90a

Cayde-6
Release Candidate Programs Tester

I find that opening the installer app for the first time takes ages, it’ll just bounce in the dock and terminal command to it also hang.

Not sure if the app on first load does some verification steps to Apple, once it opens I then find terminal commands work instantly.

andrew_nicholas
Valued Contributor

Looks like that startosinstaller has added flags for --user, --passprompt, and --stdinpass

sgiesbrecht
Contributor III

so in the command would be /Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction --user <admin acct> --stdinpass <admin pwd>?

MLBZ521
Contributor III

Regarding what @Cayde-6 mentioned, see: https://babodee.wordpress.com/2020/11/05/waiting-for-the-macos-big-sur-installer-to-launch/. That could have something to do with your delay, possibly?

Bold move on the upgrading day after release. Haha

jkaigler
Contributor II

I am using "/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall" --applicationpath "/Applications/Install macOS Big Sur.app" --rebootdelay 0 --nointeraction --agreetolicense &

It works but it does not close Self Service, I had to do that and manually restart

Cayde-6
Release Candidate Programs Tester

Add in the --forcequitapp flag into your command

MLBZ521
Contributor III

Also shouldn't need the --applicationpath any more, it's use was deprecated in Mojave.

mrorrer
New Contributor II
/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --nointeraction --agreetolicense --forcequitapps

sdagley
Esteemed Contributor II

@mrorrer That's --forcequitapps, and when you use that option there's no need to kill Self Service

TDManila
New Contributor III

@sgiesbrecht I follow your steps but had encounter this "Helper Tool Crashed".

Anyone already resolved this error?

sgiesbrecht
Contributor III

@tdcxmanila This is the command I used
/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction

I created 2 policies
Policy 1
- deploy the Staging file (Install macOS Big Sur.app) to the Application

Policy 2
- check to see if the Staging file is there
- if there, run under Files and Process > Execute Command

/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction

atomczynski
Valued Contributor

@sgiesbrecht

How did you define Policy 2 (check if the app exist)?

luispalumbo
Contributor

Hi @atomczynski ,

What you can do is create a Smart Group that contains the computers with the installer then run a policy to start the install based on that group.

TDManila
New Contributor III

225d0ca525c945dba731c57f572afbf4

Anyone received this kind of error?

j_meister
Contributor II

Isn't there a way to upgrade from Catalina to Big Sur via

softwareupdate --fetch-full-installer

?

dan-snelson
Valued Contributor II

@j.meister The following should work (now):
/usr/sbin/softwareupdate --fetch-full-installer --full-installer-version 11.0.1

dan-snelson
Valued Contributor II

@sgiesbrecht In case you haven't already seen @kc9wwh's macOSUpgrade.

j_meister
Contributor II

Hi Dan,

thanks for the hint but I already tried that and get below error every time.

admin@WILAMAC00 ~ % /usr/sbin/softwareupdate --fetch-full-installer --full-installer-version 11.0.1 Downloading and installing 11.0.1 installer SUPreferenceManager: Failed to set object of class: __NSCFConstantString for key: LastRecommendedMajorOSBundleIdentifier with error: Error Domain=SUPreferenceManagerErrorDomain Code=1 "(null)" SUPreferenceManager: Failed to set object of class: __NSCFConstantString for key: LastRecommendedMajorOSBundleIdentifier with error: Error Domain=SUPreferenceManagerErrorDomain Code=1 "(null)" Install failed with error: Update not available

I am running macOS 10.15.7 (Build 19H15) on the machine and also tried it with sudo but that didn't help either. The machine is an iMac (Mid 2017).

Any more ideas?

sgiesbrecht
Contributor III

@atomczynski fef32010803c4a82ae37937f06a547f1

sgiesbrecht
Contributor III

@dan-snelson Thanx for the "@kc9wwh's macOSUpgrade" information. I am going to try for the next upgrade

dan-snelson
Valued Contributor II

mwu1876
Contributor

Has anyone been able to get this to work through a self service policy? Big Sur now requires you to use the --user, --stdinpass or --passprompt. I believe when you use the startosinstall with --newvolumen then you have to authenticate with one of those methods.

mwu1876
Contributor

When I use the --stdinpass, the policy just says "running" and runs forever. Nothing happens. Any ideas anyone?

Cayde-6
Release Candidate Programs Tester

@mwu1876 are you sure? I just ran the Big Sur startosinstall binary without those arguments and it installed fine

There is a difference if you are running M1 or Intel chip, for me at least does work on Intel chip but not on M1

mwu1876
Contributor

the binary works fine.The issue is when you call it from a policy WITH the --eraseinstall. You have to use either the -stdinpass or the --passprompt. Either of those cases the error. if I just run it from terminal it works fine.

hodgesji
Contributor

It doesn't require the --stdinpass or --passprompt for me when run from a Self Service policy using the --eraseinstall command. Here is what I'm calling in a policy with the variable paths to the startOSinstall command and the macOS installer respectively:

"$startOSinstaller" --applicationpath "$macOSinstaller" --eraseinstall --forcequitapps --newvolumename "Macintosh HD" --agreetolicense --nointeraction

Bernard_Huang
Contributor III

Regarding:
"
SOLVED Posted: 11/13/2020 at 9:48 AM CST by Cayde-6
I find that opening the installer app for the first time takes ages, it’ll just bounce in the dock and terminal command to it also hang.

Not sure if the app on first load does some verification steps to Apple, once it opens I then find terminal commands work instantly.
"
Does it mean the scripting should be
> Open Install macOS Big Sur.app
> Wait 10 seconds
> Close Install macOS Big Sur.app
> wait 10 seconds
> then execute
Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps --nointeraction

?

mwu1876
Contributor

@hodgesji Thanks. Are you using this in the scripts section? Or files and processes?

Cayde-6
Release Candidate Programs Tester

@Bernard.Huang Open the app and allow it to verify then package it up into a PKG.

mwu1876
Contributor

@hodgesji It worked! So I used the commands in the scripts section and it worked. Using that same command from the files and processes tab did not work. Thanks!

Bernard_Huang
Contributor III

Hi @hodgesji & @mwu1876 ,

How did you guys that it working with those parameters? I couldn't get it working, and here's the error log I got:

Running a command as '"/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall" --applicationpath "/Applications/Install macOS Big Sur.app" --agreetolicense --nointeraction --forcequitapps --eraseinstall --newvolumename 'Macintosh HD''...
WARNING: "--applicationpath" is deprecated in macOS 10.14 and greater. Please remove it from your invocation.
Error: Error: Could not create a new APFS volume. Please try again.
By using the agreetolicense option, you are agreeing that you have run this tool with the license only option and have read and agreed to the terms.
If you do not agree, press CTRL-C and cancel this process immediately.

I did put in the "--applicationpath "$macOSInstaller" ", but got rejected because we are upgrading from Mojave (10.14) or Catalina (10.15).

Edited: Sorry about that. I actually did have the command to startosinstall. I didn't fully copy the log properly.

hodgesji
Contributor

@Bernard.Huang As you noted, the --applicationpath argument can be removed now according to their documentation but it still worked in when I left it in mine. I think you need to point your path all the way to the startosinstall command inside the installer:
/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall --eraseinstall --forcequitapps --newvolumename "Macintosh HD" --agreetolicense --nointeraction