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
{{ message }}
Repository navigation
Commit d9f38de
Browse filesBrowse the repository at this point in the historyBrowse files
docs: Explain how base images grow the root filesystem
Base image authors need to know that disk images booted on larger
disks, as in the cloud, need their root grown, and that bootc leaves
this to the image. Provisioning tools are often assumed to take care
of it, but the image based systems that do it (the Fedora and CentOS
Stream bootc base images, Fedora CoreOS, Flatcar) each use a separate
service, and cloud-init's growpart and resizefs can't find the device
when / is a composefs mount.
Point to those services and their docs from bootc-sysroot(7), note
that minimal image variants may need one layered in, and link there
from the image requirements and provisioning sections. Also fix the
systemd-growfs typo.
Assisted-by: AI
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
Copy file name to clipboardExpand all lines: docs/src/bootc-compatible-images.7.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,12 @@ e.g. `dracut` to ensure the initramfs is set up, etc.
64
64
65
65
The `bootc container lint` command will check this.
66
66
67
+
Disk images made from your image will often be booted on a larger
68
+
disk, for example in the cloud, and something in the image needs to
69
+
grow the root filesystem to fill it; bootc does not. See
70
+
[expanding the root filesystem](bootc-sysroot.7.md#expanding-the-root-filesystem)
71
+
for how existing base images do this.
72
+
67
73
## SELinux
68
74
69
75
The default mechanism for labeling today is that bootc will load the file contexts from the image (e.g. `/etc/selinux/policy`) and apply labels dynamically. This is the only mechanism that will work today with a generic bootc-unaware build tooling.
Copy file name to clipboardExpand all lines: docs/src/bootc-sysroot.7.md
+40-3Lines changed: 40 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,8 @@ backend), the logical root `/` is a read-only composefs mount of the
25
25
deployed image; otherwise it is a bind mount of a deployment directory
26
26
under `/sysroot/ostree`. This is a key aspect of how `bootc upgrade`
27
27
operates: it fetches the updated container image and writes the base
28
-
image files (using OSTree storage to `/sysroot/ostree/repo`).
28
+
image files (in `/sysroot/ostree/repo` with the OSTree backend, or in
29
+
`/sysroot/composefs` with the composefs backend).
29
30
30
31
Beyond that and debugging/introspection, there are few use cases for tooling to
31
32
operate on the physical root.
@@ -47,10 +48,44 @@ This [unified storage issue](https://github.com/bootc-dev/bootc/issues/20) track
47
48
One notable use case that *does* need to operate on `/sysroot`
48
49
is expanding the root filesystem.
49
50
51
+
Disk images are often booted on a disk larger than the image, for
52
+
example in the cloud, so the root partition and filesystem need to be
53
+
grown at boot. bootc does not do this itself; the base image (or an
54
+
image derived from it) needs to include something that does.
55
+
56
+
Provisioning tools such as cloud-init or Ignition are commonly expected
57
+
to handle this, but the image based systems below each do it with a
58
+
dedicated systemd service:
59
+
60
+
- The [Fedora and CentOS Stream bootc base images](https://gitlab.com/fedora/bootc/base-images/-/tree/9b469901d99583d59b270e802795be8676dc8d19/standard)
61
+
ship `bootc-generic-growpart.service`, which runs early in boot on
62
+
virtual machines, grows the root partition with `growpart`, and then
63
+
grows the filesystem as described [below](#growing-the-filesystem).
64
+
Despite its name, it is not part of bootc. Only the `standard` variant
65
+
includes it; the `minimal` and `minimal-plus` variants do not.
66
+
- Fedora CoreOS grows the root on first boot with
67
+
`ignition-ostree-growfs.service`, which runs in the initramfs after
0 commit comments