hwdb.bin not available in initramfs

Bug #2112237 reported by Robert Malz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Triaged
Medium
Unassigned
Jammy
Fix Released
Medium
Unassigned
Noble
Fix Released
Medium
Unassigned
Oracular
Won't Fix
Medium
Unassigned
Plucky
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
Devices that rely on hwdb metadata for proper naming or configuration may not function as expected during initramfs boot.
The issue is that systemd currently does not include the hwdb database in the initramfs, despite the fact that udev rules
triggered during early boot can rely on it.

This can result in:
- Network interfaces being named generically or inconsistently
- Missing metadata required by certain udev rules to configure hardware correctly
- Confusion or misbehavior in early provisioning and installation environments

This can be observed in any environments using devices that rely on metadata from hwdb for correct naming.

The core problem is that the initramfs environment behaves inconsistently compared to the root filesystem environment due to
missing hwdb data, even though the same udev rules run in both.

This issue has been resolved with upstream commit:
https://salsa.debian.org/systemd-team/systemd/-/commit/e3955d1ca26b94b918ca000837f75c0342e77ad7

[Test Case]
Use hardware with known hwdb-dependent behavior.
Without access to such hardware, scenario can be verified using custom hwdb rules:
(assuming a VM with virtio interface)
cat /sys/class/net/enp1s0/device/../modalias
pci:v00001AF4d00001041sv00001AF4sd00001100bc02sc00i00

nano /etc/udev/hwdb.d/99-custom-net-names.hwdb
pci:v00001AF4d00001041*
  ID_NET_NAME_PATH=customvirtio0

build hwdb:
systemd-hwdb --usr update

trigger modified hooks:
update-initramfs -u

reboot into initramfs:
check if hwdb.bin is present
check if udev applies new interface name

[Where problems could occur]
This change affects the systemd-udev initramfs hook, ensuring the hwdb database is installed into the initramfs.
This does not change udev behavior itself, but makes static metadata available in the initramfs.

Potential areas of concern:
- Slight increase in initramfs size.
- If the hook fails to copy hwdb.bin, initramfs builds could break.
- Some environments may have scripts or tools that have adapted to the absence of hwdb data in the initramfs.
These might begin behaving differently once the metadata becomes available for instance, interfaces might be renamed, or metadata-dependent logic could change unexpectedly.

[Other Info]
Upstream commit:
https://salsa.debian.org/systemd-team/systemd/-/commit/e3955d1ca26b94b918ca000837f75c0342e77ad7
Patch is available in Plucky.

Revision history for this message
Nick Rosbrook (enr0n) wrote :

As noted above, this commit is present starting with plucky, so updating the bug tasks.

Changed in systemd (Ubuntu):
status: New → Fix Released
Changed in systemd (Ubuntu Plucky):
status: New → Fix Released
Changed in systemd (Ubuntu Focal):
status: New → Triaged
Changed in systemd (Ubuntu Jammy):
status: New → Triaged
Changed in systemd (Ubuntu Noble):
status: New → Triaged
Changed in systemd (Ubuntu Oracular):
status: New → Triaged
Changed in systemd (Ubuntu Focal):
importance: Undecided → Medium
Changed in systemd (Ubuntu Jammy):
importance: Undecided → Medium
Changed in systemd (Ubuntu Noble):
importance: Undecided → Medium
Changed in systemd (Ubuntu Oracular):
importance: Undecided → Medium
tags: added: systemd-sru-next
Revision history for this message
Ural Tunaboyu (uralt) wrote :

Ubuntu 24.10 (Oracular Oriole) has reached end of life, so this bug will not be fixed for that specific release.

Changed in systemd (Ubuntu Oracular):
status: Triaged → Won't Fix
Nick Rosbrook (enr0n)
description: updated
Revision history for this message
Julian Andres Klode (juliank) wrote : Please test proposed package

Hello Robert, or anyone else affected,

Accepted systemd into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/255.4-1ubuntu8.11 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in systemd (Ubuntu Noble):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Julian Andres Klode (juliank) wrote :

Hello Robert, or anyone else affected,

Accepted systemd into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/249.11-0ubuntu3.17 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in systemd (Ubuntu Jammy):
status: Triaged → Fix Committed
tags: added: verification-needed-jammy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (systemd/249.11-0ubuntu3.17)

All autopkgtests for the newly accepted systemd (249.11-0ubuntu3.17) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

casync/2+20201210-1build1 (arm64)
docker.io-app/27.5.1-0ubuntu3~22.04.2 (amd64, ppc64el, s390x)
exim4/4.95-4ubuntu2.6 (ppc64el)
initramfs-tools/0.140ubuntu13.5 (arm64)
linux-gcp-6.8/6.8.0-1037.39~22.04.1 (arm64)
linux-gke/5.15.0-1088.94 (amd64)
linux-hwe-6.5/6.5.0-45.45~22.04.1 (amd64, arm64)
linux-hwe-6.8/6.8.0-79.79~22.04.1 (arm64)
linux-lowlatency/5.15.0-156.166 (amd64)
linux-lowlatency/unknown (arm64)
linux-lowlatency-hwe-6.5/6.5.0-45.45.1~22.04.1 (arm64)
linux-nvidia-6.5/unknown (arm64)
mosquitto/2.0.11-1ubuntu1.2 (ppc64el)
munin/2.0.57-1ubuntu2 (armhf)
sks/1.1.6+git20210302.c3ba6d5a-4 (amd64, arm64, ppc64el)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#systemd

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (systemd/255.4-1ubuntu8.11)

