When traditional Recovery Mode on a Mac is not sufficient to reinstall the operating system, Apple Configurator 2 can be used to restore the computer at the firmware level.
Typically, we boot into recovery mode, erase the hard drive, and reinstall macOS. Per
Error rendering macro 'jira' : Unable to locate Jira server for this macro. It may be due to Application Link configuration.
, some of the computers did not allow the drive to be erased:
This message indicates that the Mac is activation locked, and that we should be able to enter the activation lock bypass code from Jamf. This did not work, and a support call to Apple confirmed that these devices were not, in fact, activation locked.
Due to the lack of a usable admin account or boot drive, the only real option left was to restore the computer via the method below.
Example 2
Jonathan: When booted into recovery on an Apple Silicon Mac, I could not erase the built-in SSD in order to reinstall macOS. The error said that the drive could not be unmounted because it was in use by process 0 (kernel). Neither the GUI nor command-line version of Disk Utility could get past these errors in order to format the drive.
Revive + Restore with Configurator
This is a summary. Official documentation is here, depending on your device:
Make sure you have the latest version of Configurator
Connect a USB-C cable to the left-front port of the non-working Intel Mac
Left-rear for Apple Silicon
With the laptop off, press Power + left Control + left Option + right Shift for 10 seconds
Keep holding the power button but release the others until the laptop appears in Configurator as "DFU"
Right-click and chose Advanced > Revive
When the revive step is finished, right-click and chose Restore
For both 5 and 6, you may have to install a software update to be able to connect to the laptop
Note that the non-working laptop screen will be blank this whole time. When the process is complete, and the non-working laptop no longer says "DFU" in Configurator, you can disconnect and power on.
There will be absolutely nothing on the drive, the only choice will be Internet Recovery NEED TO VERIFY STEP 8, DOES IT ACTUALLY INSTALL THE OS?
In Recovery Mode, go to Disk Utility and erase the disk so it's ready, then install the OS