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
+48Lines changed: 48 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -213,6 +213,54 @@ More on prepare-root: <https://ostreedev.github.io/ostree/man/ostree-prepare-roo
213
213
214
214
Note that regenerating the initramfs is required when changing this file.
215
215
216
+
## Dynamic mountpoints with transient-ro
217
+
218
+
The `transient-ro` option allows privileged users to create dynamic toplevel mountpoints
219
+
at runtime while keeping the filesystem read-only by default. This is particularly useful for
220
+
applications that need to bind mount host paths that may be platform-specific or dynamic.
221
+
222
+
### Use cases
223
+
224
+
This feature addresses scenarios where:
225
+
226
+
- Applications need to bind mount host directories that match the host's absolute paths
227
+
- Platform-specific mountpoints are required (e.g., `/Users` on macOS)
228
+
- Dynamic mountpoints need to be created after deployment but before application startup
229
+
- The filesystem should remain read-only for regular processes
230
+
231
+
### Configuration
232
+
233
+
To enable this feature, add the following to `/usr/lib/ostree/prepare-root.conf`:
234
+
235
+
```toml
236
+
[root]
237
+
transient-ro = true
238
+
```
239
+
240
+
### How it works
241
+
242
+
When `transient-ro=true` is set:
243
+
244
+
1. The overlayfs upper directory is mounted read-only by default
245
+
2. Privileged processes can remount it as writable only in a new mount namespace, and perform arbitrary changes there, such as creating new toplevel mountpoints
246
+
3. These mountpoints persist for the current boot but do not survive reboots or upgrades
247
+
4. Regular processes continue to see a read-only filesystem
248
+
249
+
A privileged process can achieve this using standard Linux commands. For example:
0 commit comments