Usage
Parameters
Path to the image configuration file (JSON format)
Directory to store temporary files while building
Path to local RPM repository
Path to tdnf worker tarball
Full path to local.repo file
Path to assets directory containing additional files
Base directory for relative file paths from the config. Defaults to config’s directory.
Path to directory to place final image
File that stores list of packages used to compose the image
Enable to perform a live install to the disk specified in config file
Write progress updates to stdout, such as percent complete and current action
Build number to be used in the image
Optional: Snapshot time to be added to the image tdnf.conf
File that stores timestamps for this program
Path to the log file
Log level (panic, fatal, error, warn, info, debug, trace)
How It Works
- Load Configuration: Parses the image configuration file
- Setup Disk: Creates and partitions the disk image (or uses existing disk for live install)
- Install Packages: Uses tdnf to install all specified packages into the image
- Configure System: Applies system settings, users, network configuration, etc.
- Install Bootloader: Installs and configures GRUB2
- Finalize: Runs post-install scripts and creates final image
Image Types
Disk Images
Full bootable disk images with partitions, bootloader, and complete system:- Raw disk images
- VHDX (Hyper-V)
- VHD (legacy)
- QCOW2 (QEMU/KVM)
Root Filesystem
A root filesystem without disk partitioning or bootloader, useful for:- Container images
- Installation bases
- Custom deployment scenarios
Example
Standard Disk Image
RootFS Only
Live Install
Configuration File
The image configuration file defines:- Disks: Partition layout, filesystem types, and sizes
- SystemConfigs: Package lists, hostname, users, network settings
- KernelOptions: Boot parameters
- AdditionalFiles: Extra files to copy into the image
- PostInstallScripts: Scripts to run after installation
- Scripts: Custom scripts for advanced configuration
Notes
- Requires root privileges for disk operations and chroot
- The
--emit-progressflag is useful for CI/CD pipelines to track build progress - Use
--live-installcarefully - it will write directly to physical disks - The tool uses chroot for offline image customization, which is faster than VM-based approaches