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. The image consists of a file containing a partition layout with an existing deployed OSTree commit in it. 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 or a USB flash drive. 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: Install and register a RHEL system Install RHEL image builder Using RHEL image builder, create a blueprint with your customizations for RHEL for Edge Minimal Raw image Import the RHEL for Edge blueprint in RHEL image builder Create a RHEL for Edge Minimal Raw image Download and decompress the RHEL for Edge Minimal Raw image Create a bootable USB drive from the decompressed Raw image Deploy the RHEL for Edge Minimal Raw image 7.2. Creating the blueprint for a Minimal Raw image by using RHEL image builder CLI Create a blueprint, and customize it with a username and a password. You can use the resulting blueprint to create a Minimal Raw image and log in to it by using the credentials that you configured in the blueprint. Procedure Create a plain text file in the Tom's Obvious, Minimal Language (TOML) format, with the following content: 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". 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. Under customizations.user : name is the username to login to the image password is a password of your choice groups are any user groups, such as "widget" Import the blueprint to the RHEL image builder server: Check if the blueprint is available on the system: Check the validity of components, versions, and their dependencies in the blueprint: Additional resources Composing a RHEL for Edge image by using RHEL image builder command-line 7.3. Creating a Minimal Raw image by using RHEL image builder CLI Create a RHEL for Edge Minimal Raw image with the RHEL image builder command-line interface. Prerequisites You created a blueprint for the RHEL for Edge Minimal Raw image. Procedure Build the image. <blueprint_name> is the RHEL for Edge blueprint name minimal-raw is the image type Check the image compose status. The output displays the status in the following format: Additional resources Composing a RHEL for Edge image using image builder command-line 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 Review the RHEL for Edge Minimal Raw image compose status. The output must display the following details: Download the image: Image builder downloads the image into your working directory. The following output is an example: Decompress the image: Use the decompressed bootable RHEL for Edge Minimal Raw image to create a bootable installation medium and use it as a boot device. The following documentation describes the procedure of creating an USB bootable device from an ISO image. However, the same steps apply to the RAW images, because the RAW image is equivalent to the ISO image. See Creating a bootable USB device on Linux for more details. 7.5. Deploying the Minimal Raw image from a USB flash drive After you created a bootable USB installation medium from the customized RHEL for Edge Minimal Raw image, you can continue the installation process by deploying the Minimal Raw image from the USB flash drive and booting your customized image. Prerequisites You have a 8 GB USB flash drive. You have created a bootable installation medium from the RHEL for Edge Minimal Raw image to the USB drive. Procedure Connect the USB flash drive to the computer where you want to boot your customized image. Power on the system. Boot the RHEL for Edge Minimal Raw image from the USB flash drive. The boot menu shows you the following options: Choose Install Red Hat Enterprise Linux 9 . This starts the system installation. Verification Boot into the image by using the username and password you configured in the blueprint. Check the release: List the block devices in the system: 7.6. Serving a RHEL for Edge Container image to build a RHEL for Edge Raw image Create a RHEL for Edge Container image to serve it to a running container. Prerequisites You have created a RHEL for Edge Minimal Raw image and downloaded it. Procedure Create a blueprint for the rhel-edge-container image type, for example: Build a rhel-edge-container image: Check if the image is ready: Download the rhel-edge-container image as a .tar file: Import the RHEL for Edge Container into Podman: Start the container and make it available by using the port 8080: Create a blueprint for the edge-raw-image image type, for example: Build a RHEL for Edge Raw image by serving the RHEL Edge Container to it: Download the RHEL for Edge Raw image as a .raw file: Decompress the RHEL for Edge Raw image:

Commands:
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"]
composer-cli blueprints push <blueprint_name> .toml
composer-cli blueprints list
composer-cli blueprints depsolve <blueprint_name>
composer-cli compose start <blueprint_name> minimal-raw
composer-cli compose status
<UUID> RUNNING date <blueprint_name> blueprint-version minimal-raw
composer-cli compose status
<UUID> FINISHED date <blueprint_name> <blueprint_version> minimal-raw
composer-cli compose image <UUID>
3f9223c1-6ddb-4915-92fe-9e0869b8e209-raw.img.xz
xz -d <UUID> -raw.img.xz
Install Red Hat Enterprise Linux 9 Test this media & install Red Hat Enterprise Linux 9
cat /etc/os-release
lsblk
name = "rhel-edge-container-no-users" description = "" version = "0.0.1"
composer-cli compose start-ostree <rhel-edge-container-no-users> rhel-edge-container
composer-cli compose status
composer-cli compose image <UUID>
skopeo copy oci-archive:_<UUID>_-container.tar containers-storage:localhost/rfe-93-mirror:latest
podman run -d --rm --name <rfe-93-mirror> -p 8080:8080 localhost/ <rfe-93-mirror>
name = " <edge-raw> " description = "" version = "0.0.1" [[customizations.user]] name = "admin" password = "admin" groups = ["wheel"]
composer-cli compose start-ostree edge-raw edge-raw-image --url http://10.88.0.1:8080/repo
composer-cli compose image <UUID>
xz --decompress <UUID> >-image.raw.xz