Installing RHEL from a bootable container image by using the bootc Kickstart command
Introduction
Red Hat Enterprise Linux (RHEL) 10 supports installing a system from a bootable container image by using the Anaconda installer together with a Kickstart configuration. The bootc Kickstart command installs the operating system directly from a container image. During installation, the bootc tool populates the root filesystem by using the specified bootable container image and configures the bootloader.
This article describes how to configure a Kickstart file for a bootc-based RHEL installation, lists supported Kickstart commands, and outlines current limitations.
Important
The bootc Kickstart command is provided as a Technology Preview only. Technology Preview features are not supported with Red Hat production Service Level Agreements (SLAs), might not be functionally complete, and Red Hat does not recommend using them for production. These previews provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. See Technology Preview Features Support Scope on the Red Hat Customer Portal for information about the support scope for Technology Preview features.
Environment
- Red Hat Enterprise Linux 10
- Anaconda installer
- Kickstart installations
bootc-based bootable container images
Installation workflow
- The Kickstart file defines storage configuration and installation settings.
- The Anaconda installer creates the requested partitions and filesystems on the target
disk. - Anaconda runs
bootc install to-filesystem, which populates the root filesystem from the
container image and configures the system bootloader. - Anaconda performs the remaining configuration steps in the installed system, such as
setting up a root password, creating user accounts, or configuring SSH keys.
Unlike installations that use the ostreecontainer Kickstart command, the bootc tool performs both the deployment and bootloader configuration.
Example Kickstart configuration
WARNING: This kickstart destroys existing partitions on the target disk(s). Use only in test environments or adjust storage configuration as required.
zerombr
clearpart --all --initlabel
autopart
lang en_US.UTF-
keyboard us
timezone America/New_York --utc
rootpw changeme
bootc --source-imgref=registry:registry.example.com/rhel10/rhel-bootc:10.2 --target-imgref=registry.example.com/rhel10/rhel-bootc:10.2
For installing from a private or authenticated registry (which includes images provided by This content is not included.catalog.redhat.com), see Accessing private registries with pull secrets on Anaconda installations. If you wish to build a customized container image, see This content is not included.Best practices for building bootable containers. For information on how to obtain access to container registries provided by Red Hat that also provide base bootc-based images, see Red Hat Container Registry Authentication.
Providing the Kickstart file to the installer
To use a custom Kickstart file to drive the installation, make it available over HTTP or another supported method, and provide its location on the installer kernel command line. For example,
inst.ks=http://server.example.com/path/to/kickstart.ks
You can also embed the Kickstart file into the installation ISO by using the Content from github.com is not included.mkksiso tool from the lorax package.
For using Image Mode (bootable container installation) in Anaconda and for building and managing custom bootable container images, see Using image mode for RHEL to build, deploy, and manage operating systems.
Kickstart command compatibility with bootc
You can use the bootc kickstart command in conjunction with a few other kickstart commands. However, some commands are incompatible with bootc.
Supported commands
clearpart,zerombrbootloader(only the--appendoption)autopart,reqpart,part,volgroup,logvolreboot,halt,poweroffgraphical,cmdline,text,rdp%pre,%post,%includekeyboardlangnetworkrhsmrootpwsshkeytimezoneuser
Unsupported commands
ostreesetupostreecontainerliveimg%packages- installation source commands such as
cdrom,url, orrepo
Mixing these commands with bootc in the same Kickstart file causes the installation to fail or behave unpredictably. While unsupported Kickstart commands might work, there is no guarantee that they are supported.
Limitations and unsupported scenarios
Source and target image references
It is necessary to specify both the --source-imgref and --target-imgref options of the bootc command in order for the container registry access to work properly in the installed system. The options need to be present in a specific format. For instance, if a container image from a container registry registry.example.com/rhel10/rhel-bootc:10.2 is to be deployed, you need to use the following bootc command and options:
bootc --source-imgref=registry:registry.example.com/rhel10/rhel-bootc:10.2 --target-imgref=registry.example.com/rhel10/rhel-bootc:10.2
NOTE: The registry: prefix needs only be present for the --source-imgref option, but cannot be present for the --target-imgref option to ensure a proper container registry configuration in the installed system.
Storage configuration
The following storage configurations are not supported when using the bootc Kickstart command:
- partitioning across multiple disks
- custom mount points beyond the layout created by automatic partitioning
To ensure support, use a single-disk storage layout for the installation target.
Installation media compatibility
The installation media must match the product and variant of the container image.
For example, using installation media from another product, such as CentOS Stream, to install a RHEL container image can cause the installer to apply different defaults, such as filesystem type or partitioning scheme. These installations are not supported.
User account requirements
The installation requires at least one of the following configurations:
- a root password defined with the
rootpwcommand - an administrator account defined with the user command
If neither configuration is present, the installation does not proceed.
References
- Using image mode for RHEL to build, deploy, and manage operating systems
- Deploying RHEL
bootcimages — Accessing private registries with pull secrets on Anaconda installations bootcdocumentation