Running a cached PKG with a command flag? Aiming for Big Sur install with little prompting.

dungeonadept
New Contributor III

I've got a PKG Big Sur installer, and I've started caching it on devices needing it.

I'm wondering if there's a way that I can run the cached installer with the --agreetolicense --nointeraction flags or if running the package Install Cached removes any way we'd be able to do this.

We have the script from https://github.com/kc9wwh/macOSUpgrade but it was implemented by someone who is no longer with us. I'm trying to work with it but I want to make sure I have a backup plan, as it wasn't working (or at least installations were failing) when they left us.

1 ACCEPTED SOLUTION

sdagley
Esteemed Contributor II

@dungeonadept Be aware that the startosinstall tool, which is used to drive a scripted install, requires a logged in user to function. And the macOS installers aren't .pkg installers, so the traditional .pkg install workflow doesn't apple. You need to use something like the macOSUpgrade or https://github.com/grahampugh/erase-install scripts to drive the installation process. 

View solution in original post

4 REPLIES 4

sdagley
Esteemed Contributor II

@dungeonadept Be aware that the startosinstall tool, which is used to drive a scripted install, requires a logged in user to function. And the macOS installers aren't .pkg installers, so the traditional .pkg install workflow doesn't apple. You need to use something like the macOSUpgrade or https://github.com/grahampugh/erase-install scripts to drive the installation process. 

dungeonadept
New Contributor III

We'd have them logged in to start it all through Self Serve.

I'm gonna toy around with the macOSUpgrade script a bit more.

talkingmoose
Moderator
Moderator

Don't use a policy's "Cache" option if you have a PKG of the Big Sur installer app. Install it.

This will "cache" (or place) the "macOS Big Sur Installer.app" into the Applications folder. Once the app is cached on the Mac, you can run a subsequent command to call the startosinstall tool with the --agreetolicense flag you mentioned and upgrade the macOS. I don't believe --nointeraction is available for the Big Sur installer app.

I was unaware of that. That changes things. My concern was that a lot of our users don't have very fast internet (some don't have it), so I guess my line of thinking was that if we cached the PKG (I figured installing the PKG would run the actual installation) while they're at work, they could run it whenever after that. Sounds like that's still true, we just need to install instead of run.

I wondered about that flag, I just googled it because i couldn't remember while writing the post, but I thought it was weird I hadn't seen that one in my searches.