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:
- Install and register a RHEL system
- Install RHEL image builder
- Using RHEL image builder, create a blueprint with 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
- Decompress the RHEL for Edge Minimal 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
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
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".
Import the blueprint to the RHEL image builder server:
# composer-cli blueprints push <blueprint_name>.toml
Check if the blueprint is available on the system:
# composer-cli blueprints list
Check the validity of components, versions, and their dependencies in the blueprint:
# composer-cli blueprints depsolve <blueprint_name>
Additional resources
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
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.
-
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
Additional resources
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.
# composer-cli compose status
The output must display the following details:
$ <UUID>_ FINISHED date <blueprint_name> <blueprint_version> minimal-raw
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
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
- You have created a RHEL for Edge Minimal Raw image.
- You have a 8 GB USB flash drive.
- You have an UEFI HTTP server running. See Setting up an UEFI HTTP Boot server.
Procedure
- Copy the RHEL for Edge Minimal Raw image file to a USB flash drive.
- Connect the USB flash drive to the port of the computer you want to boot.
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
- 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:
$ cat /etc/os-release
List the block devices in the system:
$ lsblk