Prevent a partition on a USB drive auto-mounting in Linux

Posted by nomount on Super User See other posts from Super User or by nomount
Published on 2009-08-20T16:35:17Z Indexed on 2010/06/07 20:23 UTC
Read the original article Hit count: 1097

Filed under:
|
|
|
|

On Linux (Gnome desktop) how do you prevent one of the partitions on an external USB drive auto-mounting when it attached to the machine?

I don't just want to prevent the Nautilus window from popping up -- I want that partition not to mount.

Fiddling with /etc/fstab is not acceptable, as this is a removable drive that is attached to different machines.

I seem to remember that you create a hidden file in the root of the file system, but I can't remember what it's called. Something like:

touch /media/usbdisk/.no-mount

How do you actually make this work?

© Super User or respective owner

Related posts about linux

Related posts about usb