An Odyssey of Mac Recovery

2018-09-30 10:17


Tl;dr — MacBook Pro broke, wouldn’t boot; fully restored 30+ hours later. Some may be interested in a record of the steps to recovery and the (to me surprising) extent and depth of Apple’s recovery tools. This was the first occasion I had had to follow that road right to the end. 

So this happened. Woke up Wednesday morning the 21st of September, 2016, to a query on my 2011 MacBook Pro as to whether OSX should install the update that had been downloaded overnight.

Said yes without even checking what kind of update it was. To date, my experience overall with updates and even upgrades of OSX had been benign. (I later learned that the update consisted of Safari version 10 only.)

Machine wouldn’t boot thereafter.

Here’s the behavior: OSX collects password to unlock FileVault, goes into boot sequence, gets as far as Apple logo on white screen with progress bar (about 75%), and screen goes black. 10 seconds go by before a quick flash of logo on white; 10 more seconds; flash; rinse repeat forever.

Tried booting into Verbose mode (hold down cmd-V at startup). This worked, and gave me visibility into what was happening in those brief flashes between the 10-second blacknesses. Each flash represented two or more lines of screen output in the Verbose mode.

I captured video of the verbosity during the failed startup, via iPhone handheld. Tried freezing the playback to discern those lines of output; but they were too blurry to resolve. The exercise didn’t tell me much.

“Received {unreadable} error” and “reposting aInt8InterruptPipe {??}”

Tried booting into Target Disk mode (hold down T) in order to mount the Pro’s disk on another machine. This worked, but I then found that the MacBook Air I was going to use to mount the disk was new enough that it didn’t have a Firewire port, as the Pro did; only Thunderbolt. And the venerable Pro, of course, didn’t have Thunderbolt. And I didn’t have a Thunderbolt-to-Firewire adaptor (I do now).

Tried booting into Safe mode (hold down shift). Failed, looping; nothing changed.

Tried booting into Single User mode (hold down S). Worked, but I didn’t know what to look for once at the Terminal-level (BSD Unix) prompt. In retrospect, maybe I could have checked /var/log/syslog.

Tried booting into Recovery mode (cmd-R). Worked. Came back to this later.

Tried resetting the “PRAM” (parameter random-access memory; now called NVRAM or non-volatile RAM) — cmd-opt-P-R. No change.

Tried resetting the SMC (System Management Controller) — hold down (left) shift-ctrl-opt and press the power button once; release all and then hit power again to boot. No change.

Booted into Recovery mode. Ran Disk Utility and did First Aid on the disk volume and the mounted volume. No reported problems, and no change.

Booted into Recovery mode. Reinstalled OSX over the existing install, i.e. without erasing. No change.

At this point I tried to schedule a Genius Bar appointment. There are five Apple stores in the Twin Cities (the Metro is fortunate in that way); the earliest appointment at any of them was three days out! (I could have driven to Chicago, 6 hours, and gotten an immediate appointment.)

So I called AppleCare. The next three steps below were taken under their guidance.

10  Ran Apple Diagnostics / Hardware Test: start while holding down opt-D. This downloads a minimal OS and a test suite. I hadn’t known about this capability. Pretty neat! Diagnostics ran clean; no change.

11  Booted into Recovery mode. Ran Disk Utility and erased disk and restored all from Time Machine backup. The backup was from Sept. 19, two days before, so not all that much was lost. But: No change!

So whatever had gone south had happened more than two days back; I just hadn’t noticed because of not rebooting (my Mac showed uptime of 10 days when I had first acceded to that update). It was beginning to look as if it wasn’t the update that caused a problem; it was merely the reboot that revealed one.

12  Booted into Internet Recovery Mode: hold down cmd-opt-R while starting. This downloads the recovery software from Apple’s servers and lets you install the original version of OSX that was present when your hardware was new, not the version currently running. When all had finished downloading, I noted that the OS version was Lion, 10.7. But: Lion couldn’t be installed over a later version! The Apple tech was gobsmacked. Apparently she had never seen that happen. That “original install” was the final arrow in her quiver.

Not being able to refer me to an Apple Genius, at this point the tech gave me the number of an Apple authorized repair shop in Minneapolis: The Foundation.

I called there Thursday morning and spoke with Dan. He said I had already tried almost everything that they would do if presented with the failure I saw.

But he had one further step to try:

13  Wipe the disk totally, install fresh from the Recovery partition, create a new user account, then restore user data from the Time Capsule using Migration Assistant. (Restoring data via this route presents a way to resolve any conflicts with the user ID of the new account, vs. the one in the backup.) Presumably this would undo whatever file(s) had gotten the wrong permissions (my best guess) and were causing the boot loop.

And so it did. I had my machine back after more than 30 hours of getting my online fix through the very small window of an iPhone. As far as I could see nothing was broken and nothing was missing.

[ Note added 2019-12-15: ] In a later incident, I had occasion to recover a Mac whose user had lost the passwords to the two accounts on it. Here are two steps in the process toward this end that I just learned about.

14  Boot into Recovery mode (hold down cmd-R). From the Utilities menu select Terminal; type resetpassword and Return. This brings up a dialog from which you can reset the password of any account on the Mac.

As it happened, on this Mac this method did not work; the dialog wanted to collect a password in order to reset a password! I called Apple support and learned of the following workaround:

15  Boot into Single User mode (hold down cmd-S). Once you see the prompt "localhost: root #" type mount -uw / and Return; then at the next prompt type rm /var/db/.AppleSetupDone and Return.

Now the next time you boot the machine it will take you through the dialog for setting up a new Mac. You can create a temporary login account with administrator privileges. From that account you can open System Preferences > Users and change the passwords on the other accounts on the system.

(This account was first posted in slightly different form on Medium.)

P.S. — When this piece was posted here, Googling for the supposed error message incorrectly guessed from the fuzzy screen shot above — “reposting aInt8InterruptPipe” — resulted in exactly one hit: this very piece hosted on Medium! Now you get two hits.