New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USBmount fails on Debian Stretch #2

Closed
martignoni opened this Issue Aug 19, 2017 · 12 comments

Comments

Projects
None yet
6 participants
@martignoni
Contributor

martignoni commented Aug 19, 2017

On Debian Stretch, USBmount doesn't work, notably with vfat formatted drives.

@ravemir

This comment has been minimized.

ravemir commented Aug 26, 2017

I might be experiencing this, as well. From my experience, neither '/media/usb' drives displayed the expected content, nor did '/var/run/usbmount'.

Using fstab to target a mountpoint, while using the drive's UUID would not help, either.

@ravemir

This comment has been minimized.

ravemir commented Aug 26, 2017

Disregard: after a reboot, the drive was mounted, possibly due to fstab itself.

But after unmounting, plugging off and in, the drive was successfully mounted automatically.

Not sure if expected, but both '/media/usb' and '/var/run/usbmount/' mountpoints were non-exiting, although that's likely due to being overriden by the fstab configurations.

@martignoni : have you tried this? if so, could you provide better details on what you have tried to get it to work?

@martignoni

This comment has been minimized.

Contributor

martignoni commented Aug 27, 2017

@ravemir: to make automount work, I had to drop USBmount (and that's too bad, as it works very well out of the box on Jessie), and use the mechanism used in project nextcloudpi. This works OK on stretch.

But I would be glad to revert to USBmount, for its simplicity of use.

@42Swampy

This comment has been minimized.

42Swampy commented Sep 4, 2017

Can you explain me, how to use the script.
I made it executable and started it. Nothing happened.
I am using raspbian stretch lite.

@mmmmna

This comment has been minimized.

mmmmna commented Sep 13, 2017

In support of ravemir's initial comment, no /var/run/usbmount, because usbmount is not installed (per Synaptic). I'm using (Debian derived) Point Linux 3.2 amd64.

@georgejhunt

This comment has been minimized.

georgejhunt commented Sep 20, 2017

The udev version in stretch does not cooperate with usbmount as well as jessie did. Systemd-udevd.service unit file has an option in stretch which says "MountFlags=slave" which causes the mounted USB drive to disappear after the udev script terminates.
Setting the line to "MountFlages=shared" returns the usbmount function to what worked in jessie.

@martignoni

This comment has been minimized.

Contributor

martignoni commented Sep 20, 2017

@georgejhunt Thanks for this info. Do you know a way to invoke this flag at runtime or is it necessary to change permanently the Systemd-udevd.service unit file? (I'm a bit reluctant to make a change that could break something elsewhere.)

@georgejhunt

This comment has been minimized.

georgejhunt commented Sep 20, 2017

@martignoni

This comment has been minimized.

Contributor

martignoni commented Sep 20, 2017

@georgejhunt: I implemented your suggested fix. It works as intended and doesn't seem to break anything. For reference, this answer on StackExchange details the process.

@rbrito

This comment has been minimized.

Owner

rbrito commented Sep 22, 2017

If anybody has any suggestion and/or improvements that they want me to merge in a new release, please just send a pull request.

@georgejhunt

This comment has been minimized.

georgejhunt commented Sep 29, 2017

Another issue on rpi with only some SD cards. Systemd-udevd.service is started when the rootfs is mounted ReadOnly. This causes efforts by the action scripts in /etc/usbmount/mount.d/ to be unable to write symbolic links (etc). The following unit file restarts the udevd later in the boot process when the file system is ReadWrite. Place this file in /etc/systemd/system/ and do "systemctl enable udev-reboot".

[Unit]
Description=Make sure udev is operating on ReadWrite disk
After=network-online.target

[Service]
ExecStart=/bin/systemctl restart systemd-udevd.service

[Install]
WantedBy=multi-user.target
@martignoni

This comment has been minimized.

Contributor

martignoni commented Oct 20, 2017

@rbrito Did you see pull request? Is there any chance that it get merged?

Cheers!

@rbrito rbrito closed this in eeb7e3a Nov 1, 2017

rbrito added a commit that referenced this issue Nov 1, 2017

Merge pull request #3 from martignoni/master
Fix for issue #2, USBmount fails on Stretch.

Thanks @martignoni for the work!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment