linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: pgnd@dev-mail.net
Cc: linux-hotplug@vger.kernel.org, gregkh@linuxfoundation.org,
	 jeisom@gmail.com
Subject: Re: udev rule in /etc/udev/rules.d/ FAILS to exec on boot; but OK exec @ shell after boot ?
Date: Thu, 21 Dec 2023 16:22:42 +0300	[thread overview]
Message-ID: <CAA91j0VX5-RfLy-hPf6L_+KkAhnTS+okYsNSRVbVJnQGeOvmyg@mail.gmail.com> (raw)
In-Reply-To: <7a270d09-9c53-47d4-b3e7-603062faf647@dev-mail.net>

On Thu, Dec 21, 2023 at 3:26 PM pgnd <pgnd@dev-mail.net> wrote:
>
>
> > Anyway, try asking on the systemd mailing list, which is where udev help
> > can be found, this list really isn't alive anymore at all, sorry.
>
> np, thx. i've posted in systemd:matrix.org; we'll see what pops up there.
>
> > Try running 'udevadm monitor' to watch the events to ensure they are
> > what you think they are.
>
> just to close/comment here before moving on, @ shell after boot
>
>         udevadm monitor | grep enp5s0
>                 KERNEL[40344.410195] change   /devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:05.0/0000:05:00.0/net/enp5s0 (net)
>                 UDEV  [40344.529849] change   /devices/pci0000:00/0000:00:01.2/0000:01:00.0/0000:02:05.0/0000:05:00.0/net/enp5s0 (net)
>
> and, checking boot logs,
>
>         journalctl -b | grep systemd-udevd  | grep /etc
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Trying to open "/etc/systemd/hwdb/hwdb.bin"...
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Trying to open "/etc/udev/hwdb.bin"...
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/11-dm.rules
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/59-persistent-storage-dm.rules
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/59-persistent-storage-md.rules
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/59-persistent-storage.rules
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/61-persistent-storage.rules
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/64-lvm.rules
>                 Dec 20 19:24:16 dev systemd-udevd[522]: Reading rules file: /etc/udev/rules.d/65-md-incremental-imsm.rules
>
> seemingly missing/ignoring,
>
>         ls -al /etc/udev/rules.d/
>                 -rw-r--r--  1 root root 2.2K Dec 20 18:47 99-enp5s0-sysctl.rules
>

Your udevd runs in initrd and this rule is not included there.

>
> where
>
>         find /usr/lib/dracut/modules.d -type f \
>          -iname 11-dm.rules \
>          -o -iname 59-persistent-storage-dm.rules \
>          -o -iname 59-persistent-storage-md.rules \
>          -o -iname 59-persistent-storage.rules \
>          -o -iname 61-persistent-storage.rules \
>          -o -iname 64-lvm.rules \
>          -o -iname 65-md-incremental-imsm.rules
>
>                 /usr/lib/dracut/modules.d/90dm/11-dm.rules
>                 /usr/lib/dracut/modules.d/90dm/59-persistent-storage-dm.rules
>                 /usr/lib/dracut/modules.d/90mdraid/59-persistent-storage-md.rules
>                 /usr/lib/dracut/modules.d/90mdraid/65-md-incremental-imsm.rules
>                 /usr/lib/dracut/modules.d/95udev-rules/59-persistent-storage.rules
>                 /usr/lib/dracut/modules.d/95udev-rules/61-persistent-storage.rules
>                 /usr/lib/dracut/modules.d/90lvm/64-lvm.rules
>
>

      parent reply	other threads:[~2023-12-21 13:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21  0:33 udev rule in /etc/udev/rules.d/ FAILS to exec on boot; but OK exec @ shell after boot ? pgnd
2023-12-21  8:17 ` Greg KH
2023-12-21 12:25   ` pgnd
2023-12-21 13:21     ` pgnd
2023-12-21 13:22     ` Andrei Borzenkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA91j0VX5-RfLy-hPf6L_+KkAhnTS+okYsNSRVbVJnQGeOvmyg@mail.gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jeisom@gmail.com \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=pgnd@dev-mail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).