Yes, it's the hard drive cable!!
25 minuten - 1 uur
Initially my MacBook Pro Late 2011 failed to boot, it shows a folder with question mark on it. In internet recovery, the hard drive is not even showing up in Disk Utility.
So I thought the hard drive failed. Bought a SSD to replace the hard drive. Then I tried to install El Capitan on the empty SSD using internet recovery, target disk mode, usb installer. Non of them could finish installation. So I went to Apple Genius Bar, the guy said hardware test passed, but he still could not install the system on the SSD, it might be the SSD compatibility issue.
Upon further googling, I found out it might be the hard drive cable. So I bought an external SATA hard drive adapter to verify it. The system booted without any problem with the hard drive attached externally.
It was actually not that hard, just follow the guidance and be careful with the fragile yellow sensor bracket cable. Use tweezers as people mentioned in the comment.
Whenever you MacBook Pro cannot boot, consider potential problem with your hard drive cable. It obviously happens to a lot of people with a MacBook Pro mid-2012 to 2009.
MacBook Pro 13" Unibody (Early 2011-Late 2011) Hard Drive Cable
MacBook and MacBook Pro Unibody Plastic Feet