Monday, September 9, 2024

How to recover from Mac Book Pro catastrophes

Synopsis

DISCLAIMER: This article applies to Intel based MacBook Pro 4th generation models with a Touch Bar (2006-2020.) The methodology given in this article may not directly apply to earlier models and may be different for Apple Silicon models.

There are many ways your MacBook Pro may get corrupted. As a result you may not be able to reboot or login. 

What do you do?

In this article I will outline a general approach on how to recover your MBP laptop from catastrophic failures. Then I'll describe specifically what worked for my usecase.

More reading: Mac Book Pro (Wikipedia)

Preventive measures against disaster scenarios

Before the catastrophe hits, you should consider what you can do to increase your chance of recovery in case it happens. 

There are three kinds of loss (from most critical to least)
  1. User data (non-recoverable); for example, photos, documents, scans, tax documents, and anything deemed to be private .
  2. Application data; for example, installed applications.
  3. Hardware; i.e. your Mac Book Pro. 
Here is a checklist:
  1. Make sure your data are backed up consistently (automatically) either in the Cloud or using Time Machine. This way you will always have a good latest snapshot of your data. For example I backup my Macintosh HD using Time Machine on an external SSD drive, an APFS (Encrypted) formatted volume which is set to trigger backup every hour. 
  2. Ideally external backup SSD drives should further be backed up and physically stored securely offsite against natural catastrophes such as fires, flooding, or theft. Even if you don't implement offsite storage, make sure your user data are not just stored on an external drive but on a cloud location as well. 
  3. Backing up private user data is more crucial than applications. You can almost always recover applications once your system is back. For example I have another external SSD APFS (Encrypted) volume synchronised with Dropbox Cloud where I keep my most critical private user data. 
  4. Against theft, make sure Macintosh HD and all external SSD drives are APFS (Encrypted) formatted with password protection, and the password is known by another trusted person at all times. This means the external SSD drives and Macintosh HD has no use for others if they are stolen or lost.
  5. Make sure FindMy application can find your laptop in case you lost it and you want to erase  it remotely to mitigate attempts of sensitive data theft.

Recovery process

Recovery is the process of restoring your laptop in working order, including full access to user data.

Your laptop can become unusable under these scenarios:

  • You erased Macintosh HD remotely against data theft because you had physically lost it. But then you found it and everything was erased.
  • You corrupted the system in such a way that you cannot login. This can happen if you mess up with user accounts, Unix permissions, or when disk corruption occurs.

More reading: How to reinstall macOS

Notes:
  • Start up from macOS Recovery procedure can be different depending on if your machine is Intel based or Apple Silicon. Make sure the read on above link carefully.
  • Whatever the recovery key option you press and hold, on Intel machines you need to wait until the Apple logo appears in order for the designated action begins.
For example, when you press and hold Command-R keys at startup, Recovery will offer the current version of the most recently installed macOS.

When you see a window with the option to reinstall macOS, this means your Mac has successfully started up from Recovery.


If you already have a Time Machine backup you may restore your system from it. 

If that doesn't work, or you don't have a Time Machine backup, open Disk Utility and repair the volume Macintosh HD. 

If that doesn't work, use Disk Utility to erase the volume Macintosh HD. Then Reinstall macOS Sonoma on newly erased Macintosh HD using the relevant option.

How I fixed my problem

I have recently acquired a used MacBook Pro 2018 (Intel.) with Sonoma macOS installed. I wanted to change the default Admin user name. 

I used ChatGPT to help me in renaming the user name. Eventually after spending hours of following elaborate ChatGPT instructions, I ended up with a machine I could no longer login. 
CAUTION: ChatGPT is a great AI tool. But beware, it can hallucinate and give you wrong answers.  Always verify the information with a second method (eg. Google.) 

Startup key combination

A MacBook Pro can be restarted with a set of key combinations each corresponding to a unique recovery scenario.

Attention: there are subtle differences between startup key combinations. For example I tried rebooting with Command-S and login but that didn't work. Later I discovered on the 
Mac startup key combinations page this feature was disabled on macOS Mojave or later."

If you have another Mac (in good working condition) you can connect to the troubled machine using Target mode. 

I  connected  my working MacBook Pro (mid-2014 BigSur) and rebooted the 2018 machine with T key (Target mode.) In this mode I could see the contents of the 2018 machine from the 2014 one. 

Target mode can be useful if you want to copy user data from the corrupt target before you erase its contents.

To fix my problem I booted the target in Recovery mode with Command-R (until Apple icon appears), then I erased the Macintosh HD using the Disk Utility option. After that I reinstalled macOS Sonoma using the relevant option.


How to recover from Mac Book Pro catastrophes

Synopsis DISCLAIMER: This article applies to Intel based MacBook Pro 4th generation models with a Touch Bar (2006-2020.) The methodology giv...