<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 11, 2023, 10:54 Lennart Poettering <<a href="mailto:lennart@poettering.net">lennart@poettering.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On So, 10.09.23 00:33, Nils Kattenbeck (<a href="mailto:nilskemail@gmail.com" target="_blank" rel="noreferrer">nilskemail@gmail.com</a>) wrote:<br>
<br>
> Hello, I am currently trying to build a linux image with discoverable<br>
> partitions in an A/B+etc+var scheme.<br>
<br>
The discoverable partition scheme has no concept of /etc/ discovery. It<br>
focusses on three basic setups:<br>
<br>
1. writable root fs that contains /etc/, /var/ and /usr/ directly.<br>
2. writable root fs that contains /etc/ and /var/ and gets an<br>
immutable /usr/ mounted in<br>
3. immutable root fs that contains /etc/ and /usr/ directly and gets a<br>
writable /var/ mounted in. (the latter possibly as tmpfs, for truly<br>
stateless systems)</blockquote></div></div><div dir="auto"><br></div><div dir="auto">There is also 4. with a writeable root which only contains /etc, an immutable /usr and a temporary /var. Though I guess that can be covered with the existing DPS...?</div><div dir="auto"><br></div><div dir="auto"></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It was out assumption that these three cases should cover most<br>
intended behaviours nicely, i.e. systems with modifiable config, code<br>
and state. systems with modifiable config and state, but immutable<br>
code. And finally systems with immutable config and code, but<br>
modifiable state.<br>
<br>
A system where /etc/ was separate from the root fs is not covered by<br>
the above, because it is not clear what that would get us. if you want<br>
it immutable, why not stick it on an immutable root fs. And if you<br>
want it writable, why not stick it on a writable root fs directly?</blockquote></div></div><div dir="auto"><br></div><div dir="auto">My use case is basically 2, /etc has to be writeable to persist the machine-id across reboots, /var also has to be writeable and /usr can be immutable.</div><div dir="auto"><br></div><div dir="auto">The problem I am then likely facing is that I create the partitions wrong. I am using mkosi and tried several different repart.d configuration with type=root+type=usr, type=root+type=var+type=use, and different CopyFiles= and Exclude(Target)Files= but none of them seemed to have worked.</div><div dir="auto"><br></div><div dir="auto">Are there special requirements for what the respective partitions must or shall not contain when using several auto-discovered partitions? Or should I ask on the mkosi issue tracker?</div><div dir="auto"><br></div><div dir="auto">Kind regards,</div><div dir="auto">Nils</div><div dir="auto"></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>