My Macbook had a major aneurysm this morning; after locking up, it refused to log me back in, giving an error message of “You are unable to log in to the user account [name] at this time”. One discussion suggested a simple password reset, another more pessimistically cited a reinstall of OS X. Since the password reset didn’t work, I suspected corruption in my FileVault-encrypted hard drive. Unfortunately, the only instructions to repair it required another user account on the machine, and I found no way to create one from the install/repair disk. I resigned myself to a reinstall, though at least here you get the option to carry over your files, which I found actually worked a little too well. First, though I had to go into the shell to manually clear up some space the reinstall (/Developer, /Applications/iWork ‘06 Trial, /Library/Audio, and /Library/Printers were all big directories that were going to be reinstalled anyway). When it finished, I got the login screen, with the same single account as before, and the same error! (The archive and install option never prompts you to create additional accounts.)
Digging around a bit more got me the command to boot into single user mode (hold Command-S on boot), where I was finally able to create another account from the command line. (Piping the new information didn’t work; I had to run the command and then enter the information followed by a Control-D to end the input.) Finally able to log in to a working account, I repaired the FileVault image, only to find nothing was wrong with it.
I created another user account, enabled FileVault, and then replaced the name.sparseimage file with my previous one. Logging back into this account, OS X didn’t actually use the image, but did unencrypt it into another directory. Weird, but at least it got my files back into a normal state where they could be copied into a normal home directory. Logging into that account finally got me back to my previous state. Whew!
I did briefly consider a few other options:
- The Genius Bar at the Apple Store, but the earliest appointment they had was tomorrow night.
- A clean install and restore from backup, but as a laptop the nighly cron job tends not to run and would still require reinstalling all my applications.
Things I learned:
- Even Macs break
- Knowing Unix is still quite useful
- Backup, backup, backup!