Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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
Question marked as Top-ranking reply

Posted on Oct 14, 2018 5:07 PM

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

Similar questions

9 replies
Sort By: 
Question marked as Top-ranking reply

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

Reply

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?

Reply

Oct 3, 2018 8:31 AM in response to kpdesigns

Let me preface that I don’t have an answer for you, but out of curiosity, I have a question:


Is there a reason why you don’t want them to mount? If you just don’t want them on the desktop, you could simply change your preferences to not show them.

Reply

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

Reply

Nov 28, 2018 7:12 AM in response to kpdesigns

I used the same procedure as yours but it does not work with me, maybe because Apple has added additional “security” features to the 2018 Mac Mini. I’m running the latest beta version of Mojave.


I tried it on SSDs installed in two external Thunderbolt 3 enclosures without success.

Reply

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.

Reply

Prevent Automounting

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