3.9. Deploying an image mode for RHEL systems by using FDO


You can deploy an image mode for a RHEL system by using FIDO Device Onboarding (FDO) to deliver configuration to this system. Use a Kickstart file to configure various parts of the installation process, such as setting up users, customizing partitioning, and adding an SSH key. You can include the Kickstart file in an ISO build to configure any part of the installation process, except the deployment of the base image.

If you use an ISO with a bootc container base image, bootc-image-builder automatically installs ostreecontainer, the command to install the container image. You can still configure anything, except the ostreecontainer command.

Prerequisites

  • You have Podman installed on your host machine.
  • You have root access to run the bootc-image-builder tool and run the containers in --privileged mode.
  • You have FDO server infrastructure deployed.

Procedure

  1. Create a Containerfile, for example:

    FROM registry.redhat.io/rhel10/rhel-bootc:latest
    RUN dnf install -y fdo-init fdo-client
    RUN systemctl enable fdo-client-linuxapp.service
  2. Create your Kickstart file. The following Kickstart file is an example of a fully unattended Kickstart file configuration that contains user creation and partition instructions.

    [customizations.installer.kickstart]
    contents = """
    text --non-interactive
    zerombr
    clearpart --all --initlabel --disklabel=gpt
    autopart --noswap --type=lvm
    user --name=test --groups=wheel --plaintext --password=test
    sshkey --username=test "ssh-ed25519 AAA..."
    network --bootproto=dhcp --device=link --activate --onboot=on
    poweroff
    
    %post
    export MANUFACTURING_SERVER_URL="http://192.168……"
    export DIUN_PUB_KEY_INSECURE="true"
    /usr/libexec/fdo/fdo-manufacturing-client
    %end
    
    """

    In the export <MANUFACTURING_SERVER_URL> field, replace the manufacturing server URL with your own manufacturing server URL.

  3. Save the Kickstart configuration in the .toml format to inject the Kickstart content. For example, config.toml.
  4. Create the following folder:

    $ mkdir $(pwd)/output"
  5. Run bootc-image-builder, and include the Kickstart file configuration that you want to add to the ISO build. The bootc-image-builder automatically adds the ostreecontainer command that installs the container image.

    $ sudo podman run \
        --rm \
        -it \
        --privileged \
        --pull=newer \
        --security-opt label=type:unconfined_t \
        -v /var/lib/containers/storage:/var/lib/containers/storage \
        -v $(pwd)/config.toml:/config.toml \
        -v $(pwd)/output:/output \
        registry.redhat.io/rhel10/bootc-image-builder:latest \
        --type iso \
        --config /config.toml \
      quay.io/<namespace>/<image>:<tag>

    You can find the resulting .iso image in the output folder.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部