Bug#951257: udevadm: please exit nonzero with "Running in chroot, ignoring request." when /proc is not mounted
Andreas Henriksson
andreas at fatal.se
Fri Feb 14 11:05:27 GMT 2020
Hello,
On Thu, Feb 13, 2020 at 02:21:00PM +0100, Michael Biebl wrote:
> Am 13.02.20 um 14:03 schrieb Trent W. Buck:
[...]
> > 78root at DESKTOP-P00TKMM:/# udevadm trigger
> > Failed to scan devices: No such file or directory
>
> You should only get this error message if /sys is not mounted.
> I assume your chroot has neither /sys nor /proc mounted.
>
>
> systemd-udevd.service has
> ConditionPathIsReadWrite=/sys
>
> You could try to convince upstream to add a similar check to "udevadm
> trigger"
>
Just wanted to chime in here and say that another way at looking at this
is to say that calling udevadm (and expecting it to exit with success)
when udev is not running could possibly be considered the bug.
(Or in other words, it feels wrong to me to expect udevadm to exit with
success when it's failing to do the job it was asked to do.)
From a simple codesearch.debian.net search I can see there are atleast
some packages which tries to only conditionally run udevadm, eg. via
'pidof udevd && udevadm ...' and similar in their maintainer scripts.
(Note: this particular check might not be considered perfect, just one
example. This check will still fail if udevd is running in the host
and you're working in a chroot. That might be considered your fault
for not using a separate namespace though, ie. via systemd-nspawn.)
Regards,
Andreas Henriksson
More information about the Pkg-systemd-maintainers
mailing list