Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Prevent specific USB device from automounting

    I have a usb drive which is always inserted in my USB slot. However, I do not often use it (but do not want to take it out). Currently, it's being auto-mounted every time I start my computer. I feel this might over time wear out the USB drive unnecessarily. So my question is: how to prevent this particular USB drive from being mounted automatically? Whenever I need it, I'll mount it manually.

  2. #2
    Hello and welcome!

    It is probably udev that is doing the automounting, so the best approach would probably be to track down the rule that is doing it, and create an exception.

    In the interim, you can try and edit the the /etc/fstab file, which controls the mounting of disk drives at boot time. say your USB storage device is /dev/sdb1, you can try this in /etc/fstab:

    /dev/sdb1               /mnt/usbdisk           vfat    noauto    0 0
    just make sure that the filesystem (e.g., vfat) is correct, and that the mount point (/mnt/usbdisk) exists. to mount it manually, just do (as root):
    mount /mnt/usbdisk
    if you want to mount as a regular user, add "user" in the options column (4th field) after noauto (comma-separated).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts