Posted on 11-19-2018 12:06 PM
For testing Mojave mac refresh, i have 2 policies in Self Service. The first download the installer to /Applications. The second policy runs "/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense &
This worked during my original tests, but lately Self Service fails to quit. I can manually close Service and everything works as expected afterwards.
I think I have seen other posts about this, but my searches have come up. blank
We are on JAMFPro 10.8 and testing with 10.14.1
Posted on 11-19-2018 12:37 PM
I use this:
selfService=$(pgrep "Self Service"); /Applications/Install macOS Mojave.app/Contents/Resources/startosinstall --eraseinstall --newvolumename "System" --agreetolicense --rebootdelay 5 --nointeraction --pidtosignal "$selfService"
Posted on 11-19-2018 12:39 PM
Here is what I made for this, modify to suit.
This checks for Mojave, failing that checks for High Sierra.
What it doesn't currently do is check if the installer is a stub and full installer (it will fail if it's a stub).
It also has a check where the target drive has to be named WIPE before it will proceed.
The Self Service Issue is dealt with by simply force quiting Self Service first.
#!/bin/bash
Volume_Name=$4
if [[ "$Volume_Name" == "" ]]; then
Volume_Name="Macintosh HD"
fi
Boot_Volume=$(diskutil info / | awk '/Volume Name:/ {print $NF}')
if [[ "$Boot_Volume" == "WIPE" ]]; then
osascript -e 'tell application "Self Service" to quit'
if [ -d /Applications/Install macOS Mojave.app ]; then
/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall --applicationpath /Applications/Install macOS Mojave.app --eraseinstall --newvolumename "$Volume_Name" --agreetolicense --nointeraction
elif [ -d /Applications/Install macOS High Sierra.app ]; then
/Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall --applicationpath /Applications/Install macOS High Sierra.app --eraseinstall --newvolumename "$Volume_Name" --agreetolicense --nointeraction
else
echo "No installer found"
fi
fi
Posted on 03-08-2019 08:52 AM
How are you creating the admin account after an --eraseinstall of Mojave? Do we now have to manually create the account when the machine reboots?
This just seems like a big step back. JAMF Imaging running on a NetInstall image helps automate this, but if we now have to launch the macOS Installer, and wipe the computer, it'll no longer get any instructions from JAMFPro.
How are you guys dealing with this step? I haven't migrated our computers to Mojave because I'm missing this key piece of the imaging process. Upgrading is easy because there's no wiping of the HD, but a complete fresh install is an issue.
Posted on 03-11-2019 06:40 AM
@itupshot if you use Apple's DEP, the device can automatically enrolled in JAMF server. I am still in testing on mine but it seems to work pretty good. I am having an issue of getting devices in DEP, I'll probably have to call Apple and see if they can help.
Posted on 03-13-2019 07:11 AM
@itupshot If the Mac is already on 10.13.4 you can add additional packages in the wipe command process. This means you can (for example) add a quickadd package in the installation procedure (the packages needs to be signed though)
If it's not DEP you are required to manually approve the MDM profile though.
Posted on 12-31-2019 10:31 AM
Thank you @c.kay Ive been trying to get this to work for several days now. I tried every variation of the startosinstall command but just wouldnt run. Im not a scripter so could you explain to me the selfService=$(pgrep "Self Service") and --pidtosignal "$selfService" parts? Does that killing the Self Service app or telling it something else?
Thanks
Mark
Posted on 01-02-2020 11:14 AM
@jkaigler I was having the same issue and what fixed it for me was unchecking "Ensure that users view the description" in the Self Service section of the policy. That was apparently causing it to hang and not quit Self Service properly. As far as I know I haven't had the issue since I made that change!