In case anyone else is experiencing this problem, this is what I have found out from the computer repair person in my area. Apparently these HP models have been having problems connecting specifically with Western Digital hard drives, all of a sudden even after working correctly for years. In my case, the motherboard is also acting a bit shifty / glitchy. The repair person said I could get a different model hard drive and it would work but still have freezes and resets. He also said I could choose to get a new motherboard instead and solve the main issue. Obviously I am going with a new motherboard.