meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
sw:yocto:overlayfs:machine-id [2026/04/10 18:42] niziaksw:yocto:overlayfs:machine-id [2026/04/10 19:10] (current) niziak
Line 15: Line 15:
 systemd[1]: Failed to start Commit a transient machine-id on disk. systemd[1]: Failed to start Commit a transient machine-id on disk.
 </code> </code>
 +
 +[[https://www.linux.org/docs/man8/systemd-machine-id-commit.html|SYSTEMD-MACHINE-ID-COMMIT(1)]]
  
 It runs because of conditions defined in unit file: It runs because of conditions defined in unit file:
Line 37: Line 39:
 so ''ConditionPathIsMountPoint=/etc/machine-id'' is fulfilled in our case. so ''ConditionPathIsMountPoint=/etc/machine-id'' is fulfilled in our case.
  
 +As workarund ''ConditionFirstBoot=yes'' is added:
 <file ini /etc/systemd/system/systemd-machine-id-commit.service.d/bind-mount-fix.conf> <file ini /etc/systemd/system/systemd-machine-id-commit.service.d/bind-mount-fix.conf>
 [Unit] [Unit]
 ConditionPathIsReadWrite=|/etc ConditionPathIsReadWrite=|/etc
 ConditionPathIsReadWrite=|/mnt/state/machine-id ConditionPathIsReadWrite=|/mnt/state/machine-id
-ConditionFirstBott=yes+ConditionFirstBoot=yes
 ConditionPathIsMountPoint=/etc/machine-id ConditionPathIsMountPoint=/etc/machine-id
 </file> </file>
 +
 +Second approach is [[https://github.com/systemd/systemd/issues/39438|persisting /etc/machine-id on system which is bootstrapped from immutable /usr, with tmpfs on / #39438]]:
 +
 +<file ini /etc/systemd/system/systemd-machine-id-commit.service.d/bind-mount-fix.conf>
 +[Unit]
 +ConditionPathIsReadWrite=
 +ConditionPathIsReadWrite=/var/mutable/etc/
 +ConditionPathIsMountPoint=
 +ConditionPathIsMountPoint=/var/mutable/etc/machine-id
 +
 +[Service]
 +ExecStart=
 +ExecStart=systemd-machine-id-setup --commit --root=/var/mutable/
 +</file>
 +
 +More about problem:
 +[[https://github.com/systemd/systemd/issues/14131|Various use-cases for first boot/machine-id are broken #14131]]