Make sure sata connectors are connected from both ends. This happens when dissembling of the PS3 happens and it comes unclipped or lose. Should fix the problem
Also, you might want to try putting the HDD into a different PS3 and formatting it. Then put it back in the CFW one and reinstall FW.