It's probably not the hard drive, but it's not necessarily a problem with the cable, either. The motherboard itself could be defective. If you have an optical drive installed, the quickest test would be to swap the cables. If it still fails, then you know it's not the cable. Short of putting it in another computer, I can't think of an easy test to tell if it is the hard drive. If you have an optical drive, you could try booting from a CD/DVD, waiting some time, and then seeing if the operating system on it has crashed or can't read the disc. Plug the cable from the optical drive into the connector on the motherboard that the hard drive is using, just in case it's a problem with that specific connector and not the entire chipset.