As relates to an answer to a previous question, I'd like to unmount a built-in hard drive every time I boot up. (Or alternately arrange for it not to be mounted). How do I do this?
The following Hint on Mac OS X Hints details a way to do this. Basically you'll create (or modify) the file
/etc/fstab and add a line similar to:
UUID=F0E430C1-5558-3BB3-9FA9-6904B663FEEA none hfs rw,noauto
The actual UUID will vary, you can find the UUID for your disk in
In Mac OS X Panther, Disk Utility and the diskutil command doesn't display the UUID value. But if you look in the system.log file, when the disk is mounted, you can see something similar to this (line breaks added for narrower display):
… localhost diskarbitrationd: disk1s9 hfs 77F3E84D-E0ED-3194-96A5-BED10893FFF4 FireWire HD /Volumes/FireWire HD … localhost diskarbitrationd: disk1s10 hfs F0E430C1-5558-3BB3-9FA9-6904B663FEEA Mac OS X Disc /Volumes/Mac OS X Disc
The string before the volume name is the UUID for the disk.
Use a LaunchAgent (see Lingon) that runs at boot to unmount. If it runs too quickly, add a wait/pause/sleep. The action that unmounts can be in whatever you preferred scripting/automation language is (bash (hdiutil), Automator, AppleScript, etc.)