← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2112237] [NEW] hwdb.bin not available in initramfs

 

Public bug reported:

[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 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.

** Affects: systemd (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Focal)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Jammy)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Noble)
     Importance: Undecided
         Status: New

** Affects: systemd (Ubuntu Oracular)
     Importance: Undecided
         Status: New

** Also affects: systemd (Ubuntu Focal)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Noble)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Jammy)
   Importance: Undecided
       Status: New

** Also affects: systemd (Ubuntu Oracular)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2112237

Title:
  hwdb.bin not available in initramfs

Status in systemd package in Ubuntu:
  New
Status in systemd source package in Focal:
  New
Status in systemd source package in Jammy:
  New
Status in systemd source package in Noble:
  New
Status in systemd source package in Oracular:
  New

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 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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2112237/+subscriptions



Follow ups