it does that when you unplug ps3 before it shuts down. when turned on it says that hard drive is corrupted, press X and the hdd will be checked for errors.and after that it will turn on normally. there was no point in taking out the hard drive. it happen to me like a 100 times.
On very rare occasions, you need to boot ps3 into safe mode and "restore ps3 system"