Error: erase installs are supported only on APFS disks

MDS was working fine, but now startosinstall will not run without an error:

Error: erase installs are supported only on APFS disks

I have verified that I am booted to recovery partition that is older than the version of macOS I am trying to install. I have done internet recovery, and boot 10.13.6, also 10.14.6, to try to run the 10.14.6 installer. The only difference from before, when it was working, to now giving an error, is that 10.15 Catalina had been installed on these Macs for testing. But again, I have completely partitioned the drive, which should have removed all remnants, including a newer recovery partition.

It seems that startosinstall is unaware of the target drive (Macintosh HD = APFS) and thinks we want to wipe and install the recovery partition (HFS+ Disk Image). Specifying --volume /Volumes/Macintosh\ HD is not allowed with the --erase flag, but does install macOS if you erase first with Disk Utility, then manually call startosinstall --volume /Volumes/Macintosh\ HD (without the erase flag).

tl;dr Does something get changed if the Mac ever get Catalina installed, where startosinstall can’t figure out the target drive? Booting into full OS allows startosinstall to run, but not from recovery.

So If i boot to recovery on a 10.13 recovery and run a workflow to erase/install but the target disk is HFS+, it will fail?

tim

It works for me if I completely erase the drive in Disk Utility. In order for that to work, in DU you need to click the “View” dropdown in the upper left corner and select “Show All Devices”, then select the physical drive on the left and click “Erase”. Default settings (i.e. name “Untitled”) are fine.
After that I have no issues installing any macOS version I need (well, really only testing Mojave and Catalina).