2 Replies Latest reply on Jul 9, 2020 9:39 AM by itaccounts1

    MacOS: DeviceWipe removes recovery partition - Workspace One UEM (airwatch)

    itaccounts1 Lurker



      I am hoping someone can shed some light on this for us. 


      I am attempting to wipe MacOS devices (mac books) and essentially "reset" them.  When I perform a 'Device Wipe' the entire partition is removed including the recovery partition.  The only way to get the machine back to a functioning state is to re-install the OS from an external source (either Apple's 'Internet Recovery' which only seems to work about 25% of the time) or from an external drive. 


      We are a remote company and this is an issue for us as we need to be able to simply wipe and re-install from the recovery partition without having users build a boot stick, etc. 


      Is there a way on the Mac 'Device Wipe' to essentially reset the machine without totally nuking the recovery partition?



      Device Actions

      Device Wipe - Send an MDM command to wipe a device clear of all data and operating system. This puts the device in a state where recovery partition will be needed to reinstall the OS. This action cannot be undone.

        • 1. Re: MacOS: DeviceWipe removes recovery partition - Workspace One UEM (airwatch)
          rterakedis Hot Shot
          VMware Employees

          Hello itaccounts1,


          Unfortunately, this is the default behavior with macOS when you issue a device wipe command.   As you can see in the MDM developer documentation (https://developer.apple.com/documentation/devicemanagement/erasedevicecommand/command?changes=latest_minor ), there is no option to preserve the recovery partition.  The only "data preservation" key is for Data Plan information (for cellular-enabled devices).   If you need an option to preserve the recovery partition, i suggest you file feedback in the "Feedback Assistant" if you're testing the macOS Big Sur developer beta.  


          An alternative that I've seen folks exploring is to instead redistribute the macOS Installer.   You can basically accomplish an automated rebuild by scripting a combination of the following:


          1).    /usr/sbin/softwareupdate --fetch-full-installer

          Use this command to pull down the latest installer file from the client.   (alternatively, you could skip this step and instead push either the VPP-based installer or push the full installer). This gets you the install bits and the command you need in the next part.   Note, some builds of macOS support fetching a specific macOS version using the --fetch-installer-version parameter.


          2).  '/Applications/Install macOS Catalina.app/Contents/Resources/startosinstall' --eraseinstall --agreetolicense --forcequitapps --newvolumename 'Macintosh HD'

          This command tells the installer to create a new partition and copy the installer to the new partition, reboot and erase the current disk, and then re-install macOS where the old partition used to be.


          Hope that helps!

          • 2. Re: MacOS: DeviceWipe removes recovery partition - Workspace One UEM (airwatch)
            itaccounts1 Lurker

            Thank you so much for the detailed reply, I'll check out your suggestions.