Keeping unused hard disks unmounted
The question
How do you prevent Mac OS X Leopard from auto mounting disks, drives and volumes when the computer boots up or a user logs in? (skip to the solution)
The preamble
I have spent days (literally) searching for the answer to this one; I have a Mac Pro running Leopard with (count them) 4 internal hard drives. One is my system disk and the other 3 are backup disks. Two are weekly mirrors of my system while the third is a daily snap shot of my user account. We won’t even get into the external disks I have. Yes I am THAT anal about my data.
So what is the trouble here? When you have this many disks containing duplicate data, Spotlight, QuickSilver, Launchbar, Google QSB, etc… they all want to serve up information found on each disk. That would include duplicate information that you most likely don’t want to inadvertently open and/or edit. But further to this, why spin up a disk, potential shortening it’s life span and wasting precious energy, when it only gets used on occasion?
One way around this is to diligently eject each volume every time you boot up your system. But that is both a pain in the butt and no where near as geeky as it should be. So do a quick search on Google for a solution to “unmount disk on login” or “prevent volumes from mounting at the boot up in Mac OS X Leopard” and you get a great deal of outdated info, inefficient Apple Scripts, overly complex bash commands, apps that wrap bash in an executable app that you launch at login when the moon is at… you get the idea.
So I set forth to put together the best of the best and simplest of the simple and post it here, for my own reference, exactly what I did to prevent my back up volumes from mounting on boot up.
My Solution (proceed at your own risk)
First off, what you are going to find with most solutions out there is the need for a file called fstab in the systems hidden “/etc” folder. The trouble is that later versions of OS X (10.4.x and later) don’t have this file. However, there IS a redundant file called fstab.hd. WE ARE NOT USING THIS FILE. Instead we will create our own fstab file. So with that out of the way, let’s get started:
The short of it
- Start by making a backup of your system. If you bugger up your system you’ll have something to recover from.
- Open terminal (/Applications/Utilities/Terminal.app)
- Do one on the following:
- In Terminal, type the following (with your volume name) and return
*:diskutil info /volumes/DiskName
- Or, you can use Apples Disk Utility app (/Applications/Utilities/Disk Utility.app), select the disk in question and choose “info” from the toolbar.

- In Terminal, type the following (with your volume name) and return
- Find the Volume UUID (Universal Unique Identifier). Copy the UUID to your clipboard
**. - In Terminal enter and return
***:sudo pico /etc/fstab - Enter your password and return.
- You’ll enter a window that looks like this:

- Enter the following (with your UUID) and return
****:UUID=87635CC4-B2EF-3114-B854-F64347A39630 none hfs rw,noauto 0 0 - Repeat step for each device you with to hide, each on a new line.

- Exit pico (⌃X) and save (Y).
- Press return when prompted with:
File Name to Write: /etc/fstab
- All that’s left to do is is cross your fingers and reboot your Mac.
The long of it
*substitute “DiskName” for the name of the volume you wish to hide. If your volume name contains a space, like “Macintosh HD” you need to escape the space with a backslash so it looks like “Macintosh\ HD”**We use the “Volume UUID” as the disk identifier since it is not prone to change like “Device Identifier” (i.e. “disk0s2″) which can change with each and every start up.***This will create/edit your “/etc/fstab” file with pico, a simple text editor.****The string you are entering is the device id followed by the mount point, the filesystem, the mount options, the dump and fsck booleans. In this case:- the device is my UUID (UUID=87635CC4-B2EF-3114-B854-F64347A39630)
- the mount point is “none” (because we won’t be mounting it)
- the file system is “hfs” (since it’s formatted for Mac)
- the mount options are “rw” (read-write) and “noauto” (volume will not auto mount)
- the dump option (backup utility) and fsck option (filesystem check utility) booleans are both set to 0 (false, off, nil, nada) since we don’t plan to mount the volume and therefor don’t need to backup or check them
For more on fstab column structures, visit tuxfiles fstab help.
The wrap-up
For whatever reason, Apple decided to nix fstab from it’s own Unix core. Perhaps for security or perhaps they just deemed it unnecessary. If you look in the other file I mentioned, “/etc/fstab.hd” (in terminal, enter and return: sudo pico /etc/fstab.hd), you’ll see the message:
IGNORE THIS FILE. This file does nothing, contains no useful data, and might go away in future releases. Do not depend on this file or its contents.
However, I see no harm in extending the life expectancy of my disks and saving energy at the same time. All while doing away with the annoyance of long indexing times and being inundated with duplicate search results. If you have anything to add, please feel free to leave a comment.

February 12th, 2009 at 12:52 pm
Nice Adam. This is an area I have not spent much time in, the Console. I am planing on adding more drives this year and it is good to know this information. Thanks for taking the time to write it up with screenshots.
February 25th, 2009 at 1:25 pm
[...] this month you might recall the solution I gave you for keeping unused volumes unmounted on your mac. The next part of the equation, automatically mounting those volumes when needed to run [...]
February 25th, 2009 at 2:04 pm
Thanks Adam this is great information to have. Thank You!
July 2nd, 2009 at 1:45 pm
Is there a similar way to do this for volumes on a disk. The volume itself does not have a UUID, can ‘Sudo Pico’ work with another form of identification?
July 2nd, 2009 at 3:07 pm
@JB you can potentially use the Disk Identifier (i.e. disk1s2) or perhaps even the mount point but the trouble is both of these can change at random where the UUID cannot.
What sort of volume do you have without a UUID?
November 21st, 2009 at 6:52 am
This was driving me freakin’ nuts! I too was lost in the sea of crap offered up by Google’s search results. In fact, I found this page a more obscure way.
I Google Image searched “fstab osx” and randomly clicked on one of the thumbnails to see an example of how an fstab file was supposed to look, and it happened to be the last picture from this blog entry, leading me here.
I needed this because of my dual-booting MSI Wind, running XP and OS X, and for some reason the slipstream install partition (which I decided to keep in the event of kernel panics) kept coming up as damaged each boot up. That message ruins the elegance that OS X is supposed to be about.
The only difference was putting “ntfs” in place of “hfs” to auto-unmount the XP partition, which I wouldn’t've thought to do if not for the footnotes, so I appreciated those.
Anyway, thanks a ton for going through the tedium so I could keep my sanity.
November 21st, 2009 at 9:30 am
@Thomas, glad this helped.