Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-135344

[bootc] Images generated using transient etc and Image Builder fail to start rpm-ostreed.service and fails to mount /boot

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.7
    • bootc
    • None
    • None
    • None
    • rhel-image-mode
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Create container:

      ~~~
      # cat Containerfile
       
      FROM registry.redhat.io/rhel9/rhel-bootc:9.7

      RUN cat > /usr/lib/ostree/prepare-root.conf <<EOF
      [composefs]
      enabled = yes
      [sysroot]
      readonly = true
      [etc]
      transient = true
      EOF

      RUN kver=$(cd /usr/lib/modules && echo *); dracut -vf /usr/lib/modules/"$kver"/initramfs.img "$kver"

      RUN yum install -y tuned && yum clean all
      ~~~

      Push this to quay, build the podman with image builder
      ~~~

      # podman run     -rm     privileged     pull=newer     -security-opt label=type:unconfined_t     -v ./config.toml:/config.toml:ro     -v ./output:/output     -v /var/lib/containers/storage:/var/lib/
      containers/storage     registry.redhat.io/rhel9/bootc-image-builder:latest     -type qcow2     -config /config.toml   quay.io/<reponame>/<image_name>:latest
      ~~~
      Boot the resulting qcow2, on login we see there were service failures

      ~~~

      This key is not known by any other names
      Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
      Warning: Permanently added '192.168.122.42' (ED25519) to the list of known hosts.
      [systemd]
      Failed Units: 2
       bootc-publish-rhsm-facts.service
       rpm-ostree-fix-shadow-mode.service
      [root@localhost ~]# rpm-ostree kargs
      Job for rpm-ostreed.service failed because the control process exited with error code.
      See "systemctl status rpm-ostreed.service" and "journalctl -xeu rpm-ostreed.service" for details.
      × rpm-ostreed.service - rpm-ostree System Management Daemon
          Loaded: loaded (/usr/lib/systemd/system/rpm-ostreed.service; static)
          Active: failed (Result: exit-code) since Thu 2025-12-11 17:50:01 UTC; 10ms ago
            Docs: man:rpm-ostree(1)
         Process: 1293 ExecStart=rpm-ostree start-daemon (code=exited, status=1/FAILURE)
        Main PID: 1293 (code=exited, status=1/FAILURE)
          Status: "error: Couldn't start daemon: Error setting up sysroot: loading sysroot: Unexpected state: /run/ostree-booted found, but no /boot/loader directory"
             CPU: 18ms

      Dec 11 17:50:01 localhost.localdomain systemd[1]: Starting rpm-ostree System Management Daemon...
      Dec 11 17:50:01 localhost.localdomain rpm-ostree[1293]: Reading config file '/etc/rpm-ostreed.conf'
      Dec 11 17:50:01 localhost.localdomain rpm-ostree[1293]: error: Couldn't start daemon: Error setting up sysroot: loading sysroot: Unexpected state: /run/ostree-booted found, but no /boot/loader directory
      Dec 11 17:50:01 localhost.localdomain systemd[1]: rpm-ostreed.service: Main process exited, code=exited, status=1/FAILURE
      Dec 11 17:50:01 localhost.localdomain systemd[1]: rpm-ostreed.service: Failed with result 'exit-code'.
      Dec 11 17:50:01 localhost.localdomain systemd[1]: Failed to start rpm-ostree System Management Daemon.
      error: Loading sysroot: exit status: 1
      ~~~

      Checking journal logs see the following
      ~~~
      Dec 11 17:48:50 localhost bootc[767]: error: Publishing facts: Initializing storage: Acquiring sysroot: Remounting /boot read-write: Invalid argument

      <snip>
      Dec 11 17:48:50 localhost systemd[1]: bootc-publish-rhsm-facts.service: Main process exited, code=exited, status=1/FAILURE
      Dec 11 17:48:50 localhost systemd[1]: bootc-publish-rhsm-facts.service: Failed with result 'exit-code'.
      Dec 11 17:48:50 localhost systemd[1]: Failed to start Publish bootc facts to Red Hat Subscription Manager.

      <snip>

      ~~~
      Same issue does not happen if using bootc install directly to disk like
      ~~~
      # podman run --rm --privileged --pid=host -e IMAGE=<image_location_quay> -e REGISTRY_AUTH_FILE=/etc/ostree/auth.json -v /root/config.json:/etc/ostree/auth.json -v /dev:/dev -v /var
      :/var --security-opt label=type:unconfined_t  <image_location_quay> bootc install to-disk --source-imgref=docker://${IMAGE} --wipe /dev/vda
      ~~~

      What is the impact of this issue to you?

      Unable to use transient etc bootc containers with the image builder method

      How reproducible is this bug?:

      Reproduced using Image Builder 9.4 and latest image, seems to occur every time

      Expected results

      rpm-ostree starts and we see /boot is mounted

      Actual results

      /boot isn't mounted and there are service failures

              walters@redhat.com Colin Walters
              rhn-support-ckrell Charlie Krell
              Colin Walters Colin Walters
              Xiaofeng Wang Xiaofeng Wang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: