Nearly always this problem is due to the mainboard IDE header coming loose from it's solder pads.