------- Comment From <email address hidden> 2023-11-22 09:17 EDT-------
(In reply to comment #19)
> This was implemented around 2020, mainly to catch any ccw config changes in
> a user friendly way:
> https://bugs.launchpad.net/bugs/1892367
> https://i527439087.restricted.launchpadlibrarian.net/527439087/20f6c87a-829f-
> 11eb-9412-002481e91f22.txt?token=zC4n7TlCmffBDHm9Dl002PsfchDXC3Dk
>
> Regarding:
> "1) Have the generic udev initramfs script not copy zdev-generated Udev
> rules,"
> we need to be super careful here to not break stuff ...
>
> How to best identify the zdev-generated Udev rules,
> since these are not all the rules generated by chzdev (indicated by first
> line in rule), are they?
chzdev creates udev rules that can most easily be recognized via their name:
- 41-<device-type>-<device-id>.rules
- 41-cio-ignore.rules
- 40-zdev-id.rules
So a simple filter would be to skip rules named 41-*.rules on s390x in the initramfs udev hook.
As an alternative, the s390-tools zdev initramfs hook could try to delete specifically those rules with zdev:early=0 that the upstream udev hook created. While this should work correctly, it is also a kind of a workaround, where one hook adds files that another hook removes again...
If this approach is more likely to be acceptable, it could be achieved by adding something like the following to /usr/share/initramfs-tools/hooks/s390-tools-zdev:
# Remove zdev rules not intended for early boot that were copied by udev hook
chzdev --disable --persistent --by-attr zdev:early=0 \
--base "/etc/udev/rules.d/=$DESTDIR/lib/udev/rules.d/" \
--yes --quiet --no-root-update --force >/dev/null 2>&1
------- Comment From <email address hidden> 2023-11-22 09:17 EDT------- /bugs.launchpad .net/bugs/ 1892367 /i527439087. restricted. launchpadlibrar ian.net/ 527439087/ 20f6c87a- 829f- 002481e91f22. txt?token= zC4n7TlCmffBDHm 9Dl002PsfchDXC3 Dk
(In reply to comment #19)
> This was implemented around 2020, mainly to catch any ccw config changes in
> a user friendly way:
> https:/
> https:/
> 11eb-9412-
>
> Regarding:
> "1) Have the generic udev initramfs script not copy zdev-generated Udev
> rules,"
> we need to be super careful here to not break stuff ...
>
> How to best identify the zdev-generated Udev rules,
> since these are not all the rules generated by chzdev (indicated by first
> line in rule), are they?
chzdev creates udev rules that can most easily be recognized via their name: type>-< device- id>.rules
- 41-<device-
- 41-cio-ignore.rules
- 40-zdev-id.rules
So a simple filter would be to skip rules named 41-*.rules on s390x in the initramfs udev hook.
As an alternative, the s390-tools zdev initramfs hook could try to delete specifically those rules with zdev:early=0 that the upstream udev hook created. While this should work correctly, it is also a kind of a workaround, where one hook adds files that another hook removes again...
If this approach is more likely to be acceptable, it could be achieved by adding something like the following to /usr/share/ initramfs- tools/hooks/ s390-tools- zdev:
# Remove zdev rules not intended for early boot that were copied by udev hook rules.d/ =$DESTDIR/ lib/udev/ rules.d/ " \
chzdev --disable --persistent --by-attr zdev:early=0 \
--base "/etc/udev/
--yes --quiet --no-root-update --force >/dev/null 2>&1