1

I have a USB drive that is, for all intensive purposes, permanently inserted. It's a licensing thumb drive for a Windows application I use.

How can I prevent Linux from automounting that drive, since I will never use it while on Linux. My specific flavor is Linux Mint 14 Cinnamon, but I'm assuming this might have something to do with fstab.

4
  • How does your automount works? If its based on udev, simply restrict this device by VID/PID.
    – Eddy_Em
    Mar 10, 2013 at 5:45
  • I doubt it has anything to do with fstab (but if it does, just open up /etc/fstab and comment out the offending line).
    – davidgo
    Mar 10, 2013 at 8:00
  • auto-mounting using fstab takes place at the time of booting. Once loaded and running, fstab entries is not looked for unless told to using mount -a command.
    – paintbox
    Mar 12, 2013 at 17:54
  • Not to post duplicate content, here's my answer. Aug 2, 2021 at 7:01

1 Answer 1

1

If the usb is permanently plugged in you should be able to prevent the usb from auto-mounting with /etc/fstab file. An example of fstab entry follows.

/dev/sdb1 /media/usb auto ro,noauto,user,exec 0 0

If you don't want the device to be mounted automatically, use the noauto option as mentioned in the fourth column. With noauto, the device can be mounted only explicitly. Auto is the default option.

The first column specifies device name. Find your usb's device name using sudo fdisk -l.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.