startosinstall crashes "Helper tool crashed..."

boberito
Valued Contributor

I'm trying to script the install of macOS High Sierra to install from Self Service. It was failing but without any feedback from Self Service.

So I tried just running the script on the client computer after a few seconds I get "Helper tool crashed...". And even when running the command by itself it does the same.

It's the 13.1.05 version of the installer app, and the full 5.2gb installer, downloaded just today.

/Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall --applicationpath /Applications/Install macOS High Sierra.app --rebootdelay 30 --nointeraction --agreetolicense

Has anyone seen this happen?

12 REPLIES 12

nkalister
Valued Contributor

I've seen this. usually it's something weird going on on the boot drive. check it in disk utility for errors, reboot, and try again. Other possibility would be a corrupted cached copy of the installer, so clear out the Jamf cache of that.

boberito
Valued Contributor

Already tried rebooting, redownloaded from the App Store and pointed the script to /Applications/Install macOS High Sierra.app

Maybe Disk Utility will reveal something.

boberito
Valued Contributor

Turns out removing rebootdelay option made it work....weird.

george_duncan
New Contributor

Hey @boberito

Can you post the actual script that worked for you?

boberito
Valued Contributor

So the part that you may want is this specifically

/Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall --applicationpath "/Applications/Install macOS High Sierra.app" --agreetolicense

But here is my whole High Sierra script

#!/bin/sh

StartInstall ()
{

    OfficeVer=$(defaults read /Applications/Microsoft Word.app/Contents/Info.plist CFBundleShortVersionString | cut -c 4-5)
    fileVaultStatus=$(fdesetup status | awk '{print $3}' | tr -d ".")

    ### if file vault on, load this launchagent so it'll do an authenticated reboot - still testing    ### 
    if [ "$fileVaultStatus" = "On" ]; then

cat << EOF > /Library/LaunchAgents/com.apple.install.osinstallersetupd.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.apple.install.osinstallersetupd</string>
    <key>LimitLoadToSessionType</key>
    <string>Aqua</string>
    <key>MachServices</key>
    <dict>
        <key>com.apple.install.osinstallersetupd</key>
        <true/>
    </dict>
    <key>TimeOut</key>
    <integer>Aqua</integer>
    <key>OnDemand</key>
    <true/>
    <key>ProgramArguments</key>
    <array>
        <string>/Applications/Install macOS High Sierra.app/Contents/Frameworks/OSInstallerSetup.framework/Resources/osinstallersetupd</string>
    </array>
</dict>
</plist>
EOF

        chown root:wheel /Library/LaunchAgents/com.apple.install.osinstallersetupd.plist
        chmod 755 /Library/LaunchAgents/com.apple.install.osinstallersetupd.plist
        launchctl load /Library/LaunchAgents/com.apple.install.osinstallersetupd.plist
    fi

### if office is out of date, install the newest ###    
    if [ $OfficeVer -lt 35 ]; then
        /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -title "Microsoft Office needs updated" -description "The version of Microsoft Office installed on your computer is not compatible with macOS High Sierra. Microsoft Office will upgrade before continuing. This may add an additional 10 to 15 minutes to the upgrading process." -button1 "Ok" -defaultButton 1 -icon "/Applications/Install macOS High Sierra.app/Contents/Resources/ProductPageIcon.icns"
        ps ax |  grep "/Applications/Microsoft Word.app" | awk '{print $1}' | xargs kill -9 2> /dev/null
        ps ax |  grep "/Applications/Microsoft Excel.app" | awk '{print $1}' | xargs kill -9 2> /dev/null
        ps ax |  grep "/Applications/Microsoft PowerPoint.app" | awk '{print $1}' | xargs kill -9 2> /dev/null
        ps ax |  grep "/Applications/Microsoft Outlook.app" | awk '{print $1}' | xargs kill -9 2> /dev/null
        jamf policy -event MSOffice2016
    fi

### install high sierra ### 
        /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -title "Installing macOS High Sierra" -description "mac OS High Sierra will begin installing momentarily.

Please save all work NOW as all unsaved work will be LOST." -button1 "Ok" -icon "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Sync.icns" -defaultButton 1 &
        /Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall --applicationpath "/Applications/Install macOS High Sierra.app" --agreetolicense

        killall "Self Service"
        exit 0
}

