Run a memory checker such as click here and see if the memory is OK.
It may still be a hard drive problem, but it's better to check the memory first, as replacing a hard drive unnecessarily is an expensive option.
If you have a spare (known good) ribbon cable, you could try changing that as well. While your inside, make sure all connections are secure.
Also, make sure the BIOS is up to date. I had a machine once that caused no end of problems with freezing, and a BIOS flash solved them. But proceed with caution on that. Not to be taken light heartedly. BIOS flashes incorrectly done, can trash the motherboard.