According to The OpenDarwin FAQ, you can't pick and choose which volumes are mounted and which are not. Apparently the autodiskmountd daemon will attempt to mount any available filesystems it finds at startup. At present, there doesn't appear to be any way to modify this behavior. Disabling this daemon is probably not a good idea either, even though doing so would probably have allowed traditional methods (such as customizing /etc/fstab) to do the trick.
Read the rest of the article for the solution and more discussion on the question of unmounting just one partition of a volume.
NOTE: The discussion behind this tip is kinda long and hasn't been extensively researched. Nevertheless, it's presented here in hopes that it could provide the solution someone is looking for and that others may be able to fill in the gaps.
As the above-mentioned FAQ notes, the next best thing is to leave autodiskmount alone and explicitly unmount any unwanted volume instead. At this point, one might consider simply using the Finder to eject the unwanted volume. The problem is that the Finder's idea of unmounting a filesystem is to eject the device. So if you tried to remove a certain volume/partition from the Finder, it would happliy comply, and eject any other partitions on the same device as well!
Another line of reasoning would be to issue an unmount /Volume/unwantedvolume on startup/login. The nice thing about this method is that it relies on standard user-level tools and doesn't require modifying any files that may confuse or break things with later Apple Software Updates. And while this does appear to work, the problem is that it seems to confuse the Finder. My guess is that the Finder or some other abstraction layer needs to syncrhonize certain data structures on the volumes it sees. Thus, doing a device-level mount/unmount of volume does the trick at the BSD layer, but not for the Finder.
What I finally found was the undocumented disktool command. disktool appears to know how to cleanly mount or unmount individual partition volumes while keeping the Finder happy. The only problem is that it only works with device names, not volume names. This means that you'll need to get a particular volume's device name by issuing the df or mount command from the terminal. In my case, the the volume I wanted to unmount had the device name 'disk0s13' so I used:
/usr/sbin/disktool -p disk0s13 0(the zero after the device name is required). So what I ended up doing was creating a simple AppleScript:
do shell script "/usr/sbin/disktool -p disk0s13 0 > /dev/null"that I have set up as a login app.
DISCUSSION AND CAVEATS
- This method is slightly cumbersome because it relies on device nodes, not volume names.
- disktool is undocumented and may very well go away in later releases of OSX. Can someone verify whether or not disktool is part the standard release or is it part of the DevTools?
- To mount the volume (without rebooting or re-logging in) is equally clumsy, as you need to issue the following from the command line:
/usr/sbin/disktool -m disk0s13
(or whatever device node you're using) and the previously-unmounted volume partition will appear in the Finder. The disktool -m command appears to block; it won't return you to the command prompt without hitting Ctrl-C, but the volume will mount fine.
- Re-launching the Finder or restarting the autodiskmountd daemon will probably grab any volumes unmounted and make them visible again.
- Regarding the reason for this tip: Yes, I know about mountable disk images. In most cases, if you're concerned with security and/or privacy, then encrypted disk images are probably the way to go. In my case, I just wanted a built-in storeroom with a closed door, not a portable security vault. For the ultra-paranoid, you might consider combining both methods: Keep your encrypted disk images on an unmounted partition.

