I have an external HDD with 4 partitions.

My question is the following: is there a way of telling the OS to mount just two of them (One FAT and one HFS+) when I connect the HDD? It is rather annoying to have 4 "disks" connected on the finder, and it makes ejecting the drive a test to my patience.

I would appreciate your suggestions. If it's impossible I guess I'll just have to fiddle around and get everything in 2 partitions... :/

2 Answers 2


Yes. You'll need to create a file called "fstab" in /etc if it is not already there:

sudo nano /etc/fstab

Next, we'll need the partitions Unique Universal Identifier (UUID). Open Disk Utility, and highlight the partition you'd like to no have auto-mounted. Then hit CMD+I and you'll be greeted with the following screen (notice the UUID highlighted):

Disk Utility Partition Information

We will then need to enter the following line into our fstab file. The following example will prevent my "Shockwave" partition from auto-mounting:

UUID=27C2148B-1734-3900-B89C-FE3EB7E11DBC    none   hfs   rw,noauto

Hit CNTRL+O to save when you're done. You can add as many as you like; one per line. Reboot and those partitions specified in fstab will not be mounted.

The UUID is the partitions unique identifier (consult the man-page below if you'd like to use device's label instead). The noauto tag tells OS X not to auto mount on load. You can still mount them using Disk Utility, but OS X won't do it for you initially.

If you'd like to learn more about fstab and what you can do with it, you can view it's respective man-page.

  • That is pretty much what I need, though it seems not to be working for me. Im writing the following: "UUID={XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXX} none hfs rw,noauto" but it doesent seem to work, are you sure this is teh syntax?
    – kevin9794
    Sep 9, 2011 at 1:44
  • I have update the tutorial for you. Remember to remove the braces (e.g., UUID=9324-343224-2343) or it won't work! If it's still not working, ensure that you have the correct UUID.
    – user10355
    Sep 9, 2011 at 3:11
  • What about a FAT partition? disk utility shows no UUID for FAT32 partition. Aug 31, 2015 at 13:16
  • What if the label has a space?
    – user166898
    Jan 22, 2016 at 3:04
  • @EthanCardenas- What if it does? You are using the UUID not the label Mar 30, 2016 at 6:04

You can add entries in /etc/fstab to prevent volumes from mounting. This is similar to the technique @cksum describes. Here are some example one-liners. They will create an fstab file if it doesn't exist, otherwise they will append. You need admin privileges.

  1. Prevent an HFS (Mac) volume named Archive from mounting. If it is mounted manually, it will be Read/Write.

    echo "LABEL=Archive none hfs rw,noauto 0 0" | sudo tee -a /etc/fstab

  2. NTFS volume named BOOTCAMP. Read-only.

    echo "LABEL=BOOTCAMP none ntfs ro,noauto 0 0" | sudo tee -a /etc/fstab

  3. FAT32 volume named PMBPORTABLE. Read-only.

    echo "LABEL=PMBPORTABLE none msdos ro,noauto 0 0" | sudo tee -a /etc/fstab

  • So I can mount a perticular drive with sudo mount -t msdos /dev/disk3 /Volumes/usb. But can I do this without knowing /dev/disk3? Aug 31, 2015 at 13:30
  • 1
    +1 - This is a good technique, as the UUID tends to change if you plug in, or unplug, USB disks. Using this method, there is no need to update the fstab each time you change the disk configuration. It could be a good idea to emphasise this fact in your answer. Mar 30, 2016 at 6:11

You must log in to answer this question.

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