【问题标题】:How to make usbmount use /etc/fstab configuration如何让 usbmount 使用 /etc/fstab 配置
【发布时间】:2014-10-29 21:52:59
【问题描述】:

我正在使用 Debian wheezy stable,并且尝试在插入特定的 USB 设备时将其自动挂载到指定目录中(不是在启动时或使用 mount 命令)。

我知道如何使用 /etc/fstab 和带有 /etc/fstabmount -a 命令将我的设备挂载到我想要的目录中:

UUID="xxxxxxxxxxxxxxxx" /media/myFolder  ntfs  auto,exec,rw,user,suid,uid=1000 0 0

我也知道如何在插入设备时使用usbmount 来挂载设备。

我的问题是 usbmount 将设备安装在文件夹 /media/usbX 而不是 fstab 指定的目录中。

我没有找到如何更改 usbmount 的配置以使其尊重 /etc/fstab 文件。

有可能吗?如果可以,我该怎么做?

【问题讨论】:

    标签: linux automount


    【解决方案1】:

    查看 /etc/usbmount/usbmount.conf 中的 MOUNTPOINTS。

    # Mountpoints: These directories are eligible as mointpoints for
    # removable storage devices.  A newly plugged in device is mounted on
    # the first directory in this list that exists and on which nothing is
    # mounted yet.
    MOUNTPOINTS="/media/usb0 /media/usb1 /media/usb2 /media/usb3
                 /media/usb4 /media/usb5 /media/usb6 /media/usb7"
    

    【讨论】:

    • MOUNTPOINTS 的问题在于,它似乎使我的目录可用于新的挂载,但我的特定 USB 驱动器并不总是挂载在我想要的目录中。
    • 这似乎是一个错误。这里有一个补丁bugs.debian.org/cgi-bin/bugreport.cgi?bug=350633
    • 这似乎是我正在寻找的。我现在无法测试,但我会尽快提供反馈。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-21
    • 1970-01-01
    • 2019-06-20
    相关资源
    最近更新 更多