Posted on 11-12-2019 08:22 AM
I have the following script which worked migrating 10.13.x to 10.14.5
#!/bin/bash
/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall --applicationpath /Applications/Install macOS Mojave.app --agreetolicense --nointeraction
currUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk -F': ' '/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }} ')
currUserUID=$(id -u "$currUser")
/bin/launchctl asuser "$currUserUID" sudo -iu "$currUser" killall "Self Service"
exit 0
however it is not working anymore
I took out application path so the script looks like this now:
#!/bin/bash
/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall --agreetolicense --nointeraction
currUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk -F': ' '/[[:space:]]+Name[[:space:]]:/ { if ( $2 != "loginwindow" ) { print $2 }} ')
currUserUID=$(id -u "$currUser")
/bin/launchctl asuser "$currUserUID" sudo -iu "$currUser" killall "Self Service"
exit 0
but still nothing happens.
Thoughts?
Posted on 11-12-2019 08:53 AM
Make sure you are using an Apple installer with an update certificate as It expired recently.
Try running the Apple installer manually to see if you get an error like: "This copy of the Install macOS Mojave.app application is damaged, and can’t be used to install macOS". If you get something like this then download a new installer and try your script again after.
Posted on 11-12-2019 09:07 AM
try switching the --nointeraction and the --agreetolicense switches. I for the first time set up Mojave in Self Service and couldn't get it to work in the order you have listed it. It could be just me though.
Posted on 11-12-2019 09:33 AM
For sure I'm having problems downloading the current installer.
I have done this several times (while on this network) and now I have done it through the App Store on the device I'm working on.
I think I'm running into the issue where the app is being downloaded from an internal caching server.
I have a few of those and will need to erase their cached content.
Posted on 04-22-2020 09:45 AM
This works for me as postinstall.
#!/bin/sh
/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall --agreetolicense