Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Use /etc/fstab' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Use /etc/fstab
Authored by: jkhong on Jun 15, '05 12:52:40AM

See these:
1. http://www.macosxhints.com/article.php?story=20040716153639236
2. Man page for fstab

Coming from a Linux background (just got my first taste of OSX last week), I'm wondering if /etc/fstab might do the job better:

According to the manual (type "man fstab" in terminal):
The option ``auto'' can be used in the ``noauto'' form to cause a file
system not to be mounted automatically (with ``mount -a'', or system boot
time).

So a line like:

/dev/disk0s5 /Volumes/NAME_OF_PARTITION hfs noauto,rw 1 2

in your /etc/fstab file should tell the system not to auto mount the partition.

*You may also need to tell NetInfo about it, using something like:
$ sudo niload -m fstab / < /etc/fstab

* (Not sure what or why this is needed, definitely not Linux) This came from http://www.macosxhints.com/article.php?story=20040716153639236
It's an excellent tip on partitioning on OSX.



[ Reply to This | # ]
WARNING Use /etc/fstab
Authored by: jkhong on Jun 15, '05 01:52:27AM

Please read TigerKR's comments (below) before trying the /etc/fstab method. There may be problems with this.



[ Reply to This | # ]
Use /etc/fstab
Authored by: valexa on Jul 24, '10 08:39:14AM
you should use the partition's UUID instead of it's device description to make things less risky as the description can vary
UUID=4236231D-1117-333F-8899-3235F9B8000 /Volumes/NAME_OF_PARTITION hfs noauto,rw 1 2
instead of
/dev/disk0s5 /Volumes/NAME_OF_PARTITION hfs noauto,rw 1 2
to get the UUID do:
diskutil info /dev/disk0s5

[ Reply to This | # ]