Chosen Solution

I have this 27" iMac, intel i7, late 2009, running sierra. Eventually the hdd failed, thankfully I had everything backed up with time machine, so I bought a250gb samsung 850 EVO ssd and following the ifixit guide, I placed it on optical drives’ position. Before installing the ssd, I could only boot on safe or recovery mode. That’s the case also after installing the ssd. In both modes I can see the ssd in disc utility, partition it, erase it etc. So I went on with installation of Sierra, but it cannot be completed. The installation begins, the message of “x minutes to be completed” appears, it finishes, the computer restarts, the apple logo appears again with the progress bar underneath and, after a while it freezes. No messages of something going wrong etc. It just freezes. The progress bar stops and nothing is happening. I have tried installation from safe mode with the Sierra installer, from recovery mode using the reinstall sierra option, I have tried restore the system from time machine (also in recovery mode) and, I have also tried using an external bootable usb sierra installer and an external bootable usb yoshemite installer. Nothing. All options stop at the same point mentioned before. Any hint would be highly appreciated. Update (04/18/2018) Just to close this up, it was a GPU problem. Since there was no other solution, I ended up baking the card and, to my surprise, it worked ! I do not know for how long will it last, but it works…

Are you able to boot up under an external drive?