@@ -17,13 +17,15 @@ The Linux kernel (and optionally initramfs) is embedded in the container image;
17
17
is ` /usr/lib/modules/$kver/vmlinuz ` , and the initramfs should be in ` initramfs.img `
18
18
in that directory.
19
19
20
- The ` bootc install ` and ` boot install-to-filesystem ` commands bridge the two worlds
21
- of a standard, runnable OCI image and a bootable system by running tooling logic embedded
20
+ The ` bootc install ` command bridges the two worlds of a standard, runnable OCI image
21
+ and a bootable system by running tooling logic embedded
22
22
in the container image to create the filesystem and bootloader setup dynamically.
23
23
This requires running the container via ` --privileged ` ; it uses the running Linux kernel
24
24
on the host to write the file content from the running container image; not the kernel
25
25
inside the container.
26
26
27
+ There are two sub-commands: ` bootc install to-disk ` and ` boot install to-filesystem ` .
28
+
27
29
However, nothing * else* (external) is required to perform a basic installation
28
30
to disk. (The one exception to host requirements today is that the host must
29
31
have ` skopeo ` installed. This is a bug; more information in
@@ -44,8 +46,8 @@ image comes with a basic installer.
44
46
## Executing ` bootc install `
45
47
46
48
The two installation commands allow you to install the container image
47
- either directly to a block device (` bootc install ` ) or to an existing
48
- filesystem (` bootc install- to-filesystem ` ).
49
+ either directly to a block device (` bootc install to-disk ` ) or to an existing
50
+ filesystem (` bootc install to-filesystem ` ).
49
51
50
52
The installation commands ** MUST** be run ** from** the container image
51
53
that will be installed, using ` --privileged ` and a few
@@ -56,7 +58,7 @@ to an existing system and install your container image. Failure to run
56
58
Here's an example of using ` bootc install ` (root/elevated permission required):
57
59
58
60
``` bash
59
- podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t < image> bootc install --target-no-signature-verification /path/to/disk
61
+ podman run --rm --privileged --pid=host --security-opt label=type:unconfined_t < image> bootc install to-disk --target-no-signature-verification /path/to/disk
60
62
```
61
63
62
64
Note that while ` --privileged ` is used, this command will not perform any
@@ -68,7 +70,7 @@ The `--pid=host --security-opt label=type:unconfined_t` today
68
70
make it more convenient for bootc to perform some privileged
69
71
operations; in the future these requirement may be dropped.
70
72
71
- Jump to the section for [ ` install- to-filesystem ` ] ( #more-advanced-installation ) later
73
+ Jump to the section for [ ` install to-filesystem ` ] ( #more-advanced-installation ) later
72
74
in this document for additional information about that method.
73
75
74
76
### "day 2" updates, security and fetch configuration
@@ -181,16 +183,16 @@ the files are underneath `/usr`. To rotate or change the set of keys,
181
183
one would build a new container image. Client systems using ` bootc upgrade `
182
184
will transactionally update to this new system state.
183
185
184
- ## More advanced installation
186
+ ## More advanced installation with ` to-filesystem `
185
187
186
- The basic ` bootc install ` logic is really a pretty small (but opinionated) wrapper
188
+ The basic ` bootc install to-disk ` logic is really a pretty small (but opinionated) wrapper
187
189
for a set of lower level tools that can also be invoked independently.
188
190
189
- The ` bootc install ` command is effectively:
191
+ The ` bootc install to-disk ` command is effectively:
190
192
191
193
- ` mkfs.$fs /dev/disk `
192
194
- ` mount /dev/disk /mnt `
193
- - ` bootc install- to-filesystem --karg=root=UUID=<uuid of /mnt> --imgref $self /mnt `
195
+ - ` bootc install to-filesystem --karg=root=UUID=<uuid of /mnt> --imgref $self /mnt `
194
196
195
197
There may be a bit more involved here; for example configuring
196
198
` --block-setup tpm2-luks ` will configure the root filesystem
@@ -199,25 +201,22 @@ with LUKS bound to the TPM2 chip, currently via [systemd-cryptenroll](https://ww
199
201
Some OS/distributions may not want to enable it at all; it
200
202
can be configured off at build time via Cargo features.
201
203
202
- ### Using ` bootc install-to-filesystem `
203
-
204
- As noted above, there is also ` bootc install-to-filesystem ` , which allows
205
- an arbitrary process to create the root filesystem.
204
+ ### Using ` bootc install to-filesystem `
206
205
207
206
The usual expected way for an external storage system to work
208
207
is to provide ` root=<UUID> ` type kernel arguments. At the current
209
208
time a separate ` /boot ` filesystem is also required (mainly to enable LUKS)
210
209
so you will also need to provide e.g. ` --boot-mount-spec UUID=... ` .
211
210
212
- The ` bootc install- to-filesystem ` command allows an operating
211
+ The ` bootc install to-filesystem ` command allows an operating
213
212
system or distribution to ship a separate installer that creates more complex block
214
213
storage or filesystem setups, but reuses the "top half" of the logic.
215
214
For example, a goal is to change [ Anaconda] ( https://github.com/rhinstaller/anaconda/ )
216
215
to use this.
217
216
218
- ### Using ` bootc install- to-filesystem --replace=alongside `
217
+ ### Using ` bootc install to-filesystem --replace=alongside `
219
218
220
- This is a variant of ` install- to-filesystem ` , which maximizes convenience for using
219
+ This is a variant of ` install to-filesystem ` , which maximizes convenience for using
221
220
an existing Linux system, converting it into the target container image. Note that
222
221
the ` /boot ` (and ` /boot/efi ` ) partitions * will be reinitialized* - so this is a
223
222
somewhat destructive operation for the existing Linux installation.
@@ -231,7 +230,7 @@ The core command should look like this (root/elevated permission required):
231
230
podman run --rm --privileged -v /:/target \
232
231
--pid=host --security-opt label=type:unconfined_t \
233
232
< image> \
234
- bootc install- to-filesystem --replace=alongside /target
233
+ bootc install to-filesystem --replace=alongside /target
235
234
```
236
235
237
236
At the current time, leftover data in ` / ` is ** NOT** automatically cleaned up. This can
0 commit comments