Installing Mavericks or Yosemite on Mac laptop after battery failure

Had a number of issues with installing Mavericks or Yosemite on Macs that have had a dead battery.  By “dead” I mean, either run flat and left in a cupboard or on a desk for a week or more before we’ve got around to rebuilding them, or where the battery itself has died and needed replacing, before the software is rebuilt.

Each time we’ve had to do it, we’ve ended up scratching heads and usually ended up simply cloning a hard drive from a working machine.  Today, I had some time waiting for other tasks to complete, and managed to hit up Google for some research, one common thread hit me…

When a laptop battery dies, chances are that if you leave it long enough, any onboard backup battery for CMOS/BIOS/PRAM/NVRAM or whatever other backed up settings, and the onboard realtime clock, will eventually go flat too.

Usually the first sign on replacement or recharge is that the date and time are wrong.  So the first thing a Mac can do is either prompt the user that the date and time are wrong and need resetting, or if it’s already online it can contact an NTP server and correct itself.  But when you’re installing from scratch, it does neither of those things.  In fact, it doesn’t even show you what the date and time are, unless you go well out of your way and ask it.  So the first sign that something’s wrong at this stage is that you get an error message, like:

  • “An Error occurred while preparing the installation.  Try running this application again.”
  • “This copy of the Install OS X Yosemite application can’t be verified. It may have been corrupted or tampered with during downloading.”

The fix, to get an install going here this afternoon, was easy:

  1. Get the installer booting, either from an external USB drive, or from Target Disk Mode from another working Mac.
  2. Once the installer is loaded and showing you the main menu, you should be able to see the “Utilities” menu. Click on it, and go to “Terminal”.
  3. Check the current date and time from your watch or another machine/clock/device of your choice.  Convert it to the following numeric format, so that 6:15pm on 4th December 2014 becomes 120418152014, following the mmddHHMMyyyy format.
  4. Type the following into “Terminal”:  date {mmddHHMMyyyy string above, without these funny brackets}
  5. Press enter, if you haven’t done so already.

Date and time should now be accepted, and Terminal will confirm this.  If you did it correctly, the installers should now work without either of those errors.  Worked like a charm here!

Without Google, and particularly its quick realisation that I needed to be looking here, I’d never have even thought to check something like that, to get something like an installer going!

Mid-2012 MacBook Air 13″ – fixing one form of “Black Screen of Death”

Various online forums are abuzz with MacBook Airs of 2012 and 2013 flavours suffering the “Black Screen of Death” – apparently the machine, mid-use, decides to either shutdown completely, or just shut its display off.  It’s the latter case I’m most interested in here, since a colleague just presented me her Mid-2012 128GB 1.8GHz 4GB-RAM model.  It’s still exactly as it was when it came out of the box.

The problem

The machine shutdown mid-use, and subsequently would only boot as far as turning on the display backlight.

The (apparent) solution

The PRAM (Parameter RAM) reset – hold down ALT, CMD, P and R keys together immediately after pressing the power button.  While the keys are held down, the machine will reboot with a “Clang”.  I usually hold the key-combo down until the clang has happened three times, releasing the keys on the third.  This may be a superstition as one cycle might be enough, but from my bad old days doing the same trick on older G4-based iMacs this is a habit that still hasn’t been shifted.

The result

The MacBook Air immediately booted as normal, and within a few seconds I was greeted with the usual File Vault 2 login screen, and the machine has behaved impeccably since then.

Further preventative maintenance

Apparently the machine had missed a few software update cycles, so I installed everything available, including a Thunderbolt firmware update and the recently-released 10.8.5 update.