[yocto] [systemd-devel] How to automount

Daniel. danielhilst at gmail.com
Tue Sep 22 19:34:15 PDT 2015


Okay, first of all have sure that there is no bash sitting ou your mount
point. Check if the file /etc/udev/rules.d/automount.rules is present. Then
try "udevadm monitor", plug and displug the device and see if you got the
"add" em "remove" events, this is what sould invoke mount.sh. Also check
/etc/udev/mount.blacklist, have sure that your device is not present in
this file.

Next, try to add this "exec > /home/root/mount.sh.log 2>&1" to beginning of
/etc/udev/scripts/mount.sh and try unplug/plug again. This will redirect
all output and errors to /home/root/mount.sh.log file. Check its contents,
there should be an error message or something alike.

I've alredy had problems with FAT filesystems being mounted as ready-only
after some time. This could be circumvented by adding "errors=continue" to
mount options but keep in mind that this is not safe. I would suggest you
to use a native filesystem, like ext4 which is more realible. You can
access it from windows (if this is the reason why you use FAT) with any
sftp client as long as you have openssh in your image features.

Regards,
- dhs

2015-09-22 22:20 GMT-03:00 Paul D. DeRocco <pderocco at ix.netcom.com>:

> > From: Daniel. [mailto:danielhilst at gmail.com]
> >
> > If there is any process using the mount point the umount may
> > fail. If you have a bash running in a folder from the mounted
> > filesystem is the sufficient to umount fail.
> >
> > You can use the fuser -m MOUTPOINT to check this. Adding -k
> > would kill all process using that mount point.
>
> Now I'm totally confused. Renaming /bin/umount to something else, and then
> plugging in the drive, is no longer leaving the successful mount intact. I
> saw it do this twice, but it's not doing it any more. I even tried
> replacing /bin/umount with a script that ran fuser with the results going
> to a file, and it's never being invoked. But the missing /bin/umount does
> indeed screw things up, giving me a slew of FAT-fs read errors. It also
> leaves /run/media/sdb1 as an empty directory that can't be deleted
> ("Device or resource busy") even though fuser doesn't show any processes
> using it.
>
> This makes no sense. How can this auto-mounting not work? Is it known to
> be brittle, or is it believed to be reliable? All I did was include
> udev-extraconf in my build.
>
> --
>
> Ciao,               Paul D. DeRocco
> Paul                mailto:pderocco at ix.netcom.com
>
>


-- 
*"Do or do not. There is no try"*
  *Yoda Master*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20150922/864df3f8/attachment.html>


More information about the yocto mailing list