What a coincidence, I just had this issue with my SSD (a month or two ago). I hope you have a backup (unlike stupid me) otherwise it will be an extreme P.I.T.A. This comes from experience involving talking to lots of Apple cutomer support representatives and many community members.
I never was, and am not an Apple technician. Contact Apple support, and you might receive better instructions. My method involves lots of praying and does not contain any super-secret terminal codes. Sounds good? Let's jump right in!
- Unplug you battery from your Mac while poking around its internals. Believe you me, I speak from experience.
- Wall of text inbound.
Step 1: What is the Mac telling us?
Let's start off with the meaning of this sign. The folder with a question mark tells us that your Mac cannot find a startup folder. This can happen because of a few reasons. The next step will be pinpointing the issue.
Step 2: Determining the cause
We need to find what the issue is first to troubleshoot it. There's always the off chance that some SATA cable came loose, and you simply need to plug it back in. So make sure all the wires are plugged in firmly. There's also a chance the wire itself is damaged, so if you have a HDD enclosure try plugging the HDD into that and see if it gets recognized in disk utility. If you don't, you might want to purchase one or even buy a replacement SATA cable for your Mac. Another thing that may sound stupid but worth trying is - making sure your HDD is screwed in properly.
If you did all of that and your HDD still refuses to be recognized, we know that the problem is in the HDD itself. Here I can only think of 2 possibilities:
- A damaged indexing component. In my case my volume header wasn't functioning normally. I fixed it via recovery.
- A dead Hard Drive. I won't lie to you, this unfortunately seems to be your case. But never lose hope!
A word before we get our hands dirty: If you can boot into recovery (command + R) on your damaged disk, not over the internet or from another disk, there is almost no possibility of your disk being dead. Same goes for booting into safe mode (press shift on startup). So try these out first!
Step 3: Troubleshooting
You seem knowledgeable about basic recovery techniques such as: Changing the boot disk via the option key, booting into native recovery, booting from a recovery disk, booting into safe mode, etc. That's why I will not explain too much about the how to do things. Let me know if you need more detail.
By now I would assume that you have an HDD enclosure or some equivalent accessible to you. Here I can only tell you one thing: make sure you use one that is supposed to work with all HDDs, otherwise the voltage might be too low and that prevents the HDD from firing up. If you feel vibrations, that's a good sign. Now this may seem fruitless to keep checking if everything external is alright, but hear me out. In my case I first plugged my SSD in via the internal SATA cable. Did not work. I tried with an HDD enclosure lying around. Nada. I bought a new enclosure, to no avail. What was happening? The SATA cable was broken, the HDD enclosure lying around had too less voltage and the new enclosure was faulty. Anything is possible! By now the drive should have popped up in disk utility. If it has, use the verify option followed by the repair option. It usually works. If it doesn't tell me and I'll guide you through other troubleshooting techniques.
Your disk still isn't being recognized? Chances are, your HDD has failed due to defects or age. It may seem cruel to have gone through a huge answer and then end up with this conclusion, but nothing can be done here. Your best chance is to unplug your HDD ASAP, not use it and take it to a technician. If you're feeling brave and there is not much valuable data, you may try DIY data recovery (find steps for this online). If there is valuable data, screw the technician and search for a data recovery center with a good recovery rate and rush right to it. If this happens you should also check out @Allan's answer to that other question.
Other software like DiskWarrior also exist, which are more specialized than disk utility for recovery purposes. However, they still require the disk to be recognized. It basically means that if disk utility detects the disk but fails to fix it with the repair option, you can try out DiskWarrior.