[systemd-devel] no installed machine-id vs systemd-in-initramfs
Harald Hoyer
harald.hoyer at gmail.com
Thu Jul 11 02:55:19 PDT 2013
On 07/10/2013 05:26 PM, Colin Walters wrote:
> The gnome-ostree build system generates disk images that can be
> downloaded directly; there is no installer.
>
> In the old model of "dracut shell script + systemd", systemd's main.c
> has:
> if (arg_running_as == SYSTEMD_SYSTEM ...) {
> ...
> machine_id_setup();
> ...
> }
>
> So after mounting the rootfs, we'd end up writing one to /etc (at least
> in gnome-ostree which comes with a writable copy of /etc), and it would
> persist across reboots, and all would be well with the world.
>
> In the new systemd-in-initramfs model, journald is now launched in the
> initramfs. Dracut will copy the host's machine id into the initramfs
> if it exists, but in the gnome-ostree case (or more generally
> "pre-canned OS" case), there isn't one. journald will attempt to start,
> and fail.
>
> One thought I had is to say: If there's no /etc/machine-id in the
> initramfs, write one to /run/machine-id. After mounting the rootfs,
> persist that to /etc.
Err, if there is no machine-id in the initramfs, systemd and journald should do
just fine.
It was this way in F18, F17.
More information about the systemd-devel
mailing list