@@ -32,17 +32,18 @@ However, nothing *else* (external) is required to perform a basic installation
32
32
to disk - the container image itself comes with a baseline self-sufficient installer
33
33
that sets things up ready to boot.
34
34
35
- This is motivated by experience gained from the Fedora CoreOS
36
- project where today the expectation is that one boots from a pre-existing disk
37
- image (AMI, qcow2, etc) or uses [ coreos-installer] ( https://github.com/coreos/coreos-installer )
38
- for many bare metal setups. But the problem is that coreos-installer
39
- is oriented to installing raw disk images. This means that if
40
- one creates a custom derived container, then it's required for
41
- one to also generate a raw disk image to install. This is a large
42
- ergonomic hit.
43
-
44
- With the ` bootc ` install methods, no extra steps are required. Every container
45
- image comes with a basic installer.
35
+ ## Internal vs external installers
36
+
37
+ The ` bootc install to-disk ` process only sets up a very simple
38
+ filesystem layout, using the default filesystem type defined in the container image,
39
+ plus hardcoded requisite platform-specific partitions such as the ESP.
40
+
41
+ In general, the ` to-disk ` flow should be considered mainly a "demo" for
42
+ the ` bootc install to-filesystem ` flow, which can be used by "external" installers
43
+ today. For example, in the [ Fedora/CentOS bootc project] ( https://docs.fedoraproject.org/en-US/bootc/ )
44
+ project, there are two "external" installers in Anaconda and ` bootc-image-builder ` .
45
+
46
+ More on this below.
46
47
47
48
## Executing ` bootc install `
48
49
@@ -98,22 +99,19 @@ the image in `/etc/ostree/auth.json`.
98
99
Alternatively, the secret can be added after an installation process completes and managed separately;
99
100
in that case you will need to specify ` --skip-fetch-check ` .
100
101
101
- ### Operating system install configuration required
102
+ ### Configuring the default root filesystem type
102
103
103
- The container image ** MUST** define its default install configuration. A key choice
104
- that bootc by default leaves up to the operating system image is the root filesystem
105
- type.
104
+ To use the ` to-disk ` installation flow, the container should include a root filesystem
105
+ type. If it does not, then each user will need to specify ` install to-disk --filesystem ` .
106
106
107
- To enable ` bootc install ` as part of your OS/distribution base image,
107
+ To set a default filesystem type for ` bootc install to-disk ` as part of your OS/distribution base image,
108
108
create a file named ` /usr/lib/bootc/install/00-<osname>.toml ` with the contents of the form:
109
109
110
110
``` toml
111
111
[install .filesystem .root ]
112
112
type = " xfs"
113
113
```
114
114
115
- The ` install.filesystem.root ` value ** MUST** be set.
116
-
117
115
Configuration files found in this directory will be merged, with higher alphanumeric values
118
116
taking precedence. If for example you are building a derived container image from the above OS,
119
117
you could create a ` 50-myos.toml ` that sets ` type = "btrfs" ` which will override the
@@ -223,3 +221,15 @@ a different sandboxing tool (e.g. [bubblewrap](https://github.com/containers/bub
223
221
224
222
This argument is mainly useful for 3rd-party tooling for building disk images from bootable
225
223
containers (e.g. based on [ osbuild] ( https://github.com/osbuild/osbuild ) ).
224
+
225
+ ## Configuring machine-local state
226
+
227
+ Per the [ filesystem] ( filesystem.md ) section, ` /etc ` and ` /var ` are machine-local
228
+ state by default. If you want to inject additional content after the installation
229
+ process, at the current time this can be done by manually finding the
230
+ target "deployment root" which will be underneath ` /ostree/deploy/<stateroot/deploy/ ` .
231
+
232
+ Installation software such as [ Anaconda] ( https://github.com/rhinstaller/anaconda )
233
+ do this today to implement generic ` %post ` scripts and the like.
234
+
235
+ However, it is very likely that a generic bootc API to do this will be added.
0 commit comments