Configuring Storage
Fedora/CentOS bootc is a container image that can be "materialized" into a disk image in 3 different ways:
-
Anaconda (kickstart)
-
bootc-image-builder
-
bootc install
The default filesystem type for CentOS is xfs . There is no default filesystem for Fedora, and you must choose one when generating a disk image
or configure one in your derived container image via bootc install config.
|
Included storage technologies
The full
images include support for:
-
xfs
/ext4
-
btrfs
(Fedora only) -
LVM
-
LUKS
But you can of course add other storage packages directly to the host system.
Storage with Anaconda
You can use Kickstart to configure storage with Anaconda.
Storage with bootc-image-builder
You can use the bootc-image-builder tool to create a disk image. The available configuration for partitioning and layout is fairly fixed.
Note that the default filesystem type does come from the container image’s bootc install
configuration.
Virtualization and dynamic disk sizing
There is a default systemd unit included bootc-generic-growpart.service
which will
run on each boot, and attempt to expand the partition and filesystem backing
the root device.
For more information, see bootc-generic-growpart.service.
There is known bug where cloud-init does not grow the root filesystem; see this RHEL issue. |
Storage with bootc install
See bootc install for more information.
The bootc install to-disk
can be used to directly write a "simple" flat storage configuration.
More advanced installations (especially to bare metal) can also be done via bootc install to-filesystem; you can set up the target block storage and filesystem however you desire via external tools, then have your custom container image "self-install" to it.
Mounted Filesystems
Fedora/CentOS bootc uses the bootc upstream project which currently uses ostree as a backend.
For more on the filesystem layout, see bootc filesystem.
Differences from other OSTree-based systems
The Fedora/CentOS bootc project enables composefs
for storage by default. The
/opt
and /usr/local
paths are plain directories, and not
symbolic links into /var
. This means it is easier to install
3rd-party content in derived container images that write into /opt
for example.
Version selection and bootup
Fedora/CentOS bootc uses GRUB by default (except on s390x). A menu entry is created for each version of Fedora/CentOS bootc currently available on a system. This menu entry references an ostree
deployment which consists of a Linux kernel, an initramfs and a hash linking to an ostree
commit (passed via the ostree=
kernel argument). During bootup, ostree
will read this kernel argument to determine which deployment to use as the root filesystem. Each update or change to the system (package installation, addition of kernel arguments) creates a new deployment. This enables rolling back to a previous deployment if the update causes problems.
Want to help? Learn how to contribute to Fedora Docs ›