[yocto] udev automount.rules not running on boot

Gary Thomas gary at mlbassoc.com
Thu May 5 20:51:52 PDT 2016


On 2016-05-05 21:56, Paul Knopf wrote:
> It appears that /dev isn't mounted by the time the rules fire.
>
> What I winded up doing is creating a init.d script that re-triggers an "add" command for any block device partitions.
>
> -------------------------
>
> #!/bin/sh
>
> for line in `cat /proc/partitions |grep -e [s]d[a-z][0-9]$ |awk '{print $4}'`; do
>    block_number=`expr "$line" : '[a-z]\{3\}\(.\)*'`
>    block_name=`expr "$line" : '\([a-z]\{3\}\).*'`
>    echo $block_number
>    echo $block_name
>    echo add > /sys/block/$block_name/$block_name$block_number/uevent
> done
>
> -------------------------
>
> This causes the "add' event to be re-triggered, making the USB mount on boot.
>
> On Thu, May 5, 2016 at 1:57 PM Paul Knopf <pknopf at medxchange.com <mailto:pknopf at medxchange.com>> wrote:
>
>     I am using the automount.rules in udev-extra-conf.
>
>     If I boot up with a block device plugged in, nothing is mounted. If I plug in the device AFTER the machine is
>     booted, it shows up (in /run/media/*).
>
>     How do I get these rules to be applied on boot?
>     --

What is your configuration (target, distro, repo version, etc)?
Do you have any "fine tuning" in local.conf (or elsewhere)?

This works fine for me using master (krogoth) on all the targets I use.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------



More information about the yocto mailing list