Re: Journalctl reading incorrect file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fr, 29.01.21 11:34, John Lane (systemd@xxxxxxxxxxx) wrote:

> >
> > Is it possible you are playing some weird games with your machine ID
> > or boot ID?
> >
>
> Maybe. Yes. I have a oneshot service that writes /etc/machine-id using
> constant hardware-based info. But I've been using that for over two
> years without any issues.

Ahum. That's not supported, unless you do it before you transition to
the host. The machine ID must stay constant while the host system is
up and running. It's cached everywhere, including in PID 1 and
journald, and if you write it at some arbitrary spot this will break
all over the place. Maybe you were lucky so far, but the file should
not be changed at arbitrary times.

> The reason for settting machine id to a predictable value is because of
> a need to refer to it in scripts etc meant it needed to be known
> up-front, before the first install, but be somehow tied to the machine's
> hardware. So that's what we did.

Write it from the initrd.

You can also set it via a kernel command line option. There was also
the idea of initializing it from an env var passed to PID 1.

Lennart

--
Lennart Poettering, Berlin
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux