Erase, formatting, OS X installs on Mac's
Hello and Welcome to my User Tip
This is a bit more advanced topic to give those new to Mac/computers the information they need in regards to formatting, partitioning, installing, backing up, cloning OS X and Windows 7 in BootCamp.
Make sure to read this User Tip in it's entirely before doing anything, and/or ask questions on the forum as I might have missed something and it's a rather new User Tip.
Plan your actions ahead of time, discuss with others, get a clear plan and get confirmation before proceeding, data loss is possible and almost a certainty with instructions on this User Tip.
Also it's good to always have a Internet connection/browser on something to get help and review essential information + Tips.
If your here because of a slow machine, or problem and you think a "back to factory" or a erase and install will fix it, it sure may just do that, but explore your repair options first as it might not require such drastic measures.
Also read for basic information also how computers work + Why is my computer slow?
If your here because of a data privacy issue, you can delete the offending files and "scrub" them off the hard drive, or scrub free space or even delete the entire account (not OS X or programs in Applications folder), then scrub the drive.
How do I securely delete data from the machine?
If your here thinking a erase/fresh install will cure your slow computer performance on a hard drive, it certainly can do that, but you should consider this instead as it might not be required to have to hand install everything (unless the data is corrupted and you have no clean backup)
How to safely defrag a Mac's hard drive
If your attempting to do this to restore your OS X back to 10.6 from 10.7/10.8, then you need to read this first to prepare your files:
How to revert your Mac to Snow Leopard
If your here to turn over ownership, your in the right place, read on also followed by visiting for more details:
How do I securely delete data from the machine?
If you don't have your data backed up on other medium and need to perform data recovery efforts first:
Create a data recovery/undelete external boot drive
If your here to experiment and learn how to go about things, then I suggest using a external drive with no essential data on it as a test subject.
If your here because Disk Utility says "can't repair this volume" or you want to do a erase + fresh install of OS X, or your partitions are messed up, or there is a problem in the GUID, EFI or Recovery HD partitions you can't control, or your getting spinning beach balls and you've exhausted all other forms of remedy, then your in the right place.
What you will need if on 10.6:
- 10.6 Snow Leopard - clean scratches boot disk required. Use a tiny bit of rubbing alcohol and a clean soft cloth to polish.
- 10.6 has 2 types of disks: 10.6.0-10.6.8 colored machine specific only, w/free iLife suite (can't be used with another model).
- 10.6.3 Retail Disk for installed at factory 10.4-10.6.2 Intel processor Mac's. Macs that came new with 10.6.3-10.6.8 can't use.
- Get the free MacTracker for details about your Mac, essential for picking the right 10.6 boot disk version/RAM amount.
- Need a 10.6 disk? Call Apple via phone (only) to order these disks. Machine specific has free iLife, not on 10.6.3 white disks.
What you will need if on 10.7-10.8:
- 10.7 Lion, 10.8 Mountain Lion requires AppleID and password if installed via AppStore and/or to restore iLife.
- Warning! You need a strong, fast, reliable Internet download capability to reinstall OS X. 5Gb per second plus!
- 10.7-10.8 installed a "Recovery HD" partition on the boot drive that acts like a boot disk. Use no 10.4-10.6 boot disks.
- 10.7-10.8 recent Mac's have Internet Recovery, is downloaded from Apple's servers for whole drive repair/format
- 10.7-10.8 upgraded Mac's with no Internet Recovery can use This Method their own or matching OS X version machine.
Wireless keyboards may not work with at boot key commands.
Use a wired USB one and PC keyboards may work. Windows key is the Apple command key, alt/option is the same, etc.
Some backup of data rules before you begin:
#1 Rule. Whenever affecting changes to the drive, make sure you have backups of all the data of all the partitions of the entire drive being affected and disconnect all other non-relevant drives (especially TimeMachine) to avoid mistakes and background automatic updates.
#2 Rule. Maintain two backups of your data on separate hardware at all times.
#3 Rule. Have at least one of those backups off site to protect against theft, fire, hackers, malware, estranged persons etc.
#4 Rule. Have your most valuable data burned to cd/dvd's archived/dated periodically offsite in case of slow creep issues and malware. Burned non-rewriteable cd/dvd's are naturally malware proof as they can't be changed later unlike other rewriteable media.
Most commonly used backup methods
What's going on behind the scenes on your boot drive
This is the standard configuration of most Mac's boot drives and the order of the partitions on the drive.
GUID (hidden)*
EFI - firmware partition (hidden)*
Macintosh HD (visible)
BootCamp - Windows (if enabled, visible)
Recovery HD ("OS X base install", if on OS X 10.7+, hidden)*
*The GUID, EFI and Recovery HD partitions in most cases requires a complete drive reformat and/or OS X install to rebuild
GUID Partition Table
A boot drive with Mac OS X requires a GUID partition table, this is a small hidden section at the top of the drive that tells the hardware it's running on what partitions, where they are and what are on the drive. Erase this or it gets corrupted and like burning a treasure map, the locations to where the partitions are on the drive are lost, thus the data on those partitions are lost. (Well if it's not encrypted, software like Data Rescue on another bootable drive might be able to bypass the GUID and read the drive)
The way to rebuild this for most common users is to boot the machine via another bootable medium, or via a program residing completely in Random Access Memory (RAM) or by hooking the drive to another computer, because the entire drive needs to be reformatted and the partitions recreated along with a new GUID Partition Table (GPT)
By the way a partition is a section on the drive that is another volume, it can be formatted differently from the others, contain a bootable OS or just data.
EFI Firmware Partition
A boot drive with OS X requires a EFI Partition (also hidden) which stores data to be loaded or ran before the operating system you have chosen boots. This is what allows the at boot key commands, to allow basic operation of the machine if it's in Windows or OS X. If you start a Mac in verbose mode, you will see that the EFI is loading before OS X begins to boot up. Programs can be installed in EFI, it takes two reboots to activate them and is very difficult for many users to remove. So it's important to trust the source of your downloaded programs from the Internet sources. As since EFI is separate from OS X, has complete access to the hardware and Internet, there is no telling what's going on in there. Loading spyware in here is a rather trivial task for spooks and rather hard for common users to detect or remove.
To rebuild this requires a complete drive reformat from another bootable medium.
https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
However if a firmware update fails to install, or at boot key commands (wired keyboard) fail to work, then it is possible to download the same firmware again from Apple's site on another Mac, burn a cd and install it.
https://support.apple.com/kb/HT1237 https://support.apple.com/kb/HT2213
Macintosh HD Partition
This is right out in the open, next on the list order and usually named "Macintosh HD" unless someone changed it. It contains OS X, programs and user accounts data. It can be erased from another bootable medium or volume with Disk Utility on it and a ability to install OS X back on.
You can also clone this partitions data (and it also does the Recovery HD partition for you) to another drive with software like Carbon Copy Cloner.
If your having problems with your machine, OS X can be reinstalled by itself without affecting most programs or your user account/files, also new user account can be created and the old one deleted and recreated with the hassle of a erase and fresh install . Step by Step to fix your Mac
BootCamp Partition
When installing Windows 7 in BootCamp, the Bootcamp software takes the bottom of the OS X Partition and works it's way up until it hits OS X data, then it stops and that's the limit of the partition your allowed to create.
You can clone this partitions data with software like WincClone 3 (runs in OS X) to another drive for backup purposes.
Changes to this partition should be undertaken by the BootCamp software, however Disk Utility can also be used as well as other software like WinClone 3.
When BootCamp software creates this BOOTCAMP partition, it's formatted MSDOS (aka FAT32) for later changing by the Windows installer to NTFS which Windows requires to be installed in. Apple Mac's can only read NTFS, can't format or write it.
I've used the BootCamp software to create the second partition for other purposes, then headed to Disk Utility to change the name of the partition and it's format, so that's a possibility for beginners if they are not well versed in creating additional partitions on their boot drive using Disk Utility.
If you can't create a partition big enough, you need to remove some OS X data to a storage drive and follow this procedure to shift the remaining data up further on the drive to make room for your BootCamp partition.
BootCamp: "This disc can not be partitioned/impossible to move files." How to safely defrag a Mac's hard drive
Windows is copy protected, if you reinstall or reverse clone and there is a hardware change (like you changed the internal drive to a larger one) then it's going to require jumping through their hoops to re-register it or it dies after 30 days or so.
Recovery HD Partition (OS X base install)
If you have OS X 10.7+, Apple installed this Recovery HD partition which one can hold command r down on a wired/built in keyboard and load this program into memory. It has Disk Utility, Safari, OS X Install and Terminal program. It's a troubleshooting environment to repair, reinstall, erase and install OS X. Plus do other things like reset the password, get online for assistance etc. It can only affect changes on the BootCamp and Macintosh HD partitions.
If for some reason this is deleted or not functional, newer Mac's have Internet Recovery where the same thing is loaded from Apple's servers by holding command option r keys down at boot time. A globe appears and it loads up. This is able to effect changes on the entire drive, including erasing the entire drive of all partitions and when OS X is reinstalled, it will recreate the required partitions and their information, provided the boot drive is still has a GUID and OS X Extended Journaled format.
https://support.apple.com/kb/HT4718
If you have a older machine with no Internet Recovery and your Recovery HD partition is missing, you need to clone the OS X and Windows partitions each to their own separate blank drives and disconnect. Hold c or option/alt and boot off the 10.6 disk, use Disk Utility under the Utilities menu on the Installer page to erase the entire drive (with Security Option > Zero all data), make sure it has a GUID and OS X Extended Journaled (under Partitions) and quit then install 10.6. Reboot and Software update to 10.6.8, then reinstall 10.7+ from the AppStore using your AppleID and password. This will recreate your Recovery HD partition again, then you go and recreate the BootCamp partition (if you have it) and hold the option/alt key down to boot off the clone drive. Use CCC to reverse clone OS X, then run Winclone to reverse clone BoootCamp.
It is possible to clone the data of the Recovery HD partition and even create bootable USB thumb drives of it.
Disk Utility
This is Apple's program for erasing, formatting and partitioning drives and partitions.
#1 Rule, unless your going to completely erase the entire drive, do NOT use Disk Utility version on a older OS X (like a 10.6 boot disk) to affect repairs or changes to a drive with a later version of OS X on it. It's because the older Disk Utility doesn't know what it's looking at and newer OS X versions create changes to the GUID Partition Table (like Recovery HD) and EFI.
#2 Rule to repair/erase/format a drive or partition in Disk Utility requires being booted and/or running Disk Utility from some other medium that isn't on the same drive or partition being affected. Internet Recovery loads completely into Random Access Memory, so it's no on the drive being affected.
#3 Rule, don't use other drive format utilities as Apple does certain things with Disk Utility to make it all work.
Where you can find/use Disk Utility
Disk Utility in the OS X > Applications > Utilities folder is good for verifying the booted drive (but may make mistakes*), creating and changing other partitions on the same boot drive (but on not the Macintosh HD) and affecting changes on external drives.
*Some have used "Verify" on their booted drives to discover problems, to be directed to boot from the Recovery HD/boot disk to Repair the drive, only to find nothing was fixed or required fixing. Affecting partition changes on the boot drive while booted from one of the partitions is risky, again have backups of the data before proceeding.
Disk Utility in 10.7+ Recovery HD - via the hold command r (wired or built in keyboard) upon booting (powering on) the computer. Can affect changes to the Macintosh and BootCamp Partitions, but not the entire drive.
Disk Utility in the 10.7+ Internet Recovery - via hold command option r (wired or built in keyboard + Internet connection, preferably a Ethernet cable to the router or modem power/off/on to reset) upon booting up (powering on) the computer on newer Mac's with 10.7+. Loads from the Internet into temporary Random Access Memory, turn off the power/reboot and it's gone. Can affect changes to the entire drive, including GUID, EFI and all other partitions.
Disk Utility on the 10.6 install disks - hold c or option/alt during boot up from this disk, Disk Utility is under the Utilities menu on the installer page after you select a language. Use with 10.6 and earlier formatted drives to repair or affect changes. Do not use to repair or affect changes on 10.7+ drives only to totally erase the entire drive.
Since OS X 10.5 is no longer being supported, I advise 10.5 user to consider upgrading your Intel processor Mac to 10.6 via the white Snow Leopard retail disks during this repair process. If you upgrade and its slow/problematic or you need to erase and install to fix a issue, see below for the link. Do not use the 10.5 Disk Utility other than for completely erasing a 10.5/10.6 machine even if it will hold c or option/alt key to boot from it I doubt it, the firmware may have been changed in 10.6 sometime to discourage booting.
How to use Disk Utility
Here is a picture from a 10.6 version of Disk Utility, those on 10.7+ may be slightly different in appearance but work basically the same.
What's selected on the left is then changeable by the actions on the right side. Indented names are visible partitions on the drive above.
Depending upon what your booted from, depends what options on the right are enabled.
For instance I'm booted from my Macintosh HD partition and therefore cannot Repair that partition (grayed out)
If I booted from my Macintosh HD 2 partition (using option/alt for Startup Manager) then I could Repair my Macintosh HD partition.
If I wanted to erase or format my entire drive (selecting the drive makers name and size at the top) I cant do that because I'm booted from one of the partitions on the drive, so I would have to boot from another medium completely, like a program in RAM (Internet Recovery) or another boot drive/disk.
Note: If you keep First Aid: Repairing Permissions and it keeps fixing things, that's ok, Apple has just changed something in OS X.
Note: If Repairing the drive says it can't repair it, then there is a serious issue and the data needs to be backed up or recovered, then the partition or drive erased (hard drives use Security Erase > Zero, or one selection from the left on 10.7+ to map off bad sectors) and OS X reinstalled (if the Macintosh HD partition) or restored from a clean TimeMachine or clone backup.
Create a data recovery/undelete external boot drive
Most commonly used backup methods
Note: If you can't see your drive on the left, that's a pretty serious issue, especially if there are no backups of the users files.
My computer is not working, is my personal data lost?
If erasing a SSD, be noted that Disk Utility offers no secure erase function as SSD's have limited writes and to allow a secure erase would be abused and wear out the SSD prematurely. I have outlined a possible solution to overwriting deleted data on SSD's, however it's no sure proof method.
How do I securely delete data from the machine?
How to install OS X 10.6
Ok you all wiped clean and you want to install OS X 10.6.
If your hold c or option/alt key booted from a 10.6 install disk, make sure your entire drive is selected on the left, click Partition: Options: GUID and the partition format for OS X is OS X Extended Journaled, if not make it so. Quit and select the volume on the 10.6 installer and install it.
How to erase and install Snow Leopard 10.6
If you have a BotoCamp or other partitions on the drive, you can chose to erase only the Macintosh HD partition and install OS X there, instead of the entire drive.
When you boot up new, your greeted to the Welcome video and all that fresh setup business, you can use TimeMachine there to restore or migrate from a clone drive of 10.6 or earlier only.
If you need 10.6 disks, call Apple with your Apple Menu> About this Mac > More Information > model number like "MacBook Pro 1,3".
Mac's that came originally from the factory with 10.6.3 or later cannot use the 10.6 white Snow Leopard retail disks, these require machine specific disks only available used (must be the same exact model Mac) /or via calling Apple via phone.
How to install OS X 10.7+
Ok you either erased the entire drive, it's blank, or you erased just the Macintosh HD partition. Now all you have to do is quit Disk Utility and install OS X using your AppleID and password right from Recovery HD or Internet Recovery your already booted into.
You will need a fast and reliable Internet connection as OS X is now downloaded, not on the computer or drive.
How to restore your free iLife, 10.6-10.7+
Restoring your Free iLife (iPhoto, iMovie etc)
More about drives, partitioning and formatting