[Image Builder] Cannot specify the desired kernel version

Solution Verified - Updated -

Issue

  • While composing a standard RHEL image, the latest kernel is always installed, even when the previous version was explicitly mentioned in the blueprint. This is not the expected behavior.

  • While composing an edge-commit, both kernels are installed (whereas the depsolve looks good), and rpm-ostree fails due to this:

    Stage: org.osbuild.ostree.preptree
    Output:
    :
    Preparing kernel
    error: Finalizing rootfs: During kernel processing: Multiple vmlinuz- in usr/lib/ostree-boot, occurrences 'usr/lib/ostree-boot/vmlinuz-5.14.0-427.33.1.el9_4.x86_64' and 'usr/lib/ostree-boot/vmlinuz-5.14.0-427.35.1.el9_4.x86_64'
    Traceback (most recent call last):
     File "/run/osbuild/bin/org.osbuild.ostree.preptree", line 176, in <module>
       r = main(args["tree"], args["options"])
     File "/run/osbuild/bin/org.osbuild.ostree.preptree", line 169, in main
       subprocess.run(["rpm-ostree", "compose", "postprocess",
     File "/usr/lib64/python3.9/subprocess.py", line 528, in run
       raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['rpm-ostree', 'compose', 'postprocess', '/run/osbuild/tree', '/tmp/tmpjh2zneuq.json']' returned non-zero exit status 1.
    

Environment

  • Red Hat Enterprise Linux <= 9.4
  • osbuild-composer aka Image Builder

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content