[OE-core] [OE-Core][PATCH] systemd: Default to non-stateless images

Alex Kiernan alex.kiernan at gmail.com
Mon May 6 09:36:04 UTC 2019


On Mon, May 6, 2019 at 5:54 AM Jonas Bonn <jonas at norrbonn.se> wrote:
>
> Hi Alex,
>
> The below is fine and looks good.  The one thing that bothers me about
> this is that "stateless" isn't really a property of the "distro", rather
> it's a property of the image/machine.

I agree it should be part of image, I'll respin it.

>  I suspect, in the same sense that
> we have readonly-rootfs, that we should probably have image features
> "stateless-rootfs" (no /etc, no /var) and "volatile-rootfs" (no /var).
>

That makes sense to me

> Furthermore, if you want to boot with 'ro' on the command-line, I really
> think you need to build your image with the "readonly-rootfs" feature
> set.  The default should be writable+persistent /etc as that's the
> configuration used 99% of the time (currently).  "readonly-rootfs" does
> a bit more than just creating machine-id but it's all relevant to the
> 'ro' case where /etc isn't writable.
>

I think there's (at least) two use cases for ro boot:

- systems which boot ro and stay that way
- systems which transition to rw during systemd-remount-fs

I'm in the second case as I have no initramfs and need the filesystem
readonly until it's fscked/remounted rw.

> Just for clarification:
>
> i)  volatile-rootfs:  means there's no point in prepopulating /var
> because it's on a tmpfs and needs to be populated at boot time
>
> ii)  stateless-rootfs:  means there's no point in prepopulating neither
> /etc nor /var because they are on a tmpfs and need to be populated at
> boot time
>
> iii)  readonly-rootfs:  means that /etc is really not writable so it's
> important that: the systemd first-boot stuff needs to be done at build
> time:  machine-id, unit files set up, all tmpfiles.d snippets that touch
> /etc and /var need to be done in advance.
>

I'm assuming definitions from here?

http://0pointer.net/blog/projects/stateless.html

Either way, those work for me...




--
Alex Kiernan


More information about the Openembedded-core mailing list