I have no idea what that cable is for. If you follow it back to its source you should be able to figure it out. Don't plug it into the pin header unles you are positive that it's for that cable.
To test the hard drive you can use Hitachi's Drive Fitness Test
. It will test the mechanics of the drive. It's available as an ISO disc image for a CD. You will need a burning program such as Nero, Roxio or the free CDBurnerXP Pro
to burn the image to a new CD.
To run the program simply leave the disc in the optical drive and reboot the system. Make sure the BIOS is configured to try to boot from the optical drive before it tries to boot from the hard drive. Choose to run the full test. Also navigate thru the DFT menus to check the SMART log to see if the drive has a record of any failures.
If the drive passes these tests and the SMART log is empty then the drive is probably OK. This would mean that the OS needs to be reinstalled.