
(Note: the systemctl start local-fs.target command is recommended way to trigger fstab disks mount in systemd manual. So the solution which worked for me was creating the new udev rule that triggers local-fs.target each time the new disk is inserted: $ cat /etc/udev/rules.d/lesĪCTION="add", KERNEL="sd?", SUBSYSTEM="block", RUN+="/bin/systemctl start local-fs.target" (While on Stretch there was local-fs.target and the correspondent vice, both were listed.) As a result, when the disk was inserted, it did not trigger my-mount.mount unit to start. I verified it with systemctl show my-mount.mount command: the device was missing in the WantedBy= list, there was only local-fs.target. (transitively) depends on local-fs.target is started. Particular if it is part of local-fs.target, and any unit which Note that the mount unit may be started for other reasons, in Will not cause the mount unit to be started automatically. This means that simply plugging in the device Generators do not automatically pull in the corresponding. device units generated by systemd-fstab-generator and other Then, select the correct one from the list that appears. If it doesn’t guess correctly, click on Change under the device. The culprit of the problem, it seems, was the change in new systemd version: * The. balenaEtcher guesses the intended target flash drive and presents its choice as the second step. (The disks would mount fine on reboot, though.) All my disks are specified in fstab, and they were automatically mounted on hot plugin just fine in Stretch. In my case, I am using /etc/fstab, so systemd automatically generates mount units from it.
#Target flash drive upgrade#
Same issue happened to me after upgrade from Stretch to Buster (headless Raspberry Pi Zero W).

Sudo systemctl enable -now mnt-mountpoint.mount tomount

Use blkid to replace the UUID_here with the uuid of /dev/sdb1.Ĭreate the tomount file: sudo nano /etc/systemd/system/tomountĪttach your USB then enable and start the units: sudo systemctl daemon-reload in addition to a smartly branded USB flash Drive, your target audience will.

Note: The name of the unit file should be dir-sub-dir.mount extracted from the mount point /dir/sub-dir (if you need to mount the device under /media/mountpoint the name will be media-mountpoint.mount) All of our USB Flash Drives can be preloaded according to your particular. To mount /dev/sdb1 under /mnt/mountpoint, create a mnt-mountpoint.mount file: sudo nano /etc/systemd/system/mnt-mountpoint.mount You can create systemd.mount and tomount unit files.
