Hi!
Well, try to reinstall the software first. If this failed, maybe the other HDD is broken as well.
Try replacing it for an SSD and reinstall the software completely.
Does that work?
It's most of the time HDD related. So it's probably the HDD again.
Software can be found here: [link|https://www.playstation.com/en-us/support/hardware/ps4/system-software/|How to update system software on a PS4 console|new_window=true] (you need the PS4 console reinstallation file).