Timeline for systemd: How do I automount a USB filesystem using /etc/fstab?
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 4, 2024 at 12:03 | comment | added | bvargo | So this doesn't require dump or pass? I never remember what they do and there must be defaults for them (0 0?), but that would be helpful. | |
| Feb 7, 2023 at 22:38 | comment | added | Dims | With this config, how to prepare device for ejecting? | |
| Jul 12, 2022 at 17:47 | comment | added | sherrellbc | while this may work, why go through the trouble? if you do just as you have shown above in fstab but for options you specify (perhaps in addition to other useful ones) nofail (noting that you do not use noauto) then the USB will be mounted at boot if it is plugged in. And, in fact, will be mounted any some point in the future if the USB device were to be plugged in at some later time. No need to involve systemd as directly as shown. | |
| Jul 3, 2019 at 9:07 | comment | added | Jonathan Ben-Avraham | Update 2019: I tested this solution successfully on Debian 9.9 and found that it works fine. Note that since this is an automount, df might not show the filesystem as mounted. | |
| S Aug 13, 2018 at 11:32 | history | suggested | Philippe Gachoud | CC BY-SA 4.0 | spellcheck |
| Aug 13, 2018 at 10:59 | review | Suggested edits | |||
| S Aug 13, 2018 at 11:32 | |||||
| Mar 1, 2017 at 4:59 | vote | accept | Tom Hale | ||
| Feb 23, 2017 at 10:28 | comment | added | Tom Hale | /etc/fstab doesn't have the dependency you assert, accepting LABEL=..., PARTLABEL=... and good old /dev/usbkey. You could always setup a udev rule to make /dev/usbkey, but I don't know how to mount using udev alone. | |
| Feb 23, 2017 at 9:52 | comment | added | FelixJN | Is there any advantage to this over a udev rule? This seems very specific for a single device (given the UUID-dependency of fstab), where a udev rule could cover e.g. any USB flash drive. | |
| Feb 23, 2017 at 7:39 | history | answered | Tom Hale | CC BY-SA 3.0 |