Environment variables
The build system recognizes these environment variables:The full container image name to build or use for image generation
Filesystem type for disk images. Common values:
ext4, btrfs, xfsBase directory for build outputs and temporary files
Build flavor variant. Set to
nvidia to include NVIDIA driver supportBuild commands
iso
Generates a bootable ISO image using bootc-image-builder.IMAGE(optional): Container image to use. Defaults to$IMAGE_FULLorzirconium:latest
- Creates
output/directory for build artifacts - Pulls the specified container image
- Runs bootc-image-builder with:
- ISO output format
- Btrfs root filesystem
- librepo enabled for faster repository downloads
- Configuration from
iso.toml
- Outputs ISO to
output/directory
iso.tomlconfiguration file in the working directory- Podman with root privileges
- Sufficient disk space in
/var/lib/containers/storage
rootful
Copies a container image from user context to root context for privileged operations.IMAGE(optional): Container image to copy. Defaults to$IMAGE_FULLorzirconium:latest
disk-image if the image was built in user context.
bootc
Executes bootc commands within a privileged container.ARGS: Arguments passed directly to thebootccommand
/sys/fs/selinux- SELinux filesystem/etc/containers- Container configuration/var/lib/containers- Container storage/dev- Device nodes$BUILD_BASE_DIR(or.) mounted as/data
disk-image
Creates a bootable disk image file using bootc.FILESYSTEM(optional): Filesystem type. Defaults to$BUILD_FILESYSTEMorext4
- Creates a 20GB sparse file at
${BUILD_BASE_DIR}/bootable.imgif it doesn’t exist - Installs the system to the image via loopback device
- Wipes any existing data on the image
quick-iterate
Rapid development workflow that builds, transfers, and creates a disk image in one command.- Builds container image:
podman build -t zirconium:latest . - Copies image to root context:
just rootful - Creates disk image in
/tmp:BUILD_BASE_DIR=/tmp just disk-image
/tmp to avoid cluttering the working directory.
Build stages
The Zirconium build process uses a multi-stage script system located inbuild_files/:
Naming convention
Scripts follow the pattern:NN-name-STAGE.sh where:
NN= execution order (00-99)name= component nameSTAGE= one of:pre,fetch,post
Stage types
pre - Pre-installation setup
pre - Pre-installation setup
Runs before package installation. Used for repository configuration and system preparation.Example:
00-base-pre.sh - System initializationfetch - Package installation
fetch - Package installation
Installs packages via DNF. COPR repositories are enabled temporarily for specific packages.Examples:
00-base-fetch.sh- Base system packages01-theme-fetch.sh- Desktop environment and theme packages02-nvidia-fetch.sh- NVIDIA drivers (whenBUILD_FLAVOR=nvidia)99-misc-fetch.sh- Flatpak repository setup
post - Post-installation configuration
post - Post-installation configuration
Configures installed packages, copies system files, and enables services.Examples:
00-base-post.sh- Copies system files, configures systemd01-theme-post.sh- Theme setup, font cache, service presets02-nvidia-post.sh- NVIDIA driver compilation and SELinux setup
Configuration files
iso.toml
Configuration for bootc-image-builder when generating ISO images. Should include:- Installation defaults
- Kernel arguments
- User setup
- Network configuration
Containerfile/Dockerfile
The main container build file that orchestrates the build stages by executing scripts frombuild_files/ in sequence.
Build options
NVIDIA support
To build with NVIDIA driver support:02-nvidia-fetch.sh and 02-nvidia-post.sh to install:
- NVIDIA kernel modules via DKMS
- CUDA libraries
- nvidia-container-toolkit
- Proprietary driver stack