[systemd-devel] no installed machine-id vs systemd-in-initramfs
Kay Sievers
kay at vrfy.org
Thu Jul 11 03:04:00 PDT 2013
On Thu, Jul 11, 2013 at 11:55 AM, Harald Hoyer <harald.hoyer at gmail.com> wrote:
> 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.
Didn't it always need an empty file to over-mount it with a temporary
and randomly created one?
Kay
More information about the systemd-devel
mailing list