On Thu, 2025-02-20 at 16:03 +0000, Alex Kiernan via lists.openembedded.org wrote: > On Thu, Feb 20, 2025 at 3:52 PM Vyacheslav Yurkov via > lists.openembedded.org <[email protected]> > wrote: > > > > From meta/classes-recipe/rootfs-postcommands.bbclass: > > > > # 20:12 < mezcalero> koen: you have three options: a) run > > systemd-machine-id-setup at install time, b) have / read-only and an > > empty file there (for stateless) and c) boot with / writable > > touch ${IMAGE_ROOTFS}${sysconfdir}/machine-id > > fi > > > > We could think of further improvements. One thing that comes to mind is > > changing systemd-systemctl-native to systemd-tools-native and enable the > > build of systemd-machine-id-setup. > > > > Slava > > > > I do know that it was a horrible thing to get right when I rewrote the > shell script in python (which I'm very glad to see the back of): > > # If we populate the systemd links we also create /etc/machine-id, which > # allows systemd to boot with the filesystem read-only before generating > # a real value and then committing it back. > # > # For the stateless configuration, where /etc is generated at runtime > # (for example on a tmpfs), this script shouldn't run at all and we > # allow systemd to completely populate /etc. > > It may be that this behaviour was wrong in some cases, but at the same > time, I remember spending a lot of time getting this right!
I just wanted to add that we've been seeing an odd failure on meta-arm on the autobuilder: https://autobuilder.yoctoproject.org/valkyrie/#/builders/75/builds/1032 and when I did into this, I see this in the logs: [ 3.700441] systemd[1]: Hostname set to <sbsa-ref>. [ 3.704040] systemd[1]: System cannot boot: Missing /etc/machine-id and /etc is mounted read-only. [ 3.704488] systemd[1]: Booting up is supported only when: [ 3.705023] systemd[1]: 1) /etc/machine-id exists and is populated. [ 3.705349] systemd[1]: 2) /etc/machine-id exists and is empty. [ 3.705651] systemd[1]: 3) /etc/machine-id is missing and /etc is writable. [ 10.206513] systemd[1]: Populated /etc with preset unit settings. [ 13.034155] systemd[1]: Queued start job for default target Graphical Interface. [ 13.149568] systemd[1]: Created slice Slice /system/getty. We therefore need to fix the issue with machine-id before we can merge this patch. I will drop it from master-next in the meantime due to this issue. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#211871): https://lists.openembedded.org/g/openembedded-core/message/211871 Mute This Topic: https://lists.openembedded.org/mt/111267385/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
