Can't reinstall macOS on M3 iMac
I recently noticed that macOS on the M3 iMac was a bit unstable, so I tried erasing it and reinstalling macOS. I went to recovery, then erased the APFS volume group that contains the macOS data volume. However, when I tried reinstalling, it displays an error saying that I needed to erase the Mac first. Keep in mind, I already erased the APFS volume group. I tried erasing the device instead from Disk Utility (Command+Shift+2) then selected APZ xxxxxxxxx Media, but it wouldn't unmount because the kernal was using it. I tried this with both a USB installer and Internet Recovery, force unmount and erase from Terminal, and also many restarts, and power connects/disconnects.
iMac (M3, 2023)