Closed pvalena closed 6 months ago
I like and support this approach.
Note that the downstream issue would not be resolved unless somehow hwdb.d/20-net-ifname.hwdb also gets installed into the initramfs.
Is that outside of the scope of this PR (perhaps it should be) ?
Note that the downstream issue would not be resolved unless somehow hwdb.d/20-net-ifname.hwdb also gets installed into the initramfs.
No, that's not needed. .hwdb
files are not used directly; they must first be compiled into hwdb.bin
, which is a binary format optimized for fast lookup. The compilation (udevadm hwdb --update
) is out of scope of udevd. E.g., in rpm
world it is likely done in %post
(or %posttrans
) of any package that installs a .hwdb
file. Hence, dracut only needs to install hwdb.bin
file(s).
Note that the downstream issue would not be resolved unless somehow hwdb.d/20-net-ifname.hwdb also gets installed into the initramfs.
No, that's not needed.
.hwdb
files are not used directly; they must first be compiled intohwdb.bin
, which is a binary format optimized for fast lookup. The compilation (udevadm hwdb --update
) is out of scope of udevd. E.g., inrpm
world it is likely done in%post
(or%posttrans
) of any package that installs a.hwdb
file. Hence, dracut only needs to installhwdb.bin
file(s).
Exactly. I've just confirmed: https://gist.github.com/pvalena/873bed9e9eb749f127ca7f60c330dd3d
+ # The alternative location is preferred, as we can consider it being user
+ # configuration.
IOW first looks in /usr
and then in /etc
. I don't know what systemd-hwdb
behaviour is, it might be best to mimic it. Either way I see having hwdb.bin
in both locations (or installing it) undesirable.
Changes
Adding a module to install hwdb. Further extensions might make only selected part of hwdb installable, to save space. The module is not included by default.
Including the module adds 2MB of compressed data (on Fedora, the file has 12MB).
hwdb is needed in case of custom HW, like a keyboard/mouse or various interfaces.
Original PR: https://github.com/dracutdevs/dracut/pull/1681 Downstream Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1968118
Please note that
hwdb.bin
is similarly installed bysystemd-udevd
, which could instead pull in this module as dependency.Checklist