My late 2012 iMac has developed a problem. Initially it was hanging at boot, I reset PRAM and SMC, to no avail. Next I booted into recovery, and reinstalled a backup from several days previously, which initially seemed to work, but when it restarted the boot froze again. So I decided to install a clean Mojave (I've been having problems with the system freezing temporarily, and a clean install was on the agenda anyway), which worked fine, but again, when I restarted the boot froze again. Now it wont boot to recovery (presumably because I deleted the recovery partition as part of the clean install) and it won't allow my to do an internet recovery either. Whatever I do, it just boots and freezes.
I'd be very grateful for suggestions – my initial thought was that the hard drive may be failing? But I'm at a bit of a loss now.
Thanks for your help