Now I want to show you how you can put your entire Users folder (all users' home directories) on a separate partition. This approach might not be new to Linux users, because on Linux this is a pretty common task.
The benefits of this approach are:
- separate your data from your system drive
- in case you reinstall the OS you'll keep all of your data (including E-Mails, contacts and calendars) and application settings (IM accounts, ...)
- if your system partition fails, you won't loose your data
- a running Mac OS X Leopard (or higher)
- experience with the command line and vim (no noob questions please, this is an advanced thing!)
- an empty disk (recommended) or partition
OK, let's start:
- first of all you have to format the drive or partition
- in case you want to use an entire drive for this, use the GUID partition scheme
- in case you want to do this with a separate partition make sure it has enough space
- create an HFS+ filesystem (journal recommended) on the partition/drive
- the volume label should be "Users"
- Enable the root user: (noobs: please stop here - this is nothing for you!)
- Go to Applications -> Utilities and open Terminal Services
- make sure the settings are unlocked
- click Edit -> Enable root User and enter a strong password
- close Terminal Services
- Now log out and back log in as root
- Get the UUID of the partition you have just created or formatted
- to get the UUID simply open Disk Utility (if you have not already done so), select the partition and click "Info"
- select the UUID and copy it
- now open a Terminal window
- Backup your current /Users folderCODEmv /Users /Users.bak
mkdir /Users - Now we have to edit fstab:CODEvifs
- press "i" (insert) and paste the following line at the end of the file:CODEUUID=03A99002-AF11-30A9-AA69-CDC59ACCABCD /Users hfs auto,rw 1 0
- of course you have to replace 03A99002-AF11-30A9-AA69-CDC59ACCABCD with your actual partition UUID
- quit by hitting escape and entering ":wq"
- Your system should now mount /Users on the next boot
- Backup your current /Users folder
- Try it by rebooting and logging in back as root
- Open Terminal again
- Verify that your partition was mounted at /Users (NOT /Volumes/Users):CODEmount
- now you can copy your user data to the fresh /Users partition:CODEcp -R /Users.bak/yourusername /Users
cp -R /Users.bak/Shared /Users
touch /Users/.localized - At this point everything is set up. Close Terminal, repair permissions on / with Disk Utility and logout.
When you want to reinstall your OS you just need to repeat the steps and you'll get all you user data back
Have fun
