Prerequisites
Before building custom Zirconium images, ensure you have:- Podman or Docker installed
- Root/sudo access for bootable image creation
- At least 20GB free disk space
- Fedora or compatible Linux distribution (for ISO/disk creation)
Basic image build
The simplest way to build a Zirconium container image:zirconium:latest in your local container storage.
Building NVIDIA variant
For systems with NVIDIA graphics cards:BUILD_FLAVOR argument controls which build scripts execute. When set to “nvidia”, the NVIDIA driver installation scripts run during the build.
Using Justfile commands
Zirconium includes a Justfile with convenient build automation commands. These recipes handle complex operations with sensible defaults.Creating bootable ISO
Generate a bootable ISO installer:- Pulls the specified image (default:
zirconium:latest) - Runs bootc-image-builder in a privileged container
- Creates an ISO with Btrfs root filesystem
- Outputs the ISO to the
./outputdirectory
Creating disk images
Build a raw disk image for deployment:./bootable.img with ext4 filesystem by default.
Filesystem options
Change the root filesystem type:Quick iteration workflow
For rapid development and testing:- Builds the image locally:
podman build -t zirconium:latest . - Transfers it to root account:
just rootful - Creates a disk image in
/tmp:BUILD_BASE_DIR=/tmp just disk-image
Modifying the Containerfile
Adding new build layers
To add custom software or configuration, insert a new RUN layer:Place your custom layer between the theme layer (01) and misc layer (99) to maintain logical build order.
Changing the base image
To use a different Fedora version:Adding files to the context
Include additional resources in the build context:/ctx/custom/.
Testing custom builds
Local container testing
Run your built image as a container:Validation checks
Verify the image passes bootc requirements:Testing in a VM
After creating a disk image:ISO testing
Test the ISO in a VM:Environment variables
Customize builds with environment variables:| Variable | Description | Default |
|---|---|---|
IMAGE_FULL | Full image reference | zirconium:latest |
BUILD_FLAVOR | Build variant (empty or “nvidia”) | “ |
BUILD_FILESYSTEM | Root filesystem type | ext4 |
BUILD_BASE_DIR | Output directory for disk images | . (current dir) |
Troubleshooting
Build fails during package installation
If DNF operations fail:- Check your internet connection
- Verify COPR repositories are accessible
- Try clearing the cache:
podman build --no-cache
NVIDIA build issues
If NVIDIA drivers fail to build:- Ensure you’re using a compatible kernel version
- Check
/usr/src/nvidia-*for driver source availability - Review the patch application in
02-nvidia-fetch.sh:26-30for kernel compatibility
ISO creation fails
Ifjust iso fails:
- Ensure you have root/sudo access
- Check that
/var/lib/containers/storageis accessible - Verify the image exists:
sudo podman images | grep zirconium - Make sure
output/directory exists and is writable
Disk image won’t boot
If the disk image fails to boot:- Verify the image was created successfully:
ls -lh bootable.img - Check it’s at least 1GB: Images smaller than this may be incomplete
- Ensure you used
--wipeflag or the disk was empty - Try a different filesystem:
BUILD_FILESYSTEM=btrfs just disk-image