I'm trying to perform a clean install of macOS Sierra on a late 2009 iMac, but I can't get it to work. The installation comes up with errors every time when it's almost finished. As I've tried a lot of things, I'll list them up first as they come with different errors.
Something also notable is that the iMac first failed an upgrade from El Capitan to Sierra via the Mac App Store. It gave the error that the installation had not been successful and should be run again. This, of course, did not work.
As there were only old files on the iMac, I decided to perform a clean install. First of all I erased the HDD via macOS Recovery. This all went well without any errors. I rebooted the iMac and went to Recovery and had selected the option to install macOS Sierra. After a long time waiting the installer finally ended up with the error: The installation was unsuccesfull, please try again. So I thought that maybe the installer was at fault so I created a bootable USB.
First I created a bootable USB via my MBP 2016 using the Terminal. It all went well and the USB was located in the Finder as Install macOS Sierra.
I plugged in the USB to my iMac, held the option key and than the USB didn't show up. After long Googling I found that unplugging and plugging the USB back in while the screen of 'select bootable' was shown, did work. So I selected the USB and went through the process again. But again with the same result. After some more Googling I tried to reset the PRAM with the commandoptionpr keys and booting it up twice. Same result again.
I than erased the USB and created a new one via the MacDaddy install disk creator. It showed fine in the Finder on my MBP, but the same as the first time for my iMac. And the installation gave the same error.
After some more Googling, I tried to reset the date via the recovery Terminal, via the format: date mmddHHMMYYYY. It than gave a new error upon installation: "The installer payload failed signature check".
After more Googling I tried to reset the date via the internet command in Terminal. This reset the date to American Timezone (time.apple.com). Again, with the same results.
Resetting it back to my own timezone via the date command, to be really sure I inserted the correct date, the installation came back with the first error: "The installation failed, please try it again".
I can't find any other solutions on Google and I really hope you guys can help me out.
NOTE: The error messages were in the Dutch language, so I've tried to translate them as best I can.