Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

What’s new in image mode for RHEL in 9.5?

December 3, 2024
Ben Breard
Related topics:
ContainersDevOpsLinux
Related products:
Image mode for Red Hat Enterprise LinuxRed Hat Enterprise Linux

Share:

    Image mode for Red Hat Enterprise Linux (RHEL) makes the operating system as simple to build, deploy, and manage as a containerized application. It has been an exciting time to see so many customers and users in the community engaged and focused on driving more of their infrastructures with container workflows. The opportunity to grow the value proposition of containers beyond applications is certainly resonating. If you are new to this concept and wondering where this might be useful please take a look at some of the use cases. Let’s dive into the release!

    TL;DR for RHEL 9.5

    There is a lot to explore in 9.5! First, image mode remains in technology preview. Bootc’s API and interfaces are now considered stable, promising a smooth upgrade experience moving forward. The command-line interface (CLI) has a better human-readable output and we’re introducing the ability to bind containerized applications to the host operating system through bootc’s new logically bound images. Bootc also introduces a new interface for configuring kernel arguments. Next, bootc-image-builder gains the ability to create production-ready images in more formats. Specifically, 9.5 adds Azure and Google Cloud Platform (GCP) image types, more control and customization of filesystem layouts, and the ability to embed customized kickstart configs into offline bare metal installer ISOs. 

    rhel-bootc

    Image mode for RHEL is delivered as a container image called rhel-bootc. 9.5 brings rhel-bootc to more architectures, specifically aarch64 and s390x — ppc64le will be coming soon. Each release includes a software bill of materials, or SBOM, to make introspection of the image easy to integrate with a number of security tools. On the management side, Red Hat Insights offers a powerful suite of tools that provide visibility and control of image mode (immutable) systems side by side with package mode (traditional, mutable RHEL) systems. Users are encouraged to include our example here into their Containerfiles to register systems with Insights.

    Bootc v1.x

    The core technology that enables image mode is called bootc (boot container) and it remains in a technology preview in 9.5 with the goal of being fully supported in 9.6. Despite being in a preview state, the project has reached a major milestone and the CLI and internal APIs of bootc are mature enough to be declared stable. This is important for integration work and also allows existing installs to upgrade to future, supported releases. Bootc also introduces a feature called "logically bound images" which was introduced with Red Hat Enterprise Linux AI. We now have an update mechanism for containers that need to be versioned with the operating system (OS). This solves a historically difficult challenge for containers that have deep OS-level dependencies and need to move in lock-step with the OS. To learn more please take a look at Chris Kyrouac’s deep dive. 

    Security first

    RHEL has a history that is deeply rooted in security. Many of our users are required to abide by the Federal Information Processing Systems (FIPS) standards to ensure only approved cryptographic algorithms are used. In order to make sure a RHEL host is operating in FIPS mode, a boot option has to be added to the kernel command line. Since we are working with container images and build tools with image mode, it begs the question: "How does one configure things like kernel arguments in a container image?" Great question! With 9.5, bootc gains a new facility to set and update kernel arguments. We’ll explore this using FIPS mode as an example.

    Kernel arguments can easily be configured via TOML config files under /usr/lib/bootc/kargs.d/. To set fips=1 as a kernel argument, create a file called 01-fips.toml that includes the content: kargs = [“fips=1”] 

    Once that is in place here are the relevant parts of an example Containerfile to build it this into your image:

    FROM registry.redhat.io/rhel9/rhel-bootc:9.5
    COPY 01-fips.toml /usr/lib/bootc/kargs.d/
    RUN update-crypto-policies --no-reload --set FIPS

    This facility can be used to set any kernel argument and it makes it easy to manage one of the more opaque parts of the OS and easily adapt this over time via future images. If you are using the RHEL installer called Anaconda to deploy a bootc image, make sure to also use the bootloader kickstart argument as these kargs are not yet supported by Anaconda. We are working to change this in future releases. This FIPS example comes from our example repository on GitLab. We recommend checking this out for more tips and tricks on building container images. 

    More platforms and image customization

    One of the first things to understand with image mode is how the container image is deployed on the first boot. Essentially, these are regular container images but to boot them there is a "deployment" phase via bootc install to-filesystem where the container is setup to a filesystem, the bootloader is installed, and etc. Anaconda includes this logic and is the perfect tool for bare metal, but for virtual machines (VMs) and cloud images, we included a version of image builder that makes this process simple. With 9.5 we add the image types vhd and gce for Azure & GCP respectively. We also have much more control of the final images, and specifically the filesystem layout. See below:

    [[customizations.filesystem]]
    mountpoint = "/"
    minsize = "10 GiB"
    [[customizations.filesystem]]
    mountpoint = "/var/data"
    minsize = "20 GiB"

    For users who prefer the flexibility of LVM can also define an advanced layout. Here’s a more advanced example that will set:

    [[customizations.disk.partitions]]
    type = "lvm"
    name = "second-one"
    minsize = "50 GiB"
    [[customizations.disk.partitions.logical_volumes]]
    name = "rhel-root"
    mountpoint = "/"
    label = "system"
    minsize = "20 GiB"
    type = "xfs"
    [[customizations.disk.partitions.logical_volumes]]
    name = "rhel-var"
    mountpoint = "/var"
    label = "var"
    minsize = "25 GiB"
    type = "xfs"
    [[customizations.disk.partitions.logical_volumes]]
    mountpoint = "/var/log"
    type = "xfs"
    minsize = "4 GiB"
    label = "log"
    name = "rhel-var_log"

    Another nice feature of bootc-image-builder is creating off-line installation images via Anaconda/kickstart. Users can now pass custom kickstart files to provide the exact configuration required for fully automated or, when desired, interactive installations. bootc-image-builder will handle the ostreecontainer command and ensure the embedded image is called. See below:

    [customizations.installer.kickstart]
    contents = """
    text --non-interactive
    zerombr
    clearpart --all --initlabel --disklabel=gpt
    autopart --noswap --type=lvm
    network --bootproto=dhcp --device=link --activate --onboot=on
    """

    Wrap it up

    There has never been a better time to get started with image mode for RHEL. We encourage everyone to get hands-on using our intro lab, check out our documentation, and start thinking about where this fits in your environment. I want to thank the many engineers and community members who contributed to this release, and all of our wonderful customers who provided their input and feedback along the way. Many of us believe that image-based deployments of Linux is the future and the next wave for where the industry is headed. At Red Hat, we are passionate that the Linux Container ecosystem provides the best path to deliver on this vision. 

    Related Posts

    • Announcing image mode for Red Hat Enterprise Linux

    • Image mode for Red Hat Enterprise Linux quick start: AI inference

    • Handling FIPS mode in upstream projects for RHEL

    • How RHEL image builder has improved security and function

    • Introducing image mode for RHEL and bootable containers in Podman Desktop

    Recent Posts

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    • How to integrate vLLM inference into your macOS and iOS apps

    What’s up next?

    Learn how large language models (LLMs) are created and use Red Hat Enterprise Linux AI to experiment within an LLM in this hands-on learning path.
    Start the activity
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue