It might be the IDE header on the motherboard which is giving you problems with an intermittant connection. Another possibility is the IDE cable itself not being crimped properly. Have a look in the FAQ for pictures of a bad cable. You can either try to recrimp it yourself or order one off Eutronix.