After I formatted my disk (instead of just erasing the volume), I struggled to reinstall Mac OS 10.11 (El Capitan) on my early-2009 Mac Mini (10.11 being the latest supported version.)
I tried physically removing the disk and installed a bootable installer on it, following the Apple guide "How to create a bootable installer for macOS". When I tried to install the OS this way, the OS 10.11 installer started fine, but just before the actual install procedures commenced, it gave the error: "Volume contains an OS X installation which may be damaged".
I subsequently tried installing the OS from a USB drive instead of from the disk itself. Unfortunately, I got the same error.
What would cause this error, and what would be a good way to resolve it?