This process worked to get a 2018 mac from eBay working with fresh install Catalina. It used a USB for fresh install but the process may also work with a recovery mode configuration on a mac that is running already. Either way, the main disable happen from recovery mode.
Reformat and install from 16GB USB stick
- Download Catalina from Apple Store to a working Mac
- Create USB boot stick with free program DiskMaker X
- Eject stick and reboot mac
- Press Option Key as soon as u see the Mac apple
- Choose to boot from USB Key - On this attempt, there was a message stating "A software update required to use this startup disk". Apparently the installer needs to peek at Mac server to see if it knows the Mac is enrolled in a management scheme and update, or it may be confused by mac T2 chip. It failed until the internet connection was established. With a wifi or ethernet connection it went through the installer update and was happy. Booted again to USB and continued like usual.
- Open Disk Utility
- Locate computer hard drive and choose Erase
- Close disk utility
- Do Install new Mac OS from USB
- When it tries to setup, don't do anything. Just shut down and reboot again to recovery mode using Command + R keys just when u see the Mac apple.
No reformat. Start here if u did not install a fresh
- Reboot mac and use Command + R key to enter recovery mode.
Disable Daemon, Agent and Phone home
- In recovery tools choose Terminal from the Utilities menu
- Do following command
- Reboot and go again to recovery mode with Command + R key.
- Use Disk utility to mount main Mac disk, if it is not mounted.
- Close Disk utility
- Choose Terminal from the Utilities menu
Type carefully the following commands in Terminal to prevent the MDM robots starting up
cd /Volumes/Macintosh\ HD/System/Library
mkdir LaunchDaemons.disabled LaunchAgents.disabled
mv LaunchDaemons/com.apple.ManagedClient* LaunchDaemons.disabled/
mv LaunchAgents/com.apple.ManagedClient* LaunchAgents.disabled/
Type carefully the next commands to send inquiries to blackhole
echo "0.0.0.0 iprofiles.apple.com" >> hosts
echo "0.0.0.0 mdmenrollment.apple.com" >> hosts
echo "0.0.0.0 deviceenrollment.apple.com" >> hosts
echo "0.0.0.0 gdmf.apple.com" >> hosts
Last enable System Integrity Protection
Reboot the mac
Skip internet on first go
As going through setup, when prompted to establish a internet connection do not allow the connection. Skip it until you can click "Continue without an internet connection" and complete setting up the admin account and other features as prefered.
When all done and in the admin account it was possible to connect internet and have been rebooting it numerus times now and did not get the enrollment prompt again.