I have experienced this problem before and fixed it by getting and installing a new hdd.
I think it's caused when the internal ps3 settings (dev_flash 2) get messed up. Here is a snippet of my internal ps3 settings
As you can see the ps3 has my hdd serial stored. My old hard drive did work after I installed the new one though??? so my theory is probably only 50% correct lol.