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

livemedia-creator fails to build images due to missing permissions in CPIO appended to initrd

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • rhel-10.1
    • rhel-10.0
    • lorax
    • lorax-40.5.12-1.el10
    • No
    • Important
    • rhel-sst-image-builder
    • None
    • False
    • Hide

      None

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

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

      # livemedia-creator --make-disk --iso /var/lib/libvirt/images/RHEL-10.0-20250313.2-x86_64-boot.iso --ks minimal.ks --nomacboot
      

      The process hangs. After connecting to the VM there are dbus-broker-launch related errors. We saw such a problem in the past, it was caused by missing the exec permissions in the CPIO archive attached to the original installation initrd. (See RHEL-11128). And indeed, changing the permissions fixes the problem here as well. Tested with the following change:

      diff --git a/installer.py b/installer.py
      index bf1d8aa..b6cda01 100644
      --- a/installer.py
      +++ b/installer.py
      @@ -115,6 +115,7 @@ def append_initrd(initrd, files):
           qemu_initrd = tempfile.mktemp(prefix="lmc-initrd-", suffix=".img")
           shutil.copy2(initrd, qemu_initrd)
           ks_dir = tempfile.mkdtemp(prefix="lmc-ksdir-")
      +    os.chmod(ks_dir, 0o755)
           for ks in files:
               shutil.copy2(ks, ks_dir)
           ks_initrd = tempfile.mktemp(prefix="lmc-ks-", suffix=".img")
      

      What is the impact of this issue to you?

      Unable to build images using livemedia-creator.

      Please provide the package NVR for which the bug is seen:

      RHEL-10.0-20250313.2
      lorax-40.5.11-1.el10

      How reproducible is this bug?:

      Always

      Steps to reproduce

      1.  Update /usr/share/doc/lorax/minimal.ks with URLs to BaseOS/AppStream repos
      2.  Download boot.iso from the tested compose
      3.  # livemedia-creator --make-disk --iso /var/lib/libvirt/images/RHEL-10.0-20250313.2-x86_64-boot.iso --ks minimal.ks --nomacboot

      Expected results

      livemedia-creator finishes successfully.

      Actual results

      The process hangs. After connecting to the VM there are dbus-broker-launch related errors.

              brlane@redhat.com Brian Lane
              jstodola@redhat.com Jan Stodola
              Brian Lane Brian Lane
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: