Follow The Safe Mac on Twitter to stay advised of the latest Mac security news!
Posted on April 11th, 2013 at 11:11 AM EST
For whatever reason, you have decided that you want to reinstall the system from scratch, restoring your machine to an “out-of-the-box” state. Regardless of the reason, this is not something to be undertaken lightly. The possibility of data loss looms any time you erase your primary hard drive. Further, if you do the job wrong, whatever problem you’re trying to solve may not even be solved. Fortunately, there are some easy steps you can take to do the job right.
Before I start, note that if you are trying to get the machine ready to sell, you should follow some slightly different directions. See How to prepare your Mac for sale.
Step 1: Back up!
Backing up your data is something you should be doing on a regular basis – every single day, for most people. However, any time you propose erasing your primary data storage, it becomes critical. You must do it right, or you will risk losing data. So how do you do it right? Most importantly, make redundant backups. If you only have one backup, remember that when you erase your hard drive, those backups become the one-and-only copy of your data. That’s an extremely vulnerable state to be in. Don’t put yourself in that state. Before erasing the hard drive, make sure you have a minimum of two completely separate backups, on completely separate media, and preferably made with two different backup programs. I highly recommend Time Machine to back up to one hard drive or a Time Capsule, and Carbon Copy Cloner to back up to one or more additional hard drives.
For more details, see my Mac Backup Guide.
Note that, for the purposes of these instructions, I will assume that you have a backup clone (ie, an exact copy of your hard drive’s current state) made with something like Carbon Copy Cloner.
Also, note that if you’re running Lion or later (Mac OS X 10.7 and up), before making that clone backup, it would be extremely helpful if you were to run the following command in the Terminal (to make sure your user Library folder is visible on your backup):
chflags nohidden ~/Library
Step 2: Erase the hard drive
If you plan to install Snow Leopard (Mac OS X 10.6), or any previous system, insert the appropriate Mac OS X install disc and restart the computer. Hold down the ‘c’ key as soon as you hear the chime, then let go when you see the Apple logo. The system should eventually boot into the installer, where you first must choose a language. Do so, then choose Disk Utility from the Utilities menu.
If you plan to install either Lion or Mountain Lion (Mac OS X 10.7 or 10.8), restart the computer and hold command-R as soon as you hear the chime. When you see the Apple logo, you can let go. This will start the computer in recovery mode. Once you have fully booted into recovery mode, open Disk Utility. Note that when you begin the install process, you will need to download about 4 GB of data, so be sure your internet connection can handle that before proceeding.
Once in Disk Utility, you need to select your hard drive in the list and select the Erase tab. Select “Mac OS Extended (Journaled)” from the Format pop-up, if that’s not already chosen, then click the Erase button. When Disk Utility is finished, choose Quit from the Disk Utility menu.
Step 3: Reinstall
This step is pretty simple – just follow the directions to reinstall the system on the newly-erased drive.
One important thing to know, though, is that you don’t want to let the installer import anything from backups when it finishes. That can import more than you want, and that could very well bring back whatever bad settings file or third-party software or whatnot that is causing the problems you’re trying to solve in the first place. Instead, when the installer finishes, import nothing, and go through the setup process as if this were your first computer.
Step 4: Update
Once your system restarts successfully, you will need to be sure that it is fully up-to-date. From the Apple menu, choose Software Update, and install any updates that show up. Installing from older system disks can leave you with a somewhat outdated system, so you’ll want to be sure that you take care of bringing it back up to speed.
If you reinstalled Mac OS X 10.7 or 10.8, this should not be an issue, since you will have downloaded the most up-to-date version. Still, it can’t hurt to go ahead and check for updates anyway.
Step 5: Reconfigure
Once your clean, new system is up and running and fully updated, work on getting all the settings back to the way you like them. Don’t worry about getting things like Mail or iTunes set up again yet, though. Just make sure to do things like get connected to your wireless network, get your mouse/trackpad settings back the way you like them, set up your printer again, etc.
Step 6: Import data (selectively!)
At this point, you can manually copy your user data from the clone backup back into your new user folder. Don’t try to copy any settings files – nothing from your Library folder, for example – just documents.
When it comes to restoring data for apps that are not document-centric, like iTunes, iPhoto or Mail, you need to find and copy the data from your backup to the same location on your new drive. The items you need to copy for such apps are found in the following locations (note that the ‘~’ means “your home folder”):
|Mac OS X 10.7 and earlier: ~/Library/Preferences/com.apple.mail.plist|
|Mac OS X 10.8: ~/Library/Containers/com.apple.mail|
Copy the files/folders from those locations on the backup to the same location in your new user folder. For other apps, you may need to search for instructions on where to find the data and preference files.
Step 7: Reinstall applications
At this point, you can start reinstalling any other applications you might have had installed. Do not try to copy them from your backup. Reinstall them from the original disks, or download them from the original source.
Note that if you’re trying to solve problems like frequent system crashes or performance problems, this step is one that you should draw out over an extended period of time. Don’t just slap every application you had back onto the new system! If you do, and one of those applications was causing the problem, you’ll never know which one it was and you’ll be back at square one, with a lot of time wasted. Install third-party applications one at a time, with a period of testing afterward to be sure the problem doesn’t come back.
Once you have completed the seventh step, you should have your machine back to a state pretty close to where it was before, though hopefully without the issues that caused you to go to all this trouble in the first place.
Tags: Mac OS X