Contribute
Register

/etc/fstab works now?

Status
Not open for further replies.
Joined
Jan 3, 2011
Messages
68
Mac
  1. MacBook Pro
Mobile Phone
  1. iOS
So in lion I've been using the fstab file to prevent mounting of certain drives at boot. I could have swore they disabled fstab am I mistaken?
 
It's always worked ...
 
nzalog said:
So in lion I've been using the fstab file to prevent mounting of certain drives at boot. I could have swore they disabled fstab am I mistaken?

Any closure on this? I'm at the same place. I created /private/etc/fstab (based on some thread indicating that was where Lion would look for fstab) and populated it the following lines:

Code:
UUID=0EF2C7AAF2C7947D /Windows/System\040Reserved ntfs-3g defaults,noauto,umask=777 0 0

UUID=9214F68414F66A9D /Windows/Windows\040System ntfs-3g defaults,noauto,umask=777 0 0

I copied & pasted this direectly from a working Ubuntu fstab on the same machine, so the UUIDs are correct. However, the addition of fstab (no extension) to /private/etc made no difference to my Lion boot. The partitions still mount.

I have NOT installed ntfs-3g on my OS X install, so that option might be tripping things up, though I'd expect that option to be ignored.

Any suggestions about getting fstab to do something? Hmm...as I review this before posting (I'm not at my OS X machine), I suspect the problem might be in having specified the mount points in the fstab lines, which were NOT manually created under OS X as was the case with Ubuntu. Perhaps creating specific mount points via terminal is necessary for the fstab lines to have any effect?
 
My fstab in Lion contains values in this form:

Code:
LABEL=Lion none hfs rw,noauto
LABEL=TimeMachine none hfs rw,noauto
LABEL=Windows none fusefs_txantfs ro,noauto
LABEL=Untitled none ntfs ro,noauto

and it works in preventing automount of the specified disks ...

LABEL=X (where x is the name assigned to a disk eg. System)
none
hfs or ntfs or msdos etc (to specify the filesystem on the disk. Usually ntfs)
ro, (for read only. rw for read and write but unless you are using special software it will not be possible to write to an ntfs disk in OS X)
noauto (this is the flag to prevent auto mount)

No need for UUID or any other special flags.
 
Thanks for the reply. I'll try the LABEL bit when I get home. I'd thought UUID was the up-and-coming approach to IDing partitions, but I'll use what works.

EDIT: I had to assign a label to my Windows 7 partition (from a windows boot). Thereafter, using your suggestion worked smoothly for preventing auto-mounting of my NTFS partitions. Thanks. I do still wonder, though, why UUID can't be used for this.
 
When I got around to adding the following line to fstab:

LABEL=Mac\040OS\040\X\040Install\040ESD hfsplus none defaults ro,noauto

I found it did NOT prevent "Mac OS X Install ESD" from automatically opening in Finder upon boot. This partition, BTW, is just an image I created of my Lion 10.7.3 installation.

Any obvious reason the fstab entry for this item isn't doing what I want? Thanks.
 
Personally, I do NOT use drives with spaces in the names on my system so I don't know if the \040 works in OS X.

But for the filesystem, I think you can just use "hfs" instead of hsfplus ...

I don't know which one is preventing the fstab entry from working but you can try with a spaceless label, then try with the filesystem as hfs to see if they may be the cause.
 
arpetwe said:
Personally, I do NOT use drives with spaces in the names on my system so I don't know if the \040 works in OS X.

Spaces are fine, and I use them with the \040 escape sequence to hide my NTFS partitions from OS X. I'll try just the hfs instead of the hfsplus, which I copied over from my Ubuntu fstab. Thanks for the reply.
 
Status
Not open for further replies.
Back
Top