]> code.ossystems Code Review - openembedded-core.git/commit
systemd: Default to non-stateless images
authorAlex Kiernan <alex.kiernan@gmail.com>
Wed, 8 May 2019 15:57:26 +0000 (16:57 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 9 May 2019 15:31:06 +0000 (16:31 +0100)
commitc5fb399f5894c16cf8eeadd507dc38c29b0fd657
treeb1727a8ab12746d5951d947ac540a5a44946a0b9
parentddc2baa8b7ef6ecd6ed450bb8b3ed986b6797d9f
systemd: Default to non-stateless images

When creating images, for anything other than the explicitly stateless
case, touch /etc/machine-id so that the images can be booted without an
initramfs and with `ro` set on the kernel command line, otherwise system
refuses to start:

  [    7.222134] systemd[1]: No hostname configured.
  [    7.227266] systemd[1]: Set hostname to <localhost>.
  [    7.232622] systemd[1]: System cannot boot: Missing /etc/machine-id and /etc is mounted read-only.
  [    7.241750] systemd[1]: Booting up is supported only when:
  [    7.247362] systemd[1]: 1) /etc/machine-id exists and is populated.
  [    7.253752] systemd[1]: 2) /etc/machine-id exists and is empty.
  [    7.259757] systemd[1]: 3) /etc/machine-id is missing and /etc is writable.

If IMAGE_FEATURES includes `stateless-rootfs` then systemctl-native is
not run on the image leaving the image for population at runtime by
systemd.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image.bbclass
meta/recipes-core/systemd/systemd-systemctl/systemctl