Chapter 7. Building and provisioning a minimal raw image

The minimal-raw image is a pre-packaged, bootable, minimal RPM image, compressed in the xz format. You can build a RHEL for Edge Minimal Raw image type by using RHEL image builder, and deploy the Minimal Raw image to the aarch64 and x86 architectures.

7.1. The minimal raw image build and deployment

Build a RHEL for Edge Minimal Raw image by using the minimal-raw image type. To boot the image, you must decompress it and copy to any bootable device, such as an SD card. You can log in to the deployed system with the user name and password that you specified in the blueprint that you used to create the RHEL for Edge Minimal Raw image.

Composing and deploying a RHEL for Edge Minimal Raw image involves the following high-level steps:

  1. Install and register a RHEL system
  2. Install RHEL image builder
  3. Using RHEL image builder, create a blueprint with customizations for RHEL for Edge Minimal Raw image
  4. Import the RHEL for Edge blueprint in RHEL image builder
  5. Create a RHEL for Edge Minimal Raw image
  6. Decompress the RHEL for Edge Minimal Raw image
  7. Deploy the RHEL for Edge Minimal Raw image

7.2. Creating the blueprint for a Minimal Raw image by using RHEL image builder CLI

By using RHEL image builder, create a blueprint and customize it with a username and a password. By doing so, you can create the Minimal Raw image and log in to it by using the credentials that you customized in the blueprint.

Procedure

  1. Create a plain text file in the Tom’s Obvious, Minimal Language (TOML) format, with the following content:

    name = "minimal-raw-blueprint"
    description = "blueprint for the Minimal Raw image"
    version = "0.0.1"
    packages = []
    modules = []
    groups = []
    distro = ""
    
    [[customizations.user]]
    name = "admin"
    password = "admin"
    groups = ["users", "wheel"]
    • name is the name and description is the description for your blueprint.
    • 0.0.1 is the version number according to the Semantic Versioning scheme.
    • Modules describe the package name and matching version glob to be installed into the image, for example, the package name = "tmux" and the matching version glob is version = "2.9a". Notice that currently there are no differences between packages and modules.
    • Groups are packages groups to be installed into the image, for example the anaconda-tools group package. If you do not know the modules and groups, leave them empty.
    • name is the username to login to the image.
    • password is a password of your choice.
    • groups are any user groups, such as "widget".
  2. Import the blueprint to the RHEL image builder server:

    # composer-cli blueprints push <blueprint_name>.toml
  3. Check if the blueprint is available on the system:

    # composer-cli blueprints list
  4. Check the validity of components, versions, and their dependencies in the blueprint:

    # composer-cli blueprints depsolve <blueprint_name>

7.3. Creating a Minimal Raw image by using RHEL image builder CLI

To create a RHEL for Edge Minimal Raw image with the RHEL image builder command-line interface, ensure that you meet the following prerequisites before following the procedure.

Prerequisites

  • You created a blueprint for the RHEL for Edge Minimal Raw image.

Procedure

  1. Create the bootable image.

    # composer-cli compose start <_blueprint_name_> minimal-raw

    where:

    • <blueprint_name> is the RHEL for Edge blueprint name.
    • minimal-raw- is the image type .

      A confirmation that the composer process has been added to the queue appears. It also shows a Universally Unique Identifier (UUID) number for the image created. Use the UUID number to track your build. Also keep the UUID number handy for further tasks.

  2. Check the image compose status.

    # composer-cli compose status

    The output displays the status in the following format:

    # <UUID> RUNNING date <blueprint_name> blueprint-version minimal-raw

7.4. Downloading and decompressing the Minimal Raw image

Download the RHEL for Edge Minimal Raw image by using RHEL image builder command line interface, and then decompress the image to be able to boot it.

Prerequisites

  • You have created a RHEL for Edge Minimal Raw image.

Procedure

  1. Review the RHEL for Edge Minimal Raw image compose status.

    # composer-cli compose status

    The output must display the following details:

    $ <UUID>_ FINISHED date <blueprint_name> <blueprint_version> minimal-raw
  2. Download the image:

    # composer-cli compose image <_UUID_>

    Image builder downloads the image as an .raw.xz into your working directory. The UUID number and the image size is displayed alongside.

    $ <UUID> minimal_raw.img.xz: size MB
  3. Decompress the image:

    $ xz -d <UUID>_minimal-raw.img.xz

    After decompressing the image, use the bootable RHEL for Edge Minimal Raw image to install a RHEL for Edge system.

7.5. Deploying the Minimal Raw image from a USB flash drive

Deploy the RHEL for Edge Minimal Raw image you generated by creating an USB installation source. This example shows how to create a USB installation source from your RHEL for Edge Minimal Raw image.

Prerequisites

Procedure

  1. Copy the RHEL for Edge Minimal Raw image file to a USB flash drive.
  2. Connect the USB flash drive to the port of the computer you want to boot.
  3. Boot the RHEL for Edge Minimal Raw image from the USB flash drive. The boot menu shows you the following options:

    Install Red Hat Enterprise Linux 9
    Test this media & install Red Hat Enterprise Linux 9
  4. Choose Install Red Hat Enterprise Linux 9. This starts the system installation.

Verification

  1. Boot into the image by using the username and password you configured in the blueprint.

    1. Check the release:

      $ cat /etc/os-release
    2. List the block devices in the system:

      $ lsblk