Skip to content. | Skip to navigation

Sections
Personal tools

Partitioning your Harddrive

Instructions how to partition your harddrive and how to move your home folder(s) away from the system partition and make your life easier ;-)

The Problem

Often, I hear people moaning about how their system is messed up or asking how to upgrade it without losing all of their personal settings.

In some cases people have been upgrading their system incrementally ever since 10.0.0. Let me see... that would be 21 updates![1] And eventhough, in theory it shouldn't matter, whether one performs a combo-update or multiple incremental ones, the fact is: if you want to have a smoothly running system, you will need to erase your harddrive, make a clean install and then upgrade using the latest available combo-update.

Now, this doesn't sound much like a feasible solution, after all, it means backing up all your personal data and putting it back again. For most users this seems too daunting as for one it requires external space, either on a server or an external harddrive. Also, it just seems to be a plain hassle, certainly when compared to simply hitting the Install button in the Software Update panel every now and then.

The Solution

Fact is, though, I routinely make a clean install of Mac OS X every other week or so, either on my own machines or on those of clients. I'm down to about 30 - 45 minutes for a complete install including restoring all of the previous settings.

The key is to use multiple partitions. (At least) one for your system and another one for your personal data. This way, you can simply tell the Installer to erase (format) your system partition, while your personal files sit safely on the other.

Here's how we do it:

The first step
is, of course, to partition your harddrive, i.e. divide it into separate, independant Volumes.
The second step
is to copy (or create) your home folder on a different partition than your system.
The third step
is to inform Mac OS X of the new location.

Step One: creating the actual partition.

This is the trickiest bit of the whole operation. Once you've done this, the rest is easy. The tricky bit is, that you can't (securely) divide your harddrive into multiple partitions without actually erasing the entire disk.

That's right: the only reliable way to create partitions is by erasing the whole drive. This is, of course, easiest to achieve when installing a brand-new system (Apple delivers new systems with one single partition, which is a real shame, actually.)

Partitioning the Drive

  1. Since (in theory) anything outside your Home folder(s) is replaceable, i.e. either System Software or Applications, all you need to do is to copy your Home folder(s) onto another drive.
  2. Then boot from CD and run the Disk Utility (accessible from the Apple Menu at the beginning of the installation process).
  3. Create at least two partitions, one for the System and one for your Data (and Applications). I recommend at least 5Gb for a system partition. (Yes, the example from the screenshot is using a too small system partition.)
  4. Now you can proceed to install the system on your new partition. In the end you will have created a new user and will have booted into the new system as that user.

Step Two: Copying the User folder(s) back

This just as straightforward as it sounds. Copy your Home folder(s) from the backup to /Volumes/Data/Users/. However there is one caveat: User IDs.

If you're just dealing with one user here, it probably won't occur, but what you need to know is this: Unix systems don't grant access rights by username but by user-id.

This means, that while your old and new user both have the name jdoe, that very jdoe may have had the user-id 502 on the old system and now the (default) id of 501.

This would mean, that you wouldn't have (sufficient) access to your own files, as the system believes, they belong to someone else! You can verify your user-ids on both your new Home folder, as well as on the the copied version by adding the -n (for numeric) flag to an ls command from the Terminal, i.e. if both ls -lan /Users/jdoe and ls -lan /Volumes/Data/Users/jdoe yield the same numerical ids (usually 501) you're good to go.

If not - no problem either. We'll adjust the ownership using the chown (change owner) command. Again, from the Terminal issue the following:

sudo chown -R jdoe /Volumes/Data/Users/jdoe

Step Three: pointing the System to the new folder

Until now, we haven't done anything else than formatting a drive and copying some files around. In order for the system to use the new home folder, we'll have to change the Netinfo entry of jdoe.

Netinfo Manager

  1. Fire up Netinfo Manager (located in /Applications/Utilities) and navigate to /users/jdoe
  2. authenticate with your password by clicking on the lock in the lower lefthand corner
  3. now search for the home property and change its value to /Volumes/Data/Users/jdoe
  4. press Command-S to save your changes.
  5. log out
  6. log in, presto!

You can verify the success of this operation by opening your Home directory in the Finder and then Command-clicking onto the window-title. This will show you the path to your home folder.

If everything went fine you will now never have another excuse for not performing a clean install ;-)

[1] 10.0, 10.0.1-5, 10.1, 10.1.1-5, 10.2, 10.2.1-10.2.8

Outdated Information
Please note that most of the information contained in this section is several years old and while most of it is still useful, hardly none of it applies directly to current versions of the software discussed. Proceed with caution, your mileage may vary etc. pp. ;-)