[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

systemd: udev coldplug all devices question



Hello,

There are some devices that when present will cause the "coldplug all devices"
stage at boot to fail. On a normally installed system only an error is reported
in the journal and logs during boot but the system boots normally and the
device also functions normally. But on debian installer media such as netinst
or the Debian live installer images, this failure causes a crash and prevents
users with such devices from being able to run the debian installer from those
installer media.

This was reported as a bug over a year and a half ago on BTS, and the bug
is currently assigned to linux, that is, the Debian Linux Kernel Team. The
problem has also been documented on the Debian installation reports
pseudo package. One of the Debian kernel developers suggested a solution
of increasing the uevent buffer in the kernel from 2k to 4k, and tests showed
that the patch of increasing the buffer in the kernel solved the coldplug all
devices problem.

That bug of too small a buffer size is in the upstream part of the Linux kernel,
so the bug should probably be forwarded to the Linux kernel, and the person
who reported the bug (not me) did report the bug to the Linux kernel, as well
as to the Debian BTS. But neither Debian nor the Linux kernel has acted on the
bug report to try to fix it, except for the suggestion that a Debian kernel
developer made to increase the uevent buffer size in the kernel over a year
ago and another suggestion from another Debian maintainer or developer who
gave me advice on how to document the problem in the installer so the
problem could be included on the debian installer errata page, which is
why I made the installation report. But the debian installer errata page
also was never updated even though I made that installation report over
six months ago:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005308
https://www.debian.org/releases/bullseye/debian-installer/#errata

I also tested a current Fedora Workstation 36 installation in the same
computing environment, which is a virtual environment, and it exhibited
some of the same symptoms that are fixed by the increase of the uevent
buffer in the kernel, but on Fedora at the "coldplug all devices" stage
during boot, the device that was creating data too big for the uevent buffer
in the kernel on both Fedora and Debian did not cause an error message
to be printed to the journal and boot logs on Fedora and also on Fedora the
live and netinst images do not crash, but on Debian these negative things do
happen.

Finally, another workaround to make the Debian live image or the Debian netinst
image bootable with the problematic device was to edit the udev startup script
on the installer image (I think it was in the initrd) to keep it from causing the
catastrophic crash when the "coldplug all devices" command is executed, which
is actually done, IIUC, by the udevadm executable file.

So my question is about udevadm which I think is the command that is executed
during boot to coldplug all devices: Is there a way to write the udev rules
configuration files so that a particular kind of device that perhaps is not really
what I would call "udev-aware" could be excluded from the set of devices that
are coldplugged at boot? I am only asking here in case someone knows the answer
and is willing to tell me, but if no one here can answer my question I will probably
be able to figure it out by examining the differences between the Fedora and
Debian udev rules for the various kinds of devices. I suspect that Fedora wrote
its udev rules so such devices that are not really the kind of devices that need to
be udev-aware and that cause problems or error messages are excluded from
the "coldplug all devices" stage of boot.

For reference, I am talking about Bug #983357 which is the primary
bug report:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=983357

Thanks in advance for any tips from the udev experts.

Kind regards,

Chuck


Reply to: