Skip to content

Obtain machine-id from SMBIOS, DT, or TPM (on bare metal) #30707

@septatrix

Description

@septatrix

Component

systemd

Is your feature request related to a problem? Please describe

On stateless systems there is currently no way to persist the machine-id even though this may often be desirable. Sometimes systems are only stateless for robustness reasons and would benefit from persistent identification.

An example of this would be the planned support of slow update rollouts with sysupdate. This mechanism would likely be based on some function which uses the machine-id, version, and threshold percentage as an input and checks if the machine-id crosses the threshold¹. If these devices reboot frequently they would get multiple tries to pass the threshold raising their chance to install the update and skewing the rollout percentage.

¹ Something like: (sd_id128_get_machine_app_specific(<version>) & 0xFF) / 0xFF < threshold (I have never calculated with 128 bit numbers but the ratio should be correct. Also UUIDv4 has fixed bits but as we hash it we can disregard that.)

Describe the solution you'd like

Similar to KVM and QEMU, the machine-id should also be tried to be gathered from SMBIOS or the DT on bare metal. Another suggestion was looking up an ID from the TPM.

Describe alternatives you've considered

An addition source for this could have been MAC addresses though these are sometimes also only randomly generated, have a lower bit size, and the drivers/devices may not be available at early boot.

The systemd version you checked that didn't have the feature you are asking for

255

Metadata

Metadata

Assignees

No one assigned

    Labels

    RFE 🎁Request for Enhancement, i.e. a feature requestpid1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions