Sunday, August 20, 2017

Giving an old Mac a new lease on life

Update: August 24, 2017: Added section about enabling TRIM

This weekend, I upgraded my daughter's 2011 MacBook Air with a new SSD and battery and gave it a new lease on life. Although this computer is six years old, it still has no problem handling all the tasks she uses it for: web surfing, photos, Microsoft Office, music, YouTube and other related tasks. But after all this time, the 120G SSD is getting full and the battery only lasts about an hour on a full charge. The computer was also running a pretty old version of macOS - 10.7 ("Lion") was released in 2011 and hasn't seen an update since 2012. Because of this, several other key applications, including Firefox and Chrome were also old and out of date, and were in need of upgrades.

If this was a current-model Mac laptop, these upgrades would be impossible, since current models have glued the battery to the case and soldered the SSD to the motherboard, but Apple has not (yet) made these anti-repair changes to the MacBook Air series.

To upgrade the computer, I bought a 480G SSD upgrade kit and a replacement battery for it. Total cost was approximately $380. The kits include the special screwdrivers needed for installation and a USB enclosure for the old SSD (more on that later).

The first step before starting any major job like this is to make a full backup of the system. It's actually a good idea to make two full backups, just in case one fails, since you really don't want to have to explain why everything got trashed, should the upgrade go wrong. I had already purchased two external hard drives for my daughter to use in college (a 2TB portable drive and a 4TB desktop drive), so I used them to hold bootable full-system backups. After using Apple's Disk Utility to re-partition the drives for a GUID partition table and format each with the Mac OS Extended file system, I used Carbon Copy Cloner to copy the system's recovery partition to the external drives and make a full bootable backup of the system. After test-booting the computer from each of the backups (hold down the Option key while booting, then select the USB drive to boot from it), I was all set to upgrade the computer.

I don't have photos of the procedure (didn't think about it until I started writing this article), but if you require detailed instructions, iFixit has detailed repair guides for most Mac computers. For a 2011 11" MacBook Air, they have repair guides for both the battery and the SSD.