OS=$(sw_vers -productVersion | cut -c 1-5)

### don't install if already installed ### 
if [ "$OS" = "10.13" ]; then
    /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -title "High Sierra Installed" -description "mac OS High Siera is already installed" -button1 "Ok" -icon "/Applications/Utilities/System Information.app/Contents/Resources/SystemLogo.tiff" -defaultButton 1 &
    echo "10.13 already installed"
    ps ax |  grep "/Applications/SAES Self Service.app" | awk '{print $1}' | xargs kill -9 2> /dev/null
    exit 0
fi


StorageAvail=$(df -H / | tail -1 | awk '{print $4}' | tr -d "G")

### don't install if you have less than 10gb of space ### 
if [ $StorageAvail -lt 10 ]; then
    jamf displayMessage -message "Your computer does not have enough space. You have only $(df -H / | tail -1 | awk '{print $4}') GB of space free. MacOS High Sierra requires at least 10 GB of free space available. If you need help making room, please visit the Technology Office."
    echo "Not enough storage space"
    exit 0
fi

### can't install if it isn't cached. ### 
if [ ! -d "/Applications/Install macOS High Sierra.app" ]; then
    /usr/local/bin/jamf policy -event highsierra &
    /Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -title "High Sierra Not Cached" -description "mac OS High Sirra is not cached and is not yet ready to be installed, please check back soon." -button1 "Ok" -icon "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/Bonjour.icns" -defaultButton 1 &
    echo "not cached"
    exit 0
fi

PluggedInYN=$(pmset -g ps | grep "Power" | cut -c 18- | tr -d "'")

### are we plugged in? ### 
if [ "$PluggedInYN" = "AC Power" ]; then
    echo "plugged in"
    StartInstall

else
### do we have enough power? ### 
    BatteryPercentage=$(pmset -g ps | tail -1 | awk -F ";" '{print $1}' | awk -F "	" '{print $2}' | tr -d "%")
    if [ $BatteryPercentage -ge 50 ]; then
    echo "laptop over 50% power"    
    StartInstall

    else
        jamf displayMessage -message "Please plug your laptop in while installing. You do not have enough power to install macOS Sierra. You have $BatteryPercentage% power left" 
        echo "not enough juice"
        exit 0
    fi
fi

fmenz
New Contributor

We currently have a wipe & refresh policy, we install 10.14.5 Mojave to Applications and run the command: "/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense

sometimes it works, but on many machines, we are getting the following error:
Running command "/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense...
Result of command:
Helper tool crashed...

is this 10.14.5 related?
Running the command in the terminal results in the same error.
Thank you!

fmenz
New Contributor

For anyone with the same problem (helper tool crashed...), there is a problem with the jamf framework, blocking or killing the helper tool. I changed the command to

jamf removeFramework; "/Applications/Install macOS Mojave.app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense &

The command will remove the framework and run the startosinstall after that. That fixed it for us.
Maybe jamf could check whether there is a problem with the framework blocking the helper tool?

zmiller
New Contributor II

I was getting the "helper tool crashed..." I was able to find that this was caused by the Mojave installer being part of the restricted apps. Once I removed the restriction the installation was able to work.

fmenz
New Contributor

Nice, that solved my problem too, i don't have to remove the framework now...should have known that...

JeyT
New Contributor III

I am getting this issue as well. Never did before, and didn't change anything. I am performing in-place OS upgrades up to High Sierra so I don't want to erase or remove Jamf framework. I cache the installer down to the "Waiting Room" directory, then run the script. Like I said it used to work but trying to remember if that was before we upgraded to 10.15 cloud. Any help is appreciated.

/Library/Application Support/JAMF/Waiting Room/Install macOS High Sierra.app/Contents/Resources/startosinstall --agreetolicense --converttoapfs YES --nointeraction

m_donovan
Contributor III

Are you using a new installer? All the signing certs for old installers expired yesterday.

JeyT
New Contributor III

The High Sierra installer has probably been on our Jamf server for some time. I assume I should just go to the apple site and download another one? I wasn't even aware that the older installers cert expired. Haven't been doing Jamf that long so still learning the ropes here. How often do I need to get new OS installers? Can just download another one from here? https://support.apple.com/downloads/macos. Thanks