Ask Your Question

Disable automatic mounting of USB drives in Fedora.

asked 2013-03-14 17:21:18 -0500

Shubharup gravatar image

updated 2014-09-28 19:19:45 -0500

mether gravatar image

I'm using Fedora 18 (Spherical Cow) with Cinnamon as my Desktop Environment.

I have a USB external drive that has two partitions. Whenever I plug it in, Fedora automatically mounts both the partitions. I don't need the second partition to be mounted.

In fact, I don't want either of the partitions to be mounted automatically. I want to plug the device in, and mount the either or both of the partitions manually.

So, how do I get around this issue? Any help would be appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2013-03-14 19:29:57 -0500

updated 2013-03-14 19:31:49 -0500

Create an entry in /etc/fstab for the two volumes. Such a line might look like this:

UUID=d8743e85-3243-8903-fed87ab4 none vfat noauto,defaults 0 0

You can get the the UUID and the filesystem type (vfat in the example) from the output of su -c 'blkid'. none would typically be the mountpoint - but we're using the special value of none because you don't want it to mount.

This way, you don't have to disable automounting for all possible storage devices, just the specific ones that bother you.

edit flag offensive delete link more

answered 2013-03-14 17:44:32 -0500

USB devices are managed by udisk and hot hal i believe, so, you can create a file with a rule to disable auto-mount.

In a console type:

vi /etc/udev/rules.d/10-local.rules


Tell me how that goes

edit flag offensive delete link more

Question Tools


Asked: 2013-03-14 17:21:18 -0500

Seen: 5,990 times

Last updated: Mar 14 '13