[systemd-devel] systemd-journald.service failed to start with systemd v189
Richard Maw
richard.maw at codethink.co.uk
Mon Sep 24 08:19:15 PDT 2012
On Mon, Sep 24, 2012 at 05:04:11PM +0200, Nicolas Aguirre wrote:
> 2012/9/24 Lennart Poettering <lennart at poettering.net>:
> Ok,
>
> I did what you said, and it appears that the problem is located in
> journald.c, in system_journal_open function, when it tries to read the
> machine-id,
> it can't open /etc/machine-id.
>
> My RFS is readonly , I use Ubi/Ubifs root filesystem. To fix the
> problem of machine-id i added a symbolic link :
>
> ln -sf /var/volatile/machine-id /etc/machine-id
>
> IIRC systemd creates this machine-id file once, but in my case it's
> created every time i boot because /var/volatile is tmpfs. It seems
> that this symbolic link is broken when journald service starts,
> sometimes.
Systemd will attempt to do something similar if it can't read
/etc/machine-id. It generates a machine-id in /run and bind-mounts it on
top of /etc/machine-id. This fails if the file is missing, since it
needs the file to exist as a mount point, but if you put an empty
machine-id there then it will generate it correctly.
Systemd falls back to a random machine-id as a last resort, it will use
the d-bus machine id file or the machine id passed by the virtualization
software, so if you set the d-bus machine id, it should also work.
More information about the systemd-devel
mailing list