Skip to content

Commit 786b38c

Browse files
committed
man: Note semantics combining root.transient with composefs.enabled
It's all quite confusing having to reason about both the pre-composefs ostree and the composefs version. But hopefully soon we more firmly leave behind that first legacy. Signed-off-by: Colin Walters <walters@verbum.org>
1 parent 1858d3d commit 786b38c

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

man/ostree-prepare-root.xml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,25 @@ License along with this library. If not, see <https://www.gnu.org/licenses/>.
120120
<varlistentry>
121121
<term><varname>root.transient</varname></term>
122122
<listitem><para>A boolean value; the default is <literal>false</literal>.
123-
If this is set to <literal>true</literal>, then the <literal>/</literal> filesystem will be a writable <literal>overlayfs</literal>,
124-
with the upper directory being a hidden directory (in the underlying system root filesystem) that will persist across reboots by default.
125-
However, changes will <emphasis>be discarded</emphasis> on OS updates!
123+
Setting this flag to <literal>true</literal> requires composefs (See <literal>composefs.enabled</literal>).
124+
When enabled, the root mount point <literal>/</literal> will be an overlayfs whose contents will be stored
125+
in a tmpfs, and hence discarded on OS upgrade or reboot.
126126
</para>
127127
<para>
128-
Enabling this option can be very useful for cases such as packages (dpkg/rpm/etc) that write content into <literal>/opt</literal>,
129-
particularly where they expect the target to be writable at runtime. To make that work, ensure that your <literal>/opt</literal>
130-
directory is *not* a symlink to <literal>/var/opt</literal>, but is just an empty directory.
131-
</para>
132-
<para>
133-
Note the <literal>/usr</literal> mount point remains read-only by default. This option is independent of <literal>etc.transient</literal> and <literal>sysroot.readonly</literal>;
128+
This option is independent of <literal>etc.transient</literal> and <literal>sysroot.readonly</literal>;
134129
it is supported for example to have <literal>root.transient=true</literal> but <literal>etc.transient=false</literal> in which case changes to <literal>/etc</literal> continue
135130
to persist across updates, with the default OSTree 3-way merge applied.
136-
</para></listitem>
131+
Also related to persistence it is important to emphasize that <literal>/sysroot</literal> (the physical root filesystem) is still persistent
132+
by default; in-place OS upgrades can be applied.
133+
</para>
134+
<para>
135+
Enabling this option can make it significantly easier to adopt an image-based model in some circumstances.
136+
For example, if you have a configuration management system that is inspecting machine-specific state and
137+
e.g. dynamically installing packages or applying configuration, it can more easily be adapted to
138+
run on each boot, while still shifting a portion (or ideally most) image configuration to build time
139+
as part of the base image/commit.
140+
</para>
141+
</listitem>
137142
</varlistentry>
138143
<varlistentry>
139144
<term><varname>composefs.enabled</varname></term>

0 commit comments

Comments
 (0)