Help with running Erase & Install then Prestage Enrollment

MBlank
Contributor

Using this workflow as a starting point:https://www.jamf.com/blog/reinstall-a-clean-macos-with-one-button/

I've set this up two erase a machine and install Big Sur. 

I have several applications set to install via a prestage enrollments which I'm testing. 

What's the best way to combine both the erase and install and then have Jamf run the prestage enrollment? 

 

 

1 ACCEPTED SOLUTION

For prestage, no. It will continue picking that up each time it erases. However, you may want to look into the settings of Jamf Pro under "Re-enrollment" as if you have any policies set to once per computer, if those logs aren't flushed, those would not run again. Under the settings pane I mentioned, you can tell Jamf to clear policy logs on re-enrolled computers - or if policies are set to ongoing, it shouldn't really matter

View solution in original post

9 REPLIES 9

ljcacioppo
Contributor III

As long as the computer is assigned to the prestage enrollment, once it erases via the startosinstall command listed in the article and goes back to setup assistant, it should automatically proceed with the prestage enrollment you assigned to it.

MBlank
Contributor

Thanks. If this machine has already been enrolled via pre-stage do I need to delete it somewhere within Jamf so it then triggers the re-enrollment once it's automatically been wiped? 

For prestage, no. It will continue picking that up each time it erases. However, you may want to look into the settings of Jamf Pro under "Re-enrollment" as if you have any policies set to once per computer, if those logs aren't flushed, those would not run again. Under the settings pane I mentioned, you can tell Jamf to clear policy logs on re-enrolled computers - or if policies are set to ongoing, it shouldn't really matter

MBlank
Contributor

Thanks. I checked off clear logs on computers during re-enrollment. I have a policy called: Erase and Install Mac OS Big Sur. See details below. I  have it set to apply to a smart group called Erase,Reinstall Mac OS and Enroll. I then have that smart group set with the criteria of if a computer is a member of a Computer Group called "To be redeployed". And then have a test laptop as the only member of this static group. 

 

Am I missing something to get this machine to erase, reinstall Big Sur and re-enroll? 

 

OngoingSelf ServiceErase, Reinstall Mac OS and Enroll
 
 

 

Run Unix command ''/Applications/Install macOS Big Sur.app/Contents/Resources/startosinstall' --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD''

 

 

You've already got the macOS installer on the machine, right? If not, you'd need to deploy the installer to the machine before that command would do anything as its calling the startosinstall binary from inside the installer

Not on this machine but I also have a separate policy that downloads the installer so I added the Erase Smart Group to that just now. 

MBlank
Contributor

Thanks for all the help with this. 

MBlank
Contributor

I'm getting further into the process of getting this working. After a manual wipe and re-install of the O/S the enrollment policy ran. 

 

However I can no longer get the polices from here:https://www.jamf.com/blog/reinstall-a-clean-macos-with-one-button/ to register the same machine. Is there a way to clear this out so that that process starts up again on a machine it's already run on? 

I would imagine that the computer is no longer in your "to be redeployed" group after the erase and therefore isn't in scope anymore. If you add it back to that group, it should show up

Or at least that's my guess based on my interpretation of what's going on