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!
Alex
> On 20.02.2025 16:33, Vyacheslav Yurkov via lists.openembedded.org wrote:
> > Isn't is supposed to be created on first boot?
> >
> > Slava
> >
> > On 20.02.2025 15:07, Ross Burton wrote:
> >> On 19 Feb 2025, at 10:39, Vyacheslav Yurkov via
> >> lists.openembedded.org <[email protected]>
> >> wrote:
> >>> From: Vyacheslav Yurkov <[email protected]>
> >>>
> >>> Instead of the python re-implementation build the actual systemctl from
> >>> the systemd source tree. The python script was used when systemd didn't
> >>> provide an option to build individual executables. It is possible in
> >>> the
> >>> meantime, so instead of always adapting the script when there's a new
> >>> functionality, we simply use upstream implementation.
> >> If I compare an image built with master and this, there’s one notable
> >> change in the file list:
> >>
> >> Changes to images/qemuarm64/glibc/core-image-full-cmdline
> >> (files-in-image.txt):
> >> /etc/machine-id was removed
> >>
> >> The good news is that apart from that the final images are identical,
> >> but that change wasn’t expected.
> >>
> >> Ross
> >
>
>
>
>
--
Alex Kiernan
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211769):
https://lists.openembedded.org/g/openembedded-core/message/211769
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]]
-=-=-=-=-=-=-=-=-=-=-=-