Note: if you are pretty certain the file is still there, and the machine still boots, but Spotlight/Apple Find File/Finder navigating files in an otherwise bootable operating system in Mac OS X 10.4 or later can't find your file, go to step 6 at the bottom.
If you are certain the data is backed up, but just want to see if you can fix whatever may be preventing to boot, you can try repairing the directory.
1. If the machine is under 4 years old, reset the PRAM:
Resetting the SMC or SMU can help for older models.
Note, if you are uncertain of the age, this step should not be taken, as it may make your machine even more inaccessible. If it works, your rebooting will be normal.
2. Power down your computer without shutting down through software.
3. Buy a data recovery program such as one of the below:
Prosoft Data Rescue (the only one I personally have used)
(See notes below about Alsoft Disk Warrior & Techtool Pro)
And buy an external hard drive at least the size of the original.
The data recovery program needs the ability to boot from CD that is compatible with your Mac model and age of Mac.
4 Make sure the hard drive is erased, and properly formatted for your Mac.
5. Boot off the data recovery program CD and attach the external hard drive.
Recover the data to the external hard drive.
Explanation of steps in more detail for those uncertain how to do them:
1. Step one requires no explanation.
2. Desktop computers just need the power plug pulled. Notebook computers with battery, obviously need the power pulled, and the battery removed if it is removable. Those notebooks whose battery is not removable, need the power button held a few seconds until the screen turns blank. If the sleep light is on after that, it needs the button held longer.
3. http://www.everymac.com/ will help isolate what Mac model you have. So can the link here:
Knowing its age, you can lookup the Mac operating system on http://www.wikipedia.org/ and determine what the release date of the operating system update your Mac had installed by default. That is the operating system the data recovery software needs to be able to boot from or later.
For instance, knowing that an 2013 early MacBook Pro was released February 13, 2013, the closest release date we can find is 10.8.3 on March 14, 2013.
Thus any recovery software would have to have that at minimum.
4. Properly formatting your hard drive is explained here
5. To boot from CD, the 'C' key sometimes won't work, and the option key is needed to do the startup manager (link explains what the Startup Manager
looks like on both Intel and PowerPC Macs).
If you can't get the CD to boot off your Mac, you may want to zap the PRAM if the machine is under 4 years old, or check if the PRAM battery needs replacing first if it is older.
Notes about Alsoft Disk Warrior and Techtool Pro: Unless you can get the machine to boot all the way to the desktop, to backup files, you probably shouldn't run Alsoft Disk Warrior, or Micromat Techtool Pro. You also shouldn't attempt a software installation, unless your data is backed up, as this will only decrease your chances to recover your data later. Disk Warrior can be used to repair the directory, but should only be done once you know your data is safely in two other locations. Techtool Pro has various hardware issue detection tools. Though you should also be aware how to run the hardware test that came with your Mac, both the PowerPC and Intel Mac versions.
Some Apple authorized dealers offer non-destructive data recovery services too which may have more powerful tools.
http://www.drivesavers.com/ has become an expensive, though very well recognized company for data recovery when the above tools don't work. No utility is perfect, and hence the reason you should always keep at least two backups of your data at all times. Still it is good to know in a pinch what your options may be.
And remember, backing up (tip on backing up link) your computer is not an option. It is required for the safety of your data. Backing up means having at least separate two copies off the computer of your data. They can be printed, burnt to CD, DVD, stored on an external flash drive, or an external hard drive. A simple action of deleting a file by hand can happen quite by accident, but also there is no such thing as permanent media out there. All media eventually fail. A remote backup will also ensure you won't be at as great a mercy of loss or theft. And monitor the consistency of your backup to ensure you don't have to remake it. Only you know your tolerance level for how much time you have to recreate data from scratch. Use that to determine how frequently you should backup, and just do it more frequently.
6. If a file is missing under Mac OS X 10.4 or later by file name search or navigating an otherwise bootable Finder, don't panic! Spotlight, the search engine available for file searching by content, also is tied to Apple's File menu -> Find File in the Finder, may make files missing if the index is done improperly. You can rebuild the index with Apple menu -> System Preferences -> Spotlight, adding the media to the Privacy section, and then removing it. The Spotlight menu will then reveal it is indexing. The image below shows you the Spotlight menu dropped down:
Once the menu no longer reveals the point it is indexing, then it should be ready to search the areas not put in Privacy in the preferences.
If indexing takes too long several third party file search by name options exist that do not take as long:
A mac may fail to boot and sit at an Apple logo or blank lit screen for one of the following reasons:
1. The PRAM battery is over 4 years old and needs replacing. In that event a reset of the SMC is needed, and not the PRAM.
2. The directory is damaged. To repair the damage in Mac OS X either use the single user mode, or prebundled system disc to repair it, or Alsoft Disk Warrior. Note, this method should only be used if the data is backed up.
Single user mode is managed through command-S booting, where the command key is the Windows key on a USB Windows keyboard, or the cloverleaf icon key on some Mac keyboards. Upon reaching the prompt repeat these steps followed by the Return key until repaired:
And once it is repaired, type
Some internet recovery machines will give you access to Disk Utility on boot. Use the Repair Disk option from Disk Utility to effect a directory repair. You can not repair disk from a fully booted computer, only from a system that provides it on boot directly. Prosoft Data Rescue offers the least destructive data recovery option. Micromat Techtool Pro is a close second. When none of these tools work, Drivesavers is an expensive forensic data recovery company that is able to rescue from some catastrophic media damage and failure.
3. The drive is dead. Replacing the drive with a bootable system is needed. For Internet recovery Macs, that can be done with command-Option-R boot once the new drive is installed.