Thanks! Persisting the /etc/machine-id file on firmware updates will resolve this issue.
From: Mantas Mikulėnas <grawity@xxxxxxxxx> CAUTION: This email originated from outside of the organization. Do not click links or open attachments
unless you recognize the sender and know the content is safe. On Tue, Mar 1, 2022 at 4:39 PM
Eric.Zaluzec@xxxxxxxxxx <Eric.Zaluzec@xxxxxxxxxx> wrote:
This is not a 'hash' – it's the
machine ID, which is directly read from
/etc/machine-id. Normally the machine ID is randomly generated during first
boot (it's just a random UUID), and it is supposed to be persistent afterwards. It sounds like your
/etc doesn't have that file and is on a read-only rootfs, so systemd generates a new machine-id in tmpfs every boot. The device probably has *some* persistent storage though, so try to find a way to make /etc/machine-id persist as well (see the
machine-id(5) manual page for a few possibilities). The intent of using machine-id subdirectories is to allow containers' journal directories to be symlinked on the host, or remote system journals to be collected on a single system – there's actually the
journalctl -m option to make it look at "foreign" journals, so e.g.
journalctl -m -f could be used to watch logs of all containers. (The machine ID is also used as the base for systemd-networkd's DHCPv4 Client ID, DHCPv6 DUID, and IPv6 address generation. But other than that, though, I can't think of any its uses that would be visible externally – aside from desktop-specific
things like pulseaudio – so in some cases it might be "good enough" to pre-define a fixed ID in the template image as a last resort.) -- Mantas Mikulėnas |