I was going to jump in with bad HDD cable or bad HDD, but you've fixed it. One of my housemate's systems was being a pain in the ass for months with random crashes and lockups, I tried everything to fix it, one day I snapped and just tried a different SATA cable - boom, it works fine ever since. Must've got a dodgy one boxed with his mobo.