Chapter 9. Enabling the FIPS mode while building a bootc image


Federal Information Processing Standards (FIPS) include standards for cryptographic operations. You can enable FIPS mode when building a bootc image, to configure the system to use only FIPS-approved modules. You can use the following options to enable FIPS mode:

  • By using the bootc-image-builder tool: You must enable the FIPS system-wide cryptographic policy in the Containerfile.
  • When performing an Anaconda installation: You must enable the FIPS system-wide cryptographic policy in the Containerfile, and also add the fips=1 kernel argument during the boot time.

A FIPS dracut module is built-in to the base image. It defaults to a boot=UUID= karg in bootc install-to-filesystem.

9.1. Enabling FIPS mode by using bootc-image-builder

Create a disk image by using bootc-image-builder or bootc install to-disk, and enable FIPS mode by passing the custom Containerfile as an argument when building the image.

Prerequisites

  • Podman is installed on your host machine.
  • virt-install is installed on your host machine.
  • You have root access to run the bootc-image-builder tool, and run the containers in --privileged mode, to build the images.

Procedure

  1. Create a 01-fips.toml to configure FIPS enablement, for example:

    # Enable FIPS
    kargs = ["fips=1"]
    Copy to Clipboard Toggle word wrap
  2. Create a Containerfile with the following instructions to enable the fips=1 kernel argument:

    FROM registry.redhat.io/rhel9/rhel-bootc:latest
    # Enable fips=1 kernel argument: https://bootc-dev.github.io/bootc/building/kernel-arguments.html
    COPY 01-fips.toml /usr/lib/bootc/kargs.d/
    # Enable the FIPS system-wide cryptographic policy
    # crypto-policies-scripts is not installed by default in RHEL-10
    RUN dnf install -y crypto-policies-scripts && update-crypto-policies --no-reload --set FIPS
    Copy to Clipboard Toggle word wrap
  3. Create your bootc <image> compatible base disk image by using Containerfile in the current directory:

    $ podman build -t quay.io/<namespace>/<image>:<tag> .
    Copy to Clipboard Toggle word wrap

Verification

  • After login in to the system, check that FIPS mode is enabled:

    $ cat /proc/sys/crypto/fips_enabled
    1
    $ update-crypto-policies --show
    FIPS
    Copy to Clipboard Toggle word wrap

9.2. Enabling FIPS mode to perform an Anaconda installation

To create a disk image and enable FIPS mode when performing an Anaconda installation, use the following procedure:

Prerequisites

  • Podman is installed on your host machine.
  • virt-install is installed on your host machine.
  • You have root access to run the bootc-image-builder tool, and run the containers in --privileged mode, to build the images.

Procedure

  1. Create a 01-fips.toml to configure FIPS enablement, for example:

    # Enable FIPS
    kargs = ["fips=1"]
    Copy to Clipboard Toggle word wrap
  2. Create a Containerfile with the following instructions to enable the fips=1 kernel argument:

    FROM registry.redhat.io/rhel9/rhel-bootc:latest
    # Enable fips=1 kernel argument: https://bootc-dev.github.io/bootc/building/kernel-arguments.html
    COPY 01-fips.toml /usr/lib/bootc/kargs.d/
    # Install and enable the FIPS system-wide cryptographic policy
    RUN dnf install -y crypto-policies-scripts && update-crypto-policies --no-reload --set FIPS
    Copy to Clipboard Toggle word wrap
  3. Create your bootc <image> compatible base disk image by using Containerfile in the current directory:

    $ sudo podman run \
        --rm \
        -it \
        --privileged \
        --pull=newer \
        --security-opt label=type:unconfined_t \
        -v $(pwd)/config.toml:/config.toml:ro \
        -v $(pwd)/output:/output \
        -v /var/lib/containers/storage:/var/lib/containers/storage \
        registry.redhat.io/rhel9/bootc-image-builder:latest \
        --local
        --type iso \
        quay.io/<namespace>/<image>:<tag>
    Copy to Clipboard Toggle word wrap
  4. Enable FIPS mode during the system installation:

    1. When booting the RHEL Anaconda installer, on the installation screen, press the TAB key and add the fips=1 kernel argument.

      After the installation, the system starts in FIPS mode automatically.

Verification

  • After login in to the system, check that FIPS mode is enabled:

    $ cat /proc/sys/crypto/fips_enabled
    1
    $ update-crypto-policies --show
    FIPS
    Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat