partitioning mac os x
i guess i hadn’t used Picasa on my mac since i last re-formatted my laptop, because when i went to try and update the little image at the top of this site, picasa refused to open. i tried deleting the preferences, thought maybe something’s corrupted..i downloaded a fresh copy from google..to no avail. i’d read about this problem happening sometimes when you set a partition to mount at /Users. i hadn’t run into it though, and thought maybe it was an old fairy tale from days gone by. surely a modern os like mac os x would support putting system programs and user data on separate partitions!
well, it does, but you have to hack it a little bit to make it work. it’s not designed to let you do such a thing, but it is possible and you can make it work.
why would you do that?
first let’s discuss why you’d ever want to do this. Normally you’ve got your user directories under /Users; /Users/john for example, holds all my files. code, music, pictures, preferences and so on. the rest of the folders on the hard drive hold system programs and data. /Applications and /Library for example, all hold stuff used by mac os x and other programs. if you ever want or need to do a fresh reinstall or upgrade, you’ve got to format the entire hard drive, which means you have to back up and restore all the data you had under /Users/yourusername!
separating the two means that reinstalling is just that, and no more; no need to backup and restore your data. if your system files are all on one partition, you just have to reformat that one, and your data doesn’t get touched.
this is a common way to set things up when you install windows, probably because reformatting and reinstalling windows is a more common thing to do than it is with mac os x. but, at least for me, it’s also quite useful on my mac, because i’m always playing with it, tinkering, and will probably break the os at some point, requiring me to reinstall (and if it’s broken, who knows if i’ll even get a chance to backup my stuff first). plus this way if i install linux or something, i could use the same partition for my data directory there (or windows, but i’d need to find a driver for reading mac-formatted disks).
how to do it
the file /etc/fstab and Disk Utility are going to be our friends. first of all you have to create the partition you want to use for /Users. using Disk Utility you can just re-size the main system partition and create a new one. you’re going to need the UUI (Universal Unique Identifier) of your new partition, which you can find by clicking on “info” after selecting the new partition in the left panel of Disk Utility.
once you have the UUI, you’re ready to edit our friend fstab. for editing this system file, apple recommends vifs:
Always use vifs to edit fstab, instead of invoking an editor directly.
— vifs man page
open up Terminal.app (another friend), type vifs, navigate to a blank line, and enter in something like this:
UUID=75D00AF1-1817-3DDF-A548-D4879DF996DF /Usersp hfs rw 1 2
(if the vi editor that vifs pulls up confuses you, google “vi commands” for more help)
replace 75D00AF1.... with the UUI number you got from Disk Utility. exit out of vifs, and at this point you’re going to have to reboot using the mac os x install disk. put the disk in and reboot, holding down “c” on the keyboard to boot from the disk.
once up and running on the disk (make sure you booted from the installer disk, not from your hard drive), you’ll need to run Terminal from the utilities menu. volumes are mounted under /Volumes; run something like ls /Volumes and figure out which directory is normally your system drive, and cd to it. then run these commands:
mv Users Usersp ln -sv Usersp Users
now your new partition is set up to mount on /Usersp, and /Users is a symbolic link to it. it wouldn’t be a bad idea to move all your data to the new partition now, since when you reboot your new partition will mount over it (nothing is overwritten when it mounts over it, you just can’t get at it. it’s like it’s hidden underneath the new partition). something like mv Users/yourusername /Volumes/newvolume/ should get you taken care of.
why the symlink
i originally set my new partition to mount directly on /Users. it worked great, and i was really happy. but picasa refused to start after that, so i put the partition on /Usersp, and linked to that from /Users. i still don’t know why some programs (just picasa, from my experience, but possibly others) have issues with directly mounting it, but they seem to. they don’t seem to have any issues with the symlink approach though.