8

Basically, I was following this tutorial to enable writing to an NTFS Volume (which works when the Volume has a LABEL or UUID).

I have an external USB drive with an NTFS volume that doesn't seem to have a label or a "Volume UUID", therefore I can't use LABEL=foo or UUID=xxx in /etc/fstab. How can I target this volume in fstab so that I can do something like

LABEL=box none ntfs rw,auto,nobrowse

or

UUID=56A9A02B-0590-458E-9493-1DECC2A8F109 none ntfs rw,auto,nobrowse

The following is what diskutil info /Volumes/box shows. As you can see there's no VOlume Label or UUID:

 ❯ diskutil info /Volumes/box
   Device Identifier:        disk3s1
   Device Node:              /dev/disk3s1
   Part of Whole:            disk3
   Device / Media Name:      Untitled 1

   Volume Name:              box

   Mounted:                  Yes
   Mount Point:              /Volumes/box

   File System Personality:  NTFS
   Type (Bundle):            ntfs
   Name (User Visible):      Windows NT File System (NTFS)

   Partition Type:           Microsoft Basic Data
   OS Can Be Installed:      No
   Media Type:               Generic
   Protocol:                 USB
   SMART Status:             Not Supported
   Disk / Partition UUID:    56A9A02B-0590-458E-9493-1DECC2A8F109

   Total Size:               1.0 TB (1000168488960 Bytes) (exactly 1953454080 512-Byte-Units)
   Volume Free Space:        725.5 GB (725534765056 Bytes) (exactly 1417060088 512-Byte-Units)
   Device Block Size:        512 Bytes
   Allocation Block Size:    4096 Bytes

   Read-Only Media:          No
   Read-Only Volume:         Yes
   Ejectable:                Yes

   Whole:                    No
   Internal:                 No

NOTE: In the fstab example above, the UUID I tried is that of /dev/disk3s1, which seems to have no effect. I've been able to apply fstab rules on other NTFS volumes when diskutil showed volume labels and uuids, which are missing in this case.

How can I write fstab rules for this volume?

2

By default NTFS volumes are mounted read-only unless you have enabled NTFS R/W either by third-party driver or OS X built-in, where applicable, which is disabled by default in versions that actually have NTFS R/W capability. BTW Apples NTFS R/W is disabled of a good reason so I wouldn't enable it. I use Tuxera NTFS instead.

So if you don't have NTFS R/W enabled you'd use:

UUID=56A9A02B-0590-458E-9493-1DECC2A8F109 none ntfs ro,auto,nobrowse

If you have NTFS R/W like Tuxera NTFS enabled you can either use a Label or the UUID:

Example: LABEL=$Volume_Name none ntfs rw,auto,no browse 0 0

Where $Volume_Name is what's shown for the device in Finder.

Or: UUID=56A9A02B-0590-458E-9493-1DECC2A8F109 none ntfs rw,auto,nobrowse 0 0

Note: I used nobrowse in the examples because I assume you wanted it as it was in your example.

Have a look at: fstab

  • 1
    Hi user3439894 (phewf, that was long to say). The problem is using that UUID doesn't work at all. I'm able to do this with other dirves when those drives have a volume-specific UUID or LABEL, but as you can see in my output, there's no Volume Label or UUID. It only shows a partition UUID, which doesn't ever work on my other drives. I can mount all of my other NTFS partitions writable just fine without having Tuxera NTFS installed (I guess it uses OS X's driver). I'm just having this problem with this one specific drive that has no specific Volume Label or UUID. – trusktr Mar 1 '15 at 3:26
  • @trusktr, Sorry this reply to your comment is so late, I didn't see it until today when someone up voted my answer. If you'd read the man page I linked for fstab it states, "The first field, (fs_spec), describes the block special device, the local filesystem, or the remote filesystem to be mounted. The diskarbitrationd program supports the identification of a local filesystem uniquely by its UUID or by its volume name, irrespective of hardware configuration and of hardware parallelism, using the constructs UUID'' and LABEL''.". Continued in next comment... – user3439894 Mar 20 '16 at 17:04
  • Continued from previous Comment... The output of diskutil info shows the "Volume Name:" is "box" and this is what you'd use in lieu of the UUID. I have modified my answer to more clearly reflect the info in the manual page for fstab, so it hopefully is more clear now. – user3439894 Mar 20 '16 at 17:04
  • Thanks user3439894, so I would use LABEL=box? – trusktr Mar 27 '16 at 2:12
  • @trusktr, Based on the info in your question, yes. – user3439894 Mar 27 '16 at 2:27
2

On my "MY Passport" Western Digital I needed to use \040 at the space LABEL=My\040Passport none ntfs rw,auto,nobrowse

1

You can't reference partitions by anything other than volume UUID or label, so without a (recognisable) filesystem on the partition, you can't reference them at all. In most versions of Linux, you can refer to partitions with kernel name descriptors (/dev/disk1s1 for example), GPT labels or GPT UUIDs - any of which would work for partitions without a recognisable filesystem. Unfortunately OS X doesn't support any of these.

This means that for your specific question - how to mount the NTFS partitions without labels or volume UUIDs as R/W - the answer is that it isn't possible unless you alter the partition layout (ideally use GPT, don't use software RAID, 'Dynamic Disk' or 'Storage Spaces').

However, if you just want to stop the disk from mounting at all, there is a way of hooking into the diskarbitrationd mounting process that automounts those pesky partitions: diskejectd. You'll need to edit the config, compile and install it. And it only works with kernel name descriptors (e.g. disk1s1) so it might mess up when you install new drives. But at least it gets rid of those annoying 'The disk you inserted was not readable by this computer' messages on every startup.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .