Prevent Automounting

I work with MacOS Mojave. I used terminal to prevent two external hard drives from mounting every time I start up my computer. I wanted to double-check with someone more experienced. I noticed that there were two approaches to entering information for this. One uses the command line "sudo nano /etc/fstab". After that you're supposed to enter the UUIDs. (The prevention of automounting didn't seem to change with this.) Then there is the command line "cd /etc" and hit return and then enter "sudo vifs". Upon typing the other command, I got a big red warning saying that another file was already being used for this? I figured it referred to the "sudo" commands. It gave me an option to delete it, which I did. That seems to have cleared up that error. Then I entered my UUIDs into this area the volumes stopped automounting.


To double-check that the commands were entered correctly, I typed in sudo nano /etc/fstab and my commands were there along with a warning about VIFS. Then I typed CD /etc and sudo vifs. My commands were in there along with the same warning about VIFS. (But no big red error.) Does this confirm that I entered it right?

Posted on Oct 3, 2018 7:52 AM

Reply

Similar questions

9 replies

Oct 14, 2018 5:07 PM in response to timothyfrombloomington

1) Make sure the disk you want to prevent mounting at boot is mounted.
2) Launch Terminal.
3) Open Disk Utility, select drive, click info, copy UUID
4) Type cd /etc in terminal and press enter
5) Type sudo vifs and press enter
6)Enter password
7)To add a new line, use the arrow keys to move to the end of the document and press the o key to append a new line and enter edit mode.
8) Type the following and press return:
UUID=(Your number) none hfs rw,noauto

9) Press escape and then Shift-ZZ.
10) Type sudo automount -vc and return
11)Quit Terminal

Oct 3, 2018 8:59 AM in response to babowa

I have 2 Raid external drives connected. One Raid is my drive I use for all of my active work and the second raid is only a backup. I just want the backup drive to not mount because it’s not needed during the day and I also sometimes mistakenly click on it thinking it’s my primary drive and that just causes a mess. I don’t know if there’s an option to hide certain drives over others?

Oct 14, 2018 3:57 PM in response to kpdesigns

Can you post one line you created after you started vifs? I am attempting to do the same as disabling a specific external drive, but it is not working for me. I found an example of the line you are supposed to enter using your own UUID, but it doesn't seem to work. See below for mine:


UUID=FFDE3EC7-C45A-3296-B3A1-A68BE8807702 none hfs rw,noauto

Nov 28, 2018 7:19 AM in response to tony_a

I had to format my hard drives and because of that they automount again. But the auto mounting is only an issue if I restart. When I first startup, the drives automount and I eject them manually. As long as I don't restart they stay ejected. I use Superduper to backup to those drives that I try to prevent from automounting. Superduper will mount the ejected drive during backup and then eject it again once its finished backing up.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Prevent Automounting

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.