External USB drive not mounting - Terminal help needed

nealandrews

macrumors newbie
Original poster
Jul 26, 2017
5
0
Hi guys

I used the following terminal commands to stop MacOS automatically mounting an external USB drive...

sudo pico /etc/fstab
UUID=NUMBER none hfs rw,noauto

Source:
https://www.cnet.com/uk/how-to/how-to-prevent-a-volume-from-mounting-at-boot-in-os-x/#

(The USB drive is attached to a Cinema Display, so I was trying to stop it mounting when I plug my MacBook Pro into the display, simply because it's an archive that I don't use often, and it's really noisy when it spins.)

However, now when I plug in the drive, it doesn't mount! Obviously. My bad, I know.

How do I reverse this Terminal command?

Many thanks

Neal
 

gsahli

macrumors 6502a
Jun 1, 2007
646
22
Chicago
sudo means superuser do - it gives you permission to write/edit protected files.
pico is a terminal/text editor
/etc/fstab is a file system table, where permanent mount info is kept.
The UUID line is supposed to identify a specific drive and give mount info.

Be very careful about changing this file.
You can probably fix this by removing the UUID line you added.
It might be safer if you copy and paste that file text (/etc/fstab) here and let us give specific instructions.
 

treekram

macrumors 68000
Nov 9, 2015
1,849
402
Honolulu HI
If you have changed how use the drive and want it automatically mount every time it's connected, then deleting file is want you want, presuming there are no other entries that you have made to fstab.

If you still don't want the drive to mount automatically but will access the drive once in a while, you can keep the fstab file intact but you should be able to use Disk Utility to mount the drive manually.
 

Similar threads

Register on MacRumors! This sidebar will go away, and you'll see fewer ads.