Ask Your Question
0

Disable automatic mounting of USB drives in Fedora.

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

Shubharup gravatar image

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

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
0

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

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

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
0

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

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

ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="sd*|sr", ENV{UDISKSPRESENTATIONHIDE}="1"

Tell me how that goes

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 5,766 times

Last updated: Mar 14 '13