2.6. Switching from an existing rpm-ostree installation to image mode for RHEL 9.6


You can use image mode for RHEL on your existing RHEL for Edge system by using the bootc switch command.

2.6.1. Adding existing system groups and users information to a Containerfile

When switching between different host builds, you can use the bootc switch command to migrate your existing deployed system to a bootc based system.

重要

Some user and group IDs differ between rhel-bootc images and RHEL for Edge. This affects several groups and users, such as ssh_keys. As a consequence, the private keys belong to a group with a misconfigured ID, and you will not be able to use public keys to access the edge system.

The Image Mode system uses altfiles to manage users at /user/lib/passwd and groups at /user/lib/group. To workaround this, you must extract the groups and users information of the existing RHEL for Edge system and fixating them as part of the Containerfile. Configure the Containerfile to copy a local lib/group file to the container image.

You can manually change the permissions of private keys, the /etc folder is mutable in edge systems. However, it does not solve the problem, because after running the bootc switch command, the Image Mode based system has the ssh_keys group configured with the ID 999. This value comes from the RHEL bootc base image, and this drift from ID 101 to ID 999 left the edge system unreachable through SSH. To fix this issue, follow the steps:

Prerequisites

Procedure

  1. Extract the information of users and groups from the RHEL for Edge system.

    $ mkdir -p ./usr/lib
    $ ssh admin@192.168.100.50 'cat /lib/passwd' > ./usr/lib/passwd
    $ ssh admin@192.168.100.50 'cat /lib/group' > ./usr/lib/group
  2. Include the missing RHEL for Edge packages in the bootc based system by specifying them in a Containerfile. Additionally, use the COPY command to include the group and passwd content that was extracted from the RHEL for Edge system. The following is an example:

    FROM registry.redhat.io/rhel9/rhel-bootc
    WORKDIR /tmp
    RUN dnf -y install ModemManager \
                       NetworkManager-wifi \
                       NetworkManager-wwan \
                       audit \
                       checkpolicy \
                       clevis \
                       clevis-dracut \
                       clevis-luks \
                       clevis-pin-tpm2 \
                       clevis-systemd \
                       containernetworking-plugins \
                       dnsmasq \
                       dracut-config-generic \
                       fdo-client \
                       fdo-owner-cli \
                       firewalld \
                       firewalld-filesystem \
                       greenboot \
                       greenboot-default-health-checks \
                       grubby \
                       ignition \
                       ignition-edge \
                       ipset \
                       iwl100-firmware \
                       iwl1000-firmware \
                       iwl105-firmware \
                       iwl135-firmware \
                       iwl2000-firmware \
                       iwl2030-firmware \
                       iwl3160-firmware \
                       iwl5000-firmware \
                       iwl5150-firmware \
                       iwl6050-firmware \
                       iwl7260-firmware \
                       libsecret \
                       pinentry \
                       policycoreutils-python-utils \
                       python3-distro \
                       python3-setools \
                       rsync \
                       setools-console \
                       tmux \
                       traceroute \
                       usbguard \
                       usbguard-selinux \
                       wireless-regdb \
                       wpa_supplicant
    
    COPY etc /etc
    # You can find the passwd and group content that were extracted from the RHEL for Edge system usr/lib/ in your current working directory. You can copy the content into the container image with the following step:
    COPY usr /usr
  3. Build the bootc image and push it to the registry:

    $ podman build -f Containerfile -t quay.io/<namespace>/<image>:<tag> .
    $ podman push quay.io/<namespace>/<image>:<tag>
  4. Run the bootc switch command to the newly created bootable container image.

    $ ssh admin@192.168.100.50
    $ sudo bootc switch quay.io/<namespace>/<image>:<tag>
    $ sudo reboot

Verification

After rebooting the edge system into the bootable container image, confirm that the contents of /lib/passwd and /lib/group match the content that was extracted from the OSTree system.

  1. Check the content of /lib/passwd.

    $ cat /lib/passwd
  2. Check the content of /lib/group.

    $ cat /lib/group

2.6.2. Switching a 9.6 RHEL for Edge installed by using a raw image to image mode

Use an existing 9.6 RHEL for Edge that you installed by using a raw image to switch to image mode for RHEL .

Prerequisites

  • An existing 9.6 RHEL for Edge installed with a raw image.

Procedure

  1. Update your image. See Updating RHEL for Edge images.
  2. Switch your existing image from RHEL image builder to image mode.

    1. Build an image from rhel-bootc. For example:

      $ cat Containerfile
      FROM registry.redhat.io/rhel9/rhel-bootc:latest
      RUN dnf install -y  \
          clevis  \
          clevis-dracut  \
          clevis-luks  \
          fdo-client  \
          fdo-owner-cli
  3. Build the <image> image by using Containerfile in the current directory:

    $ podman build -t quay.io/<namespace>/<image>:<tag> .
    1. Push the image to a registry

      $ podman push quay.io/<namespace>/<image>:_<tag>_
    2. Run bootc switch on the device.

      $ bootc switch quay.io/<namespace>/<image>:_<tag>_
    3. Run systemctl reboot.

      $ sudo systemctl reboot

Verification

  • Connect to your RHEL for Edge system and use bootc status:

    # bootc status

2.6.3. Switching a 9.6 RHEL for Edge installed by using a simplified-installer image to image mode

Use an existing 9.6 RHEL for Edge that you installed by using a simplified-installer image.

Prerequisites

  • An existing 9.6 RHEL for Edge installed with a simplified-installer image.

Procedure

  1. Check if bootc is installed:

    $ rpm -qa | bootc

    Update your image to the latest rpm-ostree installation. See Updating RHEL for Edge images.

    1. Build an image from rhel-bootc. For example:

      $ cat Containerfile
      FROM registry.redhat.io/rhel9/rhel-bootc:latest
      RUN dnf install -y  \
          clevis  \
          clevis-dracut  \
          clevis-luks  \
          fdo-client  \
          fdo-owner-cli
  2. Build the <image> image by using Containerfile in the current directory:

    $ podman build -t quay.io/<namespace>/<image>:<tag> .
    1. Push the image to a registry.

      $ podman push quay.io/<namespace>/<image>:_<tag>_
    2. Run bootc switch to switch the device to the image you pushed to the registry.

      $ bootc switch quay.io/<namespace>/<image>:_<tag>_
    3. Run systemctl reboot.

      $ sudo systemctl reboot
  3. Verification

    • Connect to your RHEL for Edge system and use bootc status:

      # bootc status
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る