OS X: Suppressing Automount of Windows Volumes
Suppressing Autmount of Windows Volumes in OS X
Well I did promise to post another article, once I figured out how to suppress the auto mounting of unwanted volumes using /fstab (In this case, my Windows volumes.). I could not for the life of me figure out why all the articles on the web pointed to being able to use /etc/fstab with the noauto parameter set, but I could not get it to work for me.
Amazing what will pop into your head at the strangest time when you step away from the problem. In this case it was 8am Sunday morning that I realized the blog articles I was reading were written for BootCamp partitions on an HFS volume (One of the limitations of BootCamp is that it does not support booting from an external Hard Drive)! Old Style Mac Pro’s can have 4 internal drives. So my Mac Pro can actually use native NTFS internal hard drives! I was specifying that the volumes were HFS per instruction. and not NTFS!. NTFS stands for NT File System, which Windows has used since Windows NT 3.1 (Which was the first version of NT released to the public.) HFS or Hierarchial File System, or in our case HFS+ is the file systems used on Macintosh computers, since way back in 185.
So I jump out of bead, wake up my trusty Mac, log into a terminal, su to root, redo the changes to /etc/fstab. Enter the reboot command and VIOLA! Success, and the bitter feeling of failure since I spent almost an entire day working on this and missed such a small but crucial change that should have been obvious.
What we need to do is edit the /etc/fstab file (Apple recommends not using this file for some reason. Actually, they recommend not using allot of the Unix level files, but I think that’s just silly. You have a very powerful and configurable OS under the hood. Take advantage of it.
Go ahead, open up that scary terminal window!! Come on, Steve put it there for a reason!
1) The first thing we need to do is find the UUID of the volume you no longer wish to mount. (Sounds hard huh?) No EASY.. Check this out. Type in your terminal window.
Shell_prompt$ diskutil info (Drag the disk volume onto the terminal window)
Note: If you have a volume name with spaces in to, you will either need to surround the full path in single or double quotes. (IE: “/Volumes/Macintosh HD” or surround the item with the space with a \ (IE: /Volumes/Macintosh\ HD\).
You should now see something like this > diskutil info /Volumes/BOOTCAMP <Verify command and hit ENTER>
Your output should look something like this.
Device Identifier: disk0s1
Device Node: /dev/disk0s1
Part of Whole: disk0
Device / Media Name: Untitled
Volume Name: BOOTCAMP
Mounted: Yes
Mount Point: /Volumes/BOOTCAMP
File System Personality: NTFS
Type (Bundle): ntfs
Name (User Visible): Windows NT File System (NTFS)
Partition Type: Windows_NTFS
OS Can Be Installed: No
Protocol: SATA
Volume UUID: 640E8804-B7C7-4D1C-BBBE-870EAFC9F916
I have removed blank lines, and other fields for brevity.
Now we need the volumes UUID. Do you see it? Simply highlight and copy the data in the terminal window.
Hint: You can also pipe the output through the grep command, and display only the UUID.
EXAMPLE: $ diskuitl info “/Volumes/Machintosh HD” | grep UUID
Your output should look like this.
Volume UUID: B5CF2066-279C-36B2-B704-2E5B80322313
Now, su to root, or for those Unix GURU’s who are gasping and screaming NO!!!!! sudo vi /etc/fstab.
Hint: If you are pretty sure you have enabled the root account, and your using the correct password, and OS X is still not letting you su to root. Make you first su to an account that has Administrator privileges! Quiz: Anyone who can comment to this post and tell me what “su” stands for in Unix/Linix get’s a point.
So now, picture us on a desert island… I mean… in vi….. If you are using the current version of OS X (Mavericks), there is no /etc/fstab. You are now in a new file. Throw some comments in there!
(For you non VI people) – Hit I to enter insert mode.
Now on a blank line enter.
##fstab file, created to suppress mounting of specific volumes in this os version.
## Brent Hendricks is Awesome!
## 08/NOV2013 BPH
I always like to put comments in the file, of when and why I have created or made changes to a file. If I have to troubleshoot it really saves time.
Now for the meat! (It’s always about the meat people!)
UUID=640E8804-B7C7-4D1C-BBBE-870EAFC9F916 none ntfs ro,noauto
Your done! Simple huh? How just write the file.
NOTE: I have put the ntfs line here as ro, because by default OS X can not write to an NTFS partition. If you are making an HFS volume not mount at startup. You can enter rw here (For Read/Write)
(For your non VI people, hit (ESC) to exit INSERT mode, type : and wq)
Reboot your system, and notice the specified volume no longer mounts. If you have other volumes you with to suppress automount, repeat the steps above, just add the new UUID on a separate line in the /etc/fstab file.
Comments
OS X: Suppressing Automount of Windows Volumes — No Comments
HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>