replacing hardware is always last resort. try to reformat first, see if it solves the problem. if the HD is still being detected during startup then it means its still in working order. now, if the HDD has a lot of bad sectors already, i suggest you buy a new one and make your existing HDD as a backup drive only.