High Sierra --eraseinstall

DaneEckert
New Contributor

I am in the process of using the --eraseinstall switch with starttoinstall as documented here:

https://www.jamf.com/blog/reinstall-a-clean-macos-with-one-button/

I use the suggested switches "/Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall" ‑‑eraseinstall
‑‑newvolumename "Macintosh HD" --agreetolicense

I receive the following message Error: Could not get license agreement.

Anybody else seeing this issue or have a fix?

Thanks.

13 REPLIES 13

ShaunRMiller83
Contributor III

@DaneEckert

It might be a typo in your post but I see you forget the & at the end of the command.

 "/Applications/Install macOS High Sierra.app/Contents/Resources/startosinstall" --eraseinstall --newvolumename "Macintosh HD" --agreetolicense &

DaneEckert
New Contributor

Thanks. I tried adding the & to the end of the command and now I get "Error 800".

ShaunRMiller83
Contributor III

What happens if you copy the text block I posted and paste it into terminal on a test system?

DaneEckert
New Contributor

I copied that text exactly. My next step is to try a different machine to verify this isn't an issue with the machine I'm testing this on.

gachowski
Valued Contributor II

FYI,

The "other" thread says there are issue with FileVault machines...

C

donmontalvo
Esteemed Contributor II

Correct me if I'm wrong but isn't the issue that if the current user is not FileVault 2 enabled, the command isn't able to get past the pre-boot screen.

--
https://donmontalvo.com

gachowski
Valued Contributor II

I am not sure I was just talking about this thread...

https://www.jamf.com/jamf-nation/discussions/28421/re-reinstall-a-clean-macos-with-one-button

C

ShaunRMiller83
Contributor III

This maybe the post Don is referring to...

https://www.jamf.com/jamf-nation/discussions/28421/re-reinstall-a-clean-macos-with-one-button

chuinder
New Contributor III

Are you using the full Apple OS installer, or the "shell" installer? I had the 800 error when I tried this originally and that was because I was using a copy of the installer from my SUS. You can tell the difference between the two because the shell installer is about 15 MB (and it downloads assets on command) and the full installer is about 5 GB. Only the latter actually has the contents to do this. I provided Apple with feedback asking them to remove the command line features from the shell installer.

DaneEckert
New Contributor

@chuinder I think this is my issue. Looking at the size of the installer that seems to make sense now.

ooshnoo
Valued Contributor

@DaneEckert What was your solution? I'm getting the error 800 as well

emily
Valued Contributor III
Valued Contributor III

@ooshnoo check out the size of the installer that downloaded. If it's not the 5/6GB download you may have a stub that doesn't include the full contents of the macOS installer. Check out installinstallmacos.py as a failproof way to always download a full installer without relying on the Mac App Store or Software Update Servers (also gives you a list of all available macOS installers, not just the most recent shipping macOS version).

daniel_behan
Contributor II

@emily erase-install is a great script that leverages installinstallmacos.py so a choice can be automated such as OS Version or Build ID.