Why is this a binary multi-megabyte blob /etc/udev/hwdb.bin and why under /etc?

Should I store it with etckeeper?

  • I suspect, it could be same binary cache for the udev. If it is, it should be below /var/lib. I hope somebody gives a good answer, also I am curious. :-) – peterh - Reinstate Monica Sep 22 '17 at 20:30

man hwdb:

Hardware Database Files

-- snipping unnecessary documentation details for this answer ---

The content of all hwdb files is read by systemd-hwdb(8) and compiled to a binary database located at /etc/udev/hwdb.bin, or alternatively /usr/lib/udev/hwdb.bin if you want ship the compiled database in an immutable image. During runtime, only the binary database is used.

man systemd-hwdb:

systemd-hwdb [options] update

Update the binary database.

You don't need to put this file in any /etc/ version control, as long as you figure out when your specific distro runs systemd-hwdb. Search for any systemd units that could be generating this file at boot or at specific runtime trigger/action.

And, it's up to the distribution to choose if it will store this binary at /etc/udev or /usr/lib/udev under the name hwdb.bin.

  • 1
    Thanks. /usr/bin/systemd-hwdb --version works, and these files exist and contain valid definitions, so my system is "good" and I can omit this file from etckeeper versioning: /usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-update.service and /usr/lib/systemd/system/systemd-hwdb-update.service – Jeroen Wiert Pluimers Sep 23 '17 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.