All of lore.kernel.org
 help / color / mirror / Atom feed
* udev automount.rules not running on boot
@ 2016-05-05 17:57 Paul Knopf
  2016-05-05 19:56 ` Paul Knopf
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Knopf @ 2016-05-05 17:57 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 345 bytes --]

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?
-- 

Thanks,
Paul Knopf
Software Engineer
Med X Change, Inc
pknopf@medxchange.com

[-- Attachment #2: Type: text/html, Size: 527 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: udev automount.rules not running on boot
  2016-05-05 17:57 udev automount.rules not running on boot Paul Knopf
@ 2016-05-05 19:56 ` Paul Knopf
  2016-05-06  3:51   ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Knopf @ 2016-05-05 19:56 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

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@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?
> --
>
> Thanks,
> Paul Knopf
> Software Engineer
> Med X Change, Inc
> pknopf@medxchange.com
>
-- 

Thanks,
Paul Knopf
Software Engineer
Med X Change, Inc
pknopf@medxchange.com

[-- Attachment #2: Type: text/html, Size: 2053 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: udev automount.rules not running on boot
  2016-05-05 19:56 ` Paul Knopf
@ 2016-05-06  3:51   ` Gary Thomas
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Thomas @ 2016-05-06  3:51 UTC (permalink / raw)
  To: yocto

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@medxchange.com <mailto:pknopf@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
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-06  3:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-05 17:57 udev automount.rules not running on boot Paul Knopf
2016-05-05 19:56 ` Paul Knopf
2016-05-06  3:51   ` Gary Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.