Skip to main content

Hi everyone!

For those who attended Jamf’s “Reinstall a Clean macOS with One Button” webinar this week, we’ll have the recording posted hopefully sometime next week. In the meantime, here’s the link to the resources discussed.

https://jamf.it/eraseinstall-webinar

It's possible the command is hanging on the preserve container argument. I have never utilized that before so it could take longer. Good news is I have used this without self service and it does work.


Does the preservecontainer just maintain the recovery partition?


Looking over the argument, I do not even see "preservecontainers" as a listed argument. I would just remove it because it could be hanging up the entire command.


It may be a Catalina only argument? Removed and running again


Found it. It just preserves any other APFS volume other then the boot partition.


https://www.jamf.com/jamf-nation/discussions/31496/help-with-upgrading-users-to-mojave

$ /Applications/Install macOS Mojave.app/Contents/Resources/startosinstall --usage
Usage: startosinstall

Arguments
--license, prints the user license agreement only.
--agreetolicense, agree to the license you printed with --license.
--rebootdelay, how long to delay the reboot at the end of preparing. This delay is in seconds and has a maximum of 300 (5 minutes).
--pidtosignal, Specify a PID to which to send SIGUSR1 upon completion of the prepare phase. To bypass "rebootdelay" send SIGUSR1 back to startosinstall.
--installpackage, the path of a package (built with productbuild(1)) to install after the OS installation is complete; this option can be specified multiple times.
--eraseinstall, (Requires APFS) Erase all volumes and install to a new one. Optionally specify the name of the new volume with --newvolumename.
--newvolumename, the name of the volume to be created with --eraseinstall.
--preservecontainer, preserves other volumes in your APFS container when using --eraseinstall.
--usage, prints this message.


--preservecontainer, preserves other volumes in your APFS container when using --eraseinstall.


Still hanging. Not working :(


This is mine, obviously ignore the fact that it is for Catalina, but it has worked for me consistently. It was modified from Mojave which also worked for me.

'/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall' --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD'


Found one for Mojave

'/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall' --agreetolicense --nointeraction --eraseinstall --newvolumename 'Macintosh HD'


Thanks! Appears to work now. Trial and error! @talkingmoose


Spoke too soon. Did not work on second identical iMac. Policy log looks good though.


Might need a restart, a few people have mentioned that was necessary in some instances.


Thats not good. Need to rely on this to run without issues. Anyway, it did not work to restart. Just came back to normal login.


I copy the OS installer and startosinstall script to machines then run the script. I have seen that sometimes (almost every time) the OS installer gets "made by untrusted vendor" message are you sure you want to open? When this happened my script quits and the OS fails to start the install. I just manually run the installer in the GUI quit it and then run the script... Is it possible that you are seeing the same issue but not the same symptoms? What happens when you run the installer in the GUI after the failure?

C


I’ve been using this for a few years now, highly recommended: https://github.com/kc9wwh/macOSUpgrade/


No getting any "made by untrusted...." No errors in policy logs. The Mojave installer is fresh on this machine. Just ran the same policy on identical machine a short time ago. It makes zero sense. @davidhiggs Not upgrading, wiping and installing.


Running the command right in terminal has the same results. Nothing. No errors. No dialog box messages.


I know it is a dumb question, but you are sure the macOS installer is cached in Applications?


@talkingmoose Any input? I am stumped.


system.log


Dec 10 15:21:03 xxxx osinstallersetupd[2331]: objc[2331]: Class BOSError is implemented in both /System/Library/PrivateFrameworks/BridgeOSInstall.framework/Versions/A/BridgeOSInstall (0x7fffaafb0170) and /Applications/Install macOS Mojave.app/Contents/Frameworks/OSInstallerSetup.framework/Versions/A/Frameworks/IABridgeOSInstall.framework/IABridgeOSInstall (0x103ba62c8). One of the two will be used. Which one is undefined.


running into a couple of "issues" when running the upgrade.
once initiated via Self Service, the computer restarts as expected, does a couple of restarts then hangs on a black screen for awhile. once i hit the spacebar (or any key), the machine wakes up and continues the process.

the second one is that in the middle of an upgrade, it will take me to the login screen to enter my password. i enter the password and the machine goes back to the update screen (about x minutes remaining... )

anyone else experiencing this? obviously we would ideally want the user to kick off the upgrade and not have to monitor to enter credentials and enter their password if it's going to keep upgrading after.


@raphhyyy , what you are describing seems to be expected behaviour based on the method JAMF is using to perform the upgrade. I have yet to see any upgrade scenario outside of the official Apple method that allows the upgrade to fully complete unattended.


I finally was able to get it working again. I will have to see how pushing it out instead of Self Service goes. I downloaded a fresh Mojave installer, used Composer to create the package, created or updated my current Policy that installs the installer to Applications, and then adjusted my command in Self Service Policy to:
"/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall" --nointeraction --eraseinstall --newvolumename "Macintosh HD" --agreetolicense