You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/filesystem.md
+33-3Lines changed: 33 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,8 @@ in derived builds.
70
70
## `/etc`
71
71
72
72
The `/etc` directory contains mutable persistent state by default; however,
73
-
it is suppported to enable the [`etc.transient` config option](https://ostreedev.github.io/ostree/man/ostree-prepare-root.html).
73
+
it is suppported to enable the [`etc.transient` config option](https://ostreedev.github.io/ostree/man/ostree-prepare-root.html),
74
+
see below as well.
74
75
75
76
When in persistent mode, it inherits the OSTree semantics of [performing a 3-way merge](https://ostreedev.github.io/ostree/atomic-upgrades/#assembling-a-new-deployment-directory)
76
77
across upgrades. In a nutshell:
@@ -79,7 +80,7 @@ across upgrades. In a nutshell:
79
80
- The diff between current and previous `/etc` is applied to the new `/etc`
80
81
- Locally modified files in `/etc` different from the default `/usr/etc` (of the same deployment) will be retained
81
82
82
-
The implmentation of this defaults to being executed by `ostree-finalize-staged.service`
83
+
The implementation of this defaults to being executed by `ostree-finalize-staged.service`
83
84
at shutdown time, before the new bootloader entry is created.
84
85
85
86
The rationale for this design is that in practice today, many components of a Linux system end up shipping
@@ -95,6 +96,13 @@ would require external intervention to apply.
95
96
96
97
For more on configuration file best practices, see [Building](building/guidance.md).
97
98
99
+
### `/usr/etc`
100
+
101
+
The `/usr/etc` tree is generated client side and contains the default container image's
102
+
view of `/etc`. This should generally be considered an internal implementation detail
103
+
of bootc/ostree. Do *not* explicitly put files into this location, it can create
104
+
undefined behavior. There is a check for this in `bootc container lint`.
105
+
98
106
## `/var`
99
107
100
108
Content in `/var` persists by default; it is however supported to make it or subdirectories
@@ -178,11 +186,33 @@ To do this, set the
178
186
transient = true
179
187
```
180
188
181
-
option in `prepare-root.conf`. In particular this will allow software to
189
+
option in `/usr/lib/ostree/prepare-root.conf`. In particular this will allow software to
182
190
write (transiently, i.e. until the next reboot) to all top-level directories,
183
191
including `/usr` and `/opt`, with symlinks to `/var` for content that should
184
192
persist.
185
193
194
+
This can be combined with `etc.transient` as well (below).
195
+
196
+
More on prepare-root: <https://ostreedev.github.io/ostree/man/ostree-prepare-root.html>
197
+
198
+
## Enabling transient etc
199
+
200
+
The default (per above) is to have `/etc` persist. If however you do
201
+
not need to use it for any per-machine state, then enabling a transient
202
+
`/etc` is a great way to reduce the amount of possible state drift. Set
203
+
the
204
+
205
+
```toml
206
+
[etc]
207
+
transient = true
208
+
```
209
+
210
+
option in `/usr/lib/ostree/prepare-root.conf`.
211
+
212
+
This can be combined with `root.transient` as well (above).
213
+
214
+
More on prepare-root: <https://ostreedev.github.io/ostree/man/ostree-prepare-root.html>
215
+
186
216
## Enabling state overlays
187
217
188
218
This feature enables a writable overlay on top of `/opt` (or really, any
0 commit comments