iMac with OS X Lion (10.7) had failed to boot, showing only the Apple Logo and a grey progress bar below the spinning wheel. After a few seconds, the iMac shuts itself down. The system will not boot up at all.
The grey progress bar is fsck trying to analyze and or repair a possible disk error.
In my case it was a disk full error and invalid sibling links (footnote 1). There was no more space left on the disk for OS X to allocate for write cache and other essential temporary files for it to boot up.
I obtained the analysis by first booting into "Startup Manager" and then selecting the "Recovery Disk" to boot into. From the "Recovery Disk", I started the "Disk Utility" application to verify the issue with the regular startup disk. "Disk Utility" reported that the disk had "invalid sibling links" and that I should attempt to repair the disk.
While attempting to repair the disk, the error message about the disk being full and "Disk Utility" being unable to repair the disk due to having no space left popped up in the log. The suggestion from "Disk Utility" was to back up all important files, reformat the disk, and then restore from backup.
However, I wasn't about to give in so easily. If it was a matter of not having enough free space for the disk repair to proceed, all I had to do was free up some disk space.
Here are the following steps I took to remedy this situation.
1. Boot into "Single User" mode. You will be presented with a command line interface. Startup Keys
2. Change the mounted disk mode to writeable, by issuing the following command...
mount -uw /
3. Using unix commands, navigate through the directory structure and identify non-essential files that can be safely removed. i.e. files in .Trash, or unnecessary files in Downloads, etc...
Be VERY CAREFUL when doing so. Attempt at your own risk, because in "Single User" mode and with write-mode on, you are able to delete any file or directory on the system. This means a careless "rm -fr ./" while in the wrong directory could permanently render your OS X install completely dead!
I will not go into a tutorial of how to use unix commands in this post. Feel free to google and read up on the countless tutorials online for basic unix commands. I'm not trying to be elitist, but just trying to keep the size of this post manageable; please do not use the "rm" command without experienced prior knowledge. A accidental "rm" can really ruin a person's day.
4. Back to the problem at hand, once I had cleared off all the unnecessary files, I had about 9 Gigs free.
You can use "df -h" to see how much free space you have.
5. Issue the command "reboot" on the command line to reboot the system.
6. Press "Option" key while booting up to enter into "Startup Manager" mode and select the "Disk Utility" again.
7. Repair the regular startup disk. If you had cleared up enough free space, you should not encounter the "disk full error" message in the repair log. Let "Disk Utility" repair run its course and fix whatever problems it finds.
8. Quit from the "Recovery Disk" and boot up in the regular Startup Disk. You don't have to press any keys this time.
9. Barring any unforeseen issues, OS X should be back to normal. The only task left is to start moving some of those files off the Startup Disk and onto an external drive, so that this issue doesn't repeat itself again.
Also, I can't stress the importance of using Time Machine anymore than; please use it regularly, because one of these days it will really save your bacon, when you need it most.
Footnotes :-
1. "invalid sibling link" - reference url. Please read the explanation by "MicroMat Tech3".