All autopkgtests for the newly accepted systemd (255.4-1ubuntu8.11) for noble have finished running.
The following regressions have been reported in tests triggered by the package:

casper/1.498 (amd64)
collectd/5.12.0-17.1build2 (s390x)
exim4/4.97-4ubuntu4.3 (ppc64el)
haproxy/2.8.5-1ubuntu3.3 (s390x)
linux-azure-6.11/6.11.0-1018.18~24.04.1 (arm64)
linux-gke/6.8.0-1033.37 (arm64)
linux-hwe-6.11/6.11.0-29.29~24.04.1 (ppc64el)
linux-hwe-6.14/unknown (arm64)
linux-nvidia/6.8.0-1036.39 (amd64)
linux-nvidia-6.11/6.11.0-1013.13 (arm64)
linux-nvidia-6.14/6.14.0-1009.9 (amd64)
linux-nvidia-lowlatency/unknown (arm64)
linux-raspi-realtime/6.8.0-2019.20 (arm64)
linux-realtime/6.8.1-1015.16 (arm64)
linux-xilinx/6.8.0-1017.18 (arm64)
mariadb/1:10.11.13-0ubuntu0.24.04.1 (arm64)
ovn/24.03.2-0ubuntu0.24.04.2 (amd64)
sssd/2.9.4-1.1ubuntu6.3 (s390x)
udisks2/2.10.1-6ubuntu1.3 (ppc64el)
upower/1.90.3-1 (ppc64el, s390x)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/noble/update_excuses.html#systemd

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Athos Ribeiro (athos) wrote (last edit ):

For docker.io-app, please see LP: #2124109. This is a regression due to the debian-archive-keyring package being outdated in jammy. I am currently working on this one. I did get a local run with the fix (available at https://launchpad.net/~athos-ribeiro/+archive/ubuntu/container-stack-qq/+packages) to pass locally using the jammy-proposed pocket, which includes this SRU. Therefore, for this SRU purposes, this should be safe to ignore (throrugh a hint) since it is an unrelated regression in docker.io-app/debian-archive-keyring.

Revision history for this message
Matthew Ruffell (mruffell) wrote :

Hi Robert,

Please verify this bug for jammy and noble.

Thanks,
Matthew

Revision history for this message
Robert Malz (rmalz) wrote :

Test plan:
Verify if hwdb will modify virtio interface name based on following steps:
cat /sys/class/net/enp1s0/device/../modalias
pci:v00001AF4d00001041sv00001AF4sd00001100bc02sc00i00

nano /etc/udev/hwdb.d/99-custom-net-names.hwdb
pci:v00001AF4d00001041*
  ID_NET_NAME_PATH=customvirtio0

build hwdb:
systemd-hwdb --usr update

trigger modified hooks:
update-initramfs -u

reboot into initramfs
- check if hwdb.bin is present
- check if udev applies new interface name

Results:
Jammy
systemd, udev 249.11-0ubuntu3.17
- hwdb.bin is present in initramfs
- udev rules have been applied

Noble
systemd, udev 255.4-1ubuntu8.11
- hwdb.bin is present in initramfs
- udev rules have been applied

tags: added: verification-done verification-done-jammy verification-done-noble
removed: verification-needed verification-needed-jammy verification-needed-noble
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 255.4-1ubuntu8.11

---------------
systemd (255.4-1ubuntu8.11) noble; urgency=medium

  [ Nick Rosbrook ]
  * initramfs-tools: copy hwdb.bin to initramfs (LP: #2112237)
  * d/t/tests-in-lxd: drop patching workaround (LP: #2115263)
    - d/t/control: add Depends: dnsmasq-base
      (Revealed by test progressing past previous failure)
  * initramfs-tools: filter out zdev rules in the initramfs hook (LP: #2044104)
    Backport the logic from plucky onward, but adjust the version string for
    noble.
  * test: fall back to SYSLOG_IDENTIFIER= matching in TEST-75-RESOLVED
    Partially backport the test fix from 49a954b08654dd06bab71224a2398a65c2555549,
    only targeting TEST-75-RESOLVED.

  [ Matthew Ruffell ]
  * pcrlock: handle measurement logs where hash algs in header.
    Fix pcrlock log to function correctly reading the TPM eventlog on hyper-v VMs
    (LP: #2115391)

  [ Chengen Du ]
  * network/dhcp6: consider the DHCPv6 protocol as finished when conflict addresses exist
    (LP: #2115418)

  [ Mario Limonciello ]
  * Drop support for using actual brightness (LP: #2110585)

 -- Nick Rosbrook <email address hidden> Fri, 11 Jul 2025 14:52:59 -0400

Changed in systemd (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Nick Rosbrook (enr0n) wrote : Update Released

The verification of the Stable Release Update for systemd has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 249.11-0ubuntu3.17

---------------
systemd (249.11-0ubuntu3.17) jammy; urgency=medium

  [ Nick Rosbrook ]
  * initramfs-tools: copy hwdb.bin to initramfs (LP: #2112237)
  * d/t/tests-in-lxd: drop patching workaround (LP: #2115263)
    - d/t/control: add Depends: dnsmasq-base
      (Revealed by test progressing past previous failure)

  [ Chengen Du ]
  * core/device: fix devlink handling (LP: #2100252)

 -- Nick Rosbrook <email address hidden> Tue, 26 Aug 2025 11:23:06 -0400

Changed in systemd (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.