How to uninstall Windows (bootcamp) bootloader after erasing all disks and restore macOS?
I have a Macbook 12 (2017) with Windows 10 in Bootcamp and macOS 11.1.
I've erased all disks from recovery, re-formatted the disk as HFS+, but when it starts, it tries to boot Windows and stucks on Windows Recovery.
I've tried to do network recovery, it does the first step correctly, but after reboot tries to boot Windows and stucks in Windows Recovery.
After few tries, it stucks on downloading network recovery with 5010F
error code. I've tried to reset NVRAM, seems that it's resetted (I hear two "booting" sounds), but after that it stucks on an "error" image (stroke circle). If after that I try to boot to network recovery, it still shows 5010F
error.
So, how to completely erase the disk, including Bootcamp partition, if I can't boot to macOS recovery? Is a USB stick the only solution?
You could not have erased all the disks from recovery, otherwise there would be no Window Recovery to boot to. If you used the Disk Utility to erase all disks visible in the Disk Utility, then the result could be the same as the problem you describe in your question.
In other words, you did not know the Disk Utility does not show all the disks.
The EFI partition does not appear in the Disk Utility. This partition contains the Windows boot files. If you were to erase Big Sur, then the Mac would look for bootable files and would choose Windows if no other choice was available. This boot would not succeed, if you erased the Windows partition. Reseting NVRAM would not matter. Upon startup, the firmware is going to look for an OS to boot, which apparently in your case is the Windows boot files in the EFI partition.
You should be able to boot to macOS Recover over the internet. Occasionally, this can fail do to problems at Apple's end. Using another Mac to make a USB bootable installer is another alternative. Regardless, once booted to an installer, you should be able to use the Disk Utility to erase the internal drive. However, the question "How to change USB scheme when making bootable Catalina installer?" demonstrates that the Disk Utility can fail to work properly when Big Sur has been installed. An alternative would be to enter the diskutil
command give below in a Terminal window. When this command is executed from macOS Recovery, internal drive of your Mac should be erased.
The command given below assumes the internal drive is
disk0
.
disktuil erasedisk apfs "Macintosh HD" gpt disk0