I dual-boot between Ubuntu and Mac OS X on my MacBook Pro, and I like to have the setups parallel each other as much as possible. This means I can do things like share git repos and Android AVDs across OSes. One annoying detail is that the root of the home directories is different in each OS. In GNU/Linux, its /home. In Mac OS X, its /Users. That can be easily solved by using a symlink, i.e. ln -s /Users /home
. But arg, Mac OS X’s NFS automounter gets in the way! It mounts /home and then if you use a networked home folder, it’ll mount it in /home. But who uses that on a laptop?
$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local)
fdesc on /dev (fdesc, union)
map -hosts on /net (autofs, automounted)
map auto_home on /home (autofs, automounted)
/dev/disk0s3 on /Volumes/Ubuntu (fusefs_ext2, local, read-only, synchronous)
/dev/disk0s4 on /Volumes/Untitled (fusefs_ext2, local, read-only, synchronous)
/dev/disk0s5 on /Volumes/64-bit (fusefs_ext2, local, read-only, synchronous)
/dev/disk0s6 on /Volumes/share (hfs, local)
I say get rid of it! Luckily Apple hasn’t killed all the UNIXiness of Mac OS X, and you can still do useful things by editing simple text files. The NFS automounter is a good example, its settings are in /etc/auto_master
and /etc/auto_home
. So I edited /etc/auto_master
as root and just commented out the line about automounting /home
, then told the automounter to re-check its config, and voila! No more annoying /home
mount! So in summary:
$ cd /
$ sudo emacs /etc/auto_master
$ sudo automount -vc
$ sudo umount /home
$ sudo rmdir /home
$ sudo ln -s /Users /home