The procedure I followed to do both upgrades at once was:

  1. Whenever working inside of a computer, be careful about static electricity. Wear an ESD wrist strap if you have one. If you don't and you don't want to get one, work on a smooth (non-carpeted) surface and touch grounded metal (like a steel lamp or table leg) often while you are working. And never touch exposed circuitry on anything you handle while working.
  2. Remove the 10 screws from the back of the case. This requires a special pentalobe screwdriver. The upgrade kits I purchased include this screwdriver. When removing them, note that there are two long screws and eight small ones. Be careful to not mix them up later on when reassembling the computer.
  3. With the screws removed, the back case comes right off. Set it aside so it doesn't get damaged when you need it later.
  4. Locate the connector that attaches the battery to the motherboard. You can disconnect it with your fingers, but you will find it much easier if you use a plastic spudger Do not use any metal tools - they can damage the plastic connector. Do not use force - the connector should come off without much effort. If it seems too tight, look more closely. You want to disconnect the battery's connector from the motherboard's connector. You do not want to pry the motherboard's connector from the motherboard - if you do that, you will cause permanent damage and will probably have to buy a new computer.
  5. With the battery disconnected, remove the five Torx screws that hold it in place. The upgrade kit I bought included the screwdrivers. Please note that these screws come in three different lengths. Be careful to not mix them up.
    How to install the old SSD in an OWC Envoy enclosure

    Although you can simply discard the old SSD (if you do, I recommend destroying it, since it will likely contain data you would not want someone else to get), if it is still working, you may want to keep it around for use as an external USB drive. Other World Computing sells the Envoy enclosure for just this purpose. The replacement SSD kit I purchased includes this enclosure, and I used it.

    To install the old SSD in the Envoy:

    1. Open the Envoy (it consists of two aluminum case halves) and remove the plastic packet with its two mounting screws
    2. Attach the old SSD to the Envoy's circuit board
    3. Place the SSD (now attached to the Envoy's board) in the lower half of the case. It can only fit one way (with the micro-USB3 connector passing through a hole in the side of the case.
    4. Put the top cover on the Envoy and secure it shut with the two screws. Use the longer screw for the thicker part of the case and the shorter screw for the thinner part of the case
    The Envoy includes two self-adhesive rubber feet to go on the bottom. Peel them from the backing and place them on the case. There are indentations where they belong, but I noticed that these indentations are where the screws go. Since I may want to re-open the Envoy in the future (e.g. to put in a different SSD after upgrading another computer), I attached the feet next to these indentations, leaving the screws exposed.

    And you're done. Attach the included USB cable to the Envoy and use it like any other USB storage device.

  6. Remove the old battery and set it aside.
  7. Locate the SSD. It is held in place by one Torx screw. Remove it and set it aside. Slide the SSD from its socket by sliding it horizontally. You can lift it a little, but try not to - you don't want to accidentally damage the socket.
  8. If you bought an enclosure for the old SSD, now is a good time to install it. (See sidebar)
  9. Install the new SSD. Taking care to avoid ESD damage, remove it from its packaging. Gently press it into its socket until it is firmly seated. If it doesn't fit easily, note the orientation of the connector. It is not symmetric and will not fit if the SSD is upside-down. Once the SSD is seated, secure it using the Torx screw you set aside when removing the old SSD
  10. Place the new battery in the computer. It is on a plastic frame that will align with the five screw-holes in the case. Make sure its connector is over the motherboard's battery connector. If it isn't, then you have the battery upside-down. Secure it to the case with the five Torx screws you set aside when removing the original battery. Be careful to use the correct screws - there are three different sizes and you will cause damage if you put them in the wrong place. Do not over-tighten the screws or you can strip the aluminum base.
  11. Snap the battery's connector to the motherboard's battery connector. Look closely to make sure all the pins align correctly and then press firmly until you hear it snap into place.
  12. Put the cover back on the computer and secure it with the ten pentalobe screws you removed when opening the computer. Be careful to use the correct screws - there are two different sizes and you will cause damage if you put them in the wrong place. Do not over-tighten the screws or you can strip the aluminum base
At this point, the hardware upgrade is complete. It's now time to copy the system software onto the new (and currently blank) SSD and install necessary upgrades.

To copy everything to the new SSD, boot from one of the backups. I used the old SSD (mounted in its USB enclosure) because it is much faster than the hard drives I used for backups. Attach the backup drive, hold the Option key while booting and select the external drive to boot from it. The boot sequence will take longer than you're used to - this is inevitable because USB 2.0 (what the Mac Book Air has) is much slower than the internal SSD interface and hard drives (if you booted from a hard drive backup) are much slower than SSDs

When the system has booted (from the external drive), use Disk Utility to partition and format the new SSD. As with the backup drives, use a GUID partition table and format the partition using Mac OS Extended format.

Now, clone the external drive to the internal one. Use the same software used when making the backup. Using Carbon Copy Cloner, I first copied the recovery partition to the new SSD, then cloned everything else to the main partition.

Once everything has been successfully cloned, shutdown the computer, disconnect the USB drive, and boot from the (new) internal SSD. It should just work at this point. After booting, go to the Startup Disk system preference to select the internal SSD, because the old value will be invalid (pointing to the no-longer-present SSD), causing the system to boot more slowly than necessary.

And now it's time to upgrade the software. This part actually made me more nervous than the hardware replacement because I was going to be jumping forward five macOS releases, going from 10.7 ("Lion") to 10.12 ("Sierra" - the current version). Fortunately, everything went smoothly. Launch the App Store and click on the Upgrade tab. There is a giant ad at the top of the window requesting an upgrade to Sierra, including an "Upgrade" button. Click it.

At this point, the Sierra installer downloads (about 5GB, which took about 35 minutes to download over a 25Mbps cable modem). Once downloaded, the installer starts to run. It will ask you to click a button to begin installation and then ask for an administrator password. Provide this information. The system will reboot and installation will continue. It will take a while (over an hour), but you can't just ignore it, because there are two or three times where you will have to click a button to continue. When finished, the system will boot up to a Sierra login screen (or the account you have configured for auto-login, if you have configured that). When you log in, you will be asked for your Apple ID and password for setting up iCloud, and if you want to set up Siri. You can skip both steps, if you wish. Please note that every user on the computer will be presented the same setup windows the first time he logs in after the upgrade.

But you're not quite done yet. Go back to the App Store's Updates tab and look for more updates. In my case, there were several. There were two application updates (iPhoto and iMovie), a Thunderbolt firmware update, and updates for iTunes and updates for printer drivers. You may have to reboot as a part of some of these installations. Repeat this process until no more updates are available. (For some reason, the Thunderbolt firmware update needed to be installed twice before the App Store stopped asking me to upgrade it.)

To TRIM or not to TRIM?

When you use the trimforce command to enable TRIM for a third-party SSD, you are presented a very long warning screen stating that you are going to enable TRIM for all devices, including those that "may not have been validated for data integrity while using TRIM" and that "Use of this tool to enable TRIM may result in unintended data loss or data corruption."

Really scary stuff. So should you do it?

This warning is presented because in the past there were some SSDs with bad implementations of TRIM, and enabling TRIM on such an SSD would result in data corruption. But today, any SSD you buy should have a reliable TRIM implementation. So enabling TRIM should be harmless (unless you have an old-model SSD), but if you're paranoid about safety, you might not want to enable it.

On the other hand, many SSDs can run into performance problems (due to write amplification) over time if you don't enable TRIM. So if you're concerned about maintaining high performance, you may want to enable it anyway.

In my particular case, OWC writes in a blog post that their SSDs do not require TRIM to maintain performance, but also have no problems if it is enabled (as long as the latest firmware is installed, which is the case for the new one I bought). I enabled it.

With macOS fully upgraded, the next step is to update applications. I used the auto-update features of Firefox and Chrome to bring them to the current versions. I had to repeat the process multiple times for Firefox - it won't jump all the way from version 22 to 55.0.2.

Next, update Microsoft Office. After launching an Office application (I used Word, but any one will do), I was asked to re-authorize the installation. I assume this is because the new SSD caused its hardware ID to change. Fortunately, I retained by license key from the original installation (printed on the DVD's sleeve). I typed in the key, Office accepted it, and the applications launched properly. I then used the Microsoft auto-update tool (select "Check For Updates" from the Help menu) to download and install all available updates, repeating as necessary until there are no more updates to install.

Next, enable TRIM on the new SSD (see also sidebar). Apple's SSDs support TRIM out of the box, but third-party SSDs (including the one I bought) do not. (You can check TRIM support using the System Information app. Look on the SATA page to check the TRIM status of each drive.) In the past, you would need to install a third-party piece of software (like Cindori's Trim Enabler) to do this, but the current version of macOS has the support built-in. You simply open a Terminal window and type "sudo trimforce enable" and then type "y" in response to the big and scary-looking warning. The OS enables TRIM and (after a minute or two) reboots the computer. And you're good to go.

Finally, calibrate the new battery. Although Apple doesn't consider this necessary for modern Macs, the battery's manufacturer explicitly requests (as a part of its installation instructions) that this be done, so I did. I followed the link included with the battery and followed the documented procedure.

And now it's all good to go. My daughter's computer now has four time its original storage and a brand new battery and is all ready for use when she goes off to college next week.

No comments: