Skip to content
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

prevents system from boot when disk in inserted #7

Open
kapitainsky opened this issue Apr 17, 2019 · 3 comments
Open

prevents system from boot when disk in inserted #7

kapitainsky opened this issue Apr 17, 2019 · 3 comments

Comments

@kapitainsky
Copy link

I have tried this approach (with systemd and 99 rues) on raspberry pi and it works perfectly but when USB disk is inserted it hangs during reboot (soft and hard) - any idea why it might be? I spent a lot of time trying to figure it out but no luck.

@bobhy
Copy link

bobhy commented May 24, 2019

I'm having similar experience with another small system. In my case if the USB disk is plugged in when I boot up, the boot fails and I end up in emergency mode. First error was something about udev timeout waiting for usb-mount.sh. I don't see any log messages from usb-mount.sh itself (but could have missed them!)
As noted above, if I'm careful to leave the device unplugged till the system is up, I can plug it in then and it will mount reliably.

@pejobo
Copy link

pejobo commented May 16, 2020

I can provide a boot log (excerpt):

$ journalctl -b
Apr 25 01:53:59 pi3 kernel: audit: type=1130 audit(1587772439.409:6): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-journal-flush comm="systemd" exe="/usr/lib/systemd/sys>
Apr 25 01:54:55 pi3 systemd-udevd[279]: sda1: Spawned process '/bin/systemctl start [email protected]' [286] is taking longer than 59s to complete
Apr 25 01:54:55 pi3 systemd-udevd[274]: sda2: Spawned process '/bin/systemctl start [email protected]' [287] is taking longer than 59s to complete
Apr 25 01:54:55 pi3 systemd-udevd[271]: sda1: Worker [279] processing SEQNUM=1654 is taking a long time
Apr 25 01:54:55 pi3 systemd-udevd[271]: sda2: Worker [274] processing SEQNUM=1655 is taking a long time
Apr 25 01:55:22 pi3 systemd[1]: dev-mmcblk0p1.device: Job dev-mmcblk0p1.device/start timed out.
Apr 25 01:55:22 pi3 systemd[1]: Timed out waiting for device /dev/mmcblk0p1.
Apr 25 01:55:22 pi3 systemd[1]: Dependency failed for /boot.
Apr 25 01:55:22 pi3 systemd[1]: Dependency failed for Local File Systems.
Apr 25 01:55:22 pi3 systemd[1]: local-fs.target: Job local-fs.target/start failed with result 'dependency'.
Apr 25 01:55:22 pi3 systemd[1]: boot.mount: Job boot.mount/start failed with result 'dependency'.
Apr 25 01:55:22 pi3 systemd[1]: dev-mmcblk0p1.device: Job dev-mmcblk0p1.device/start failed with result 'timeout'.

This is from an arch linux installation on raspberry pi. Wall clock time isn't accurate. mmcblk0p1 is the boot partition. sda is a usb stick plugged in during boot.

Maybe Type=forking is a fix for this? At least this is used here: https://github.com/Ferk/udev-media-automount.

@dzurikmiroslav
Copy link

I have same issue during boot, solved adding --no-block option for systemctl

RUN+="/bin/systemctl --no-block start usb-mount@%k.service"

clach04 added a commit to clach04/automount-usb that referenced this issue Jan 11, 2022
NOTE remove script not yet updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants