Finding myself frustrated with OS X's attitude toward disk mounting, I had created an fstab file per the instructions in a previous hint: i.e.:
LABEL=Apps /Applications hfs 1 2Digging through the various man pages (many outdated or for missing programs like getmntent, others), I kept seeing references to Unique Universal Identifiers, UUIDs. These would allow an fstab not dependent on disk names, but instead would be able to recognize this 16-digit string, thus allowing more Mac-like freedom.
Then I tried to figure out how. After an hour or so of google mining, I finally discovered a few quick commands which would make this possible. Step one, possibly easy, possibly hard -- unmount the drives you wish to enter in as UUIDs instead of LABELs in the fstab. To determine device names, use disktool -l to print a list. pdisk disk n -dump works as well; replace n with the number a given drive is supected to be. The latter method is quicker, but less pure on some higher level, be quite assured.
Once these drives are unmounted, type:
% /System/Library/Filesystems/hfs.fs/hfs.util -s devicenameReplace devicename with the disk ID, for example, disk0s10. This command apparently adds a UUID to the drive. The next step, though easily typed, can be finicky (reasons unknown). Type:
% /System/Library/Filesystems/hfs.fs/hfs.util -k device > ~/file_to_store_uuid_inOnce this has been done for each drive which is to be referenced by UUID, use the terminal to open the fstab file (sudo pico /etc/fstab works well, vim, whatever you feel comfortable with) and either add or replace existing entries with the format:UUID=16-character uuid /mountpoint filesystem 1 2Replace "16-character uuid," "mountpoint," and "filesystem", of course, with the appropriate data. Filesystem is most likely hfs, unless it is a CD-ROM you are referencing, a Winpod, or any other non-Mac-only device.
% diskutil rename device newname(Replace "device" and "newname" with the proper values). This is a quick command-line shortcut to renaming drives.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20030227194830916