Skip to content

Commit 343d5cc

Browse files
authored
Merge pull request #534 from cgwalters/expand-install-docs
docs/install: A few changes
2 parents 0fb86b8 + 2691a36 commit 343d5cc

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

docs/src/bootc-install.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@ However, nothing *else* (external) is required to perform a basic installation
3232
to disk - the container image itself comes with a baseline self-sufficient installer
3333
that sets things up ready to boot.
3434

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.
4647

4748
## Executing `bootc install`
4849

@@ -98,22 +99,19 @@ the image in `/etc/ostree/auth.json`.
9899
Alternatively, the secret can be added after an installation process completes and managed separately;
99100
in that case you will need to specify `--skip-fetch-check`.
100101

101-
### Operating system install configuration required
102+
### Configuring the default root filesystem type
102103

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`.
106106

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,
108108
create a file named `/usr/lib/bootc/install/00-<osname>.toml` with the contents of the form:
109109

110110
```toml
111111
[install.filesystem.root]
112112
type = "xfs"
113113
```
114114

115-
The `install.filesystem.root` value **MUST** be set.
116-
117115
Configuration files found in this directory will be merged, with higher alphanumeric values
118116
taking precedence. If for example you are building a derived container image from the above OS,
119117
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
223221

224222
This argument is mainly useful for 3rd-party tooling for building disk images from bootable
225223
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

Comments
 (0)