Get Erase-install.sh working

binjali
Contributor

So, i'm trying to use https://github.com/grahampugh/erase-install and I'm having a VERY hard time understanding the steps to make it work.

I added the package to Jamf Cloud, and pushed it out to my test computers by policy.

How doi I get the various switches into the install? I thought i could make separate polices that included scripts that talk to the installed package. Is this the correct usage?

11 REPLIES 11

sdagley
Esteemed Contributor

@binjali Did you review the Jamf Pro section in the erase-install Wiki? https://github.com/grahampugh/erase-install/wiki/8.-Use-in-Jamf-Pro

 

jcarr
Release Candidate Programs Tester

I have a Self Service policy that installs the package and then runs the following command using the 'Files and Processes' payload:

 

/Library/Management/erase-install/erase-install.sh --reinstall --os=12 --update --min-drive-space=35 --current-user --check-power --no-fs --depnotify --cleanup-after-use

 

Obviously you can change the --update flag if you want to do an erase and install.

binjali
Contributor

So, i used the erase-install.sh script, pushed and activated by policy, and pushed it out to my two current test machines.  They ran the updates as requested, but I lost the JamfConnect login window.   The update polic isn't registering as completed, the test machines are just sitting in pending, and when I tired to push out an auth-changer policy, it is also sitting in pending, with no progress being made.  I need help with this.

Did you ever get to the bottom of this?

Eh, not really. Got pulled off by a series of cascading fires and haven't been able to get back.  Maybe i'll get to understand this one day.

SMR1
Contributor II

Trying this package for the first time. I have the package install and setup the file and process set to

/Library/Management/erase-install/erase-install.sh --reinstall --update --min-drive-space=35 --current-user --check-power --no-fs --cleanup-after-use, but it errors because it can't obtain valid installer. Cannot continue.

 

Build 21G115 selected. Downloading #27...

Making empty sparseimage...

[run_installinstallmacos] Error obtaining valid installer. Cannot continue.

[erase-install] attempting to terminate the 'caffeinate' process - Termination message indicates success /Library/Management/erase-install/erase-install.sh: line 1078: 36060 Terminated: 15 /usr/bin/caffeinate -dimsu -w $$

[erase-install] attempting to terminate the 'jamfHelper' process - Termination message indicates success /Library/Management/erase-install/erase-install.sh: line 1078: 36083 Terminated: 15 "$jamfHelper" -windowType hud -windowPosition ul -title "${!dialog_dl_title}" -alignHeading center -alignDescription left -description "${!dialog_dl_desc}" -lockHUD -icon "$dialog_dl_icon" -iconSize 100

sdagley
Esteemed Contributor

@SMR1 Try adding the "--pkg" option to have erase-install download the installer as a .pkg instead of build one.

I'd also suggest adding the option "--build=21G115" if you specifically want 12.6 to be installed.

SMR1
Contributor II

Thanks. I had to use the --pkg option,because we use DLP and it was blocking the saving of the .dmg, but when I used the --pkg option it worked.

SMR1
Contributor II

For M1's, if we utilize bootstrap tokens, will it bypass the user prompt to enter password? 

sdagley
Esteemed Contributor

@SMR1 The bootstrap token will allow Jamf Pro to trigger an update via an MDM command, but it cannot be used for a scripted update such as erase-install.

SMR1
Contributor II

That's what I thought, but thought I would check. Thanks for the assistance.