|
| 1 | +# NAME |
| 2 | + |
| 3 | +bootc-root-setup.service |
| 4 | + |
| 5 | +# DESCRIPTION |
| 6 | + |
| 7 | +This service runs in the initramfs to set up the root filesystem when composefs is enabled. |
| 8 | +It is only activated when the `composefs` kernel command line parameter is present. |
| 9 | + |
| 10 | +The service performs the following operations: |
| 11 | + |
| 12 | +- Mounts the composefs image specified in the kernel command line |
| 13 | +- Sets up `/etc` and `/var` directories from the deployment state |
| 14 | +- Optionally configures transient overlays based on the configuration file |
| 15 | +- Prepares the root filesystem for switch-root |
| 16 | + |
| 17 | +This service runs after `sysroot.mount` and `ostree-prepare-root.service`, and before |
| 18 | +`initrd-root-fs.target`. |
| 19 | + |
| 20 | +# CONFIGURATION FILE |
| 21 | + |
| 22 | +The service reads an optional configuration file at `/usr/lib/composefs/setup-root-conf.toml`. |
| 23 | +If this file does not exist, default settings are used. |
| 24 | + |
| 25 | +**WARNING**: The configuration file format and composefs integration are experimental |
| 26 | +and subject to change. |
| 27 | + |
| 28 | +## Configuration Options |
| 29 | + |
| 30 | +The configuration file uses TOML format with the following sections: |
| 31 | + |
| 32 | +### `[root]` |
| 33 | + |
| 34 | +- `transient` (boolean): If true, mounts the root filesystem as a transient overlay. |
| 35 | + This makes all changes to `/` ephemeral and lost on reboot. Default: false. |
| 36 | + |
| 37 | +### `[etc]` |
| 38 | + |
| 39 | +- `mount` (string): Mount type for `/etc`. Options: "none", "bind", "overlay", "transient". |
| 40 | + Default: "bind". |
| 41 | +- `transient` (boolean): Shorthand for `mount = "transient"`. Default: false. |
| 42 | + |
| 43 | +### `[var]` |
| 44 | + |
| 45 | +- `mount` (string): Mount type for `/var`. Options: "none", "bind", "overlay", "transient". |
| 46 | + Default: "bind". |
| 47 | +- `transient` (boolean): Shorthand for `mount = "transient"`. Default: false. |
| 48 | + |
| 49 | +## Example Configuration |
| 50 | + |
| 51 | +```toml |
| 52 | +[root] |
| 53 | +transient = false |
| 54 | + |
| 55 | +[etc] |
| 56 | +mount = "bind" |
| 57 | + |
| 58 | +[var] |
| 59 | +mount = "overlay" |
| 60 | +``` |
| 61 | + |
| 62 | +# EXPERIMENTAL STATUS |
| 63 | + |
| 64 | +The composefs integration, including this service and its configuration file format, |
| 65 | +is experimental and subject to change. |
| 66 | + |
| 67 | +# SEE ALSO |
| 68 | + |
| 69 | +**bootc(8)** |
| 70 | + |
| 71 | +# VERSION |
| 72 | + |
| 73 | +<!-- VERSION PLACEHOLDER --> |
0 commit comments