Bootenvs¶
BootEnv Overrides¶
BootEnv overrides provide a mechanism to customize boot environments without
creating multiple bootenv objects. Using the bootenv-customize
parameter, you can override various aspects of bootenvs on a per-machine
(via parameter inheritance) or global (via the global profile) basis.
For the complete technical reference, see Customization using bootenv-customize.
Note
- The
Templatessection is merged with the bootenv's templates, with identically-named templates from the parameter overriding the bootenv templates - You must use the per-arch
SupportedArchitecturessection to override kernel, initrd, ISO, boot parameter, and bootloader values
Warning
- This is not compatible with bootenv purging and may cause UI pauses when uploading ISOs
- Avoid creating multiple overrides for the same bootenv with the same OS name but different ISOs or kernel/initrd settings
- Do not override sledgehammer on a per-machine basis - any overrides for sledgehammer must be matched by identical changes in the OS section of the discovery bootenv (discovery assumes the machine can transition to sledgehammer without a reboot)
What Can Be Overridden¶
The bootenv-customize parameter allows for
dynamic customizations on bootenvs. You can override the following bootenv fields:
- Loaders - Override bootloader files for different architectures (key-value map)
- OS - Override OS metadata and architecture-specific settings
Name- Operating system identifierVersion- OS version numberCodename- OS codename (e.g.,esxi,alma,rocky)Family- OS family classificationSupportedArchitectures- Architecture-specific configurations including:IsoFile- ISO filename to useIsoUrl- URL to download the ISO fileSha256- ISO checksum for validationKernel- Kernel file pathInitrds- List of initrd file pathsLoader- Architecture-specific loader pathBootParams- Kernel boot parameters
- Templates - Override or add template configurations (array of template objects)
Name- Template name (required)Path- Path where template will be renderedID- Template ID to referenceContents- Inline template contentsLink- Link to template resourceMeta- Template metadata (key-value map)
Structure¶
The parameter is structured as a map of bootenv name to override values:
Params:
bootenv-customize:
<bootenv-name>:
Loaders:
<arch-type>: <loader-path>
OS:
Name: <os-name>
Version: <version-string>
Codename: <os-codename> # optional
Family: <os-family> # optional
SupportedArchitectures:
<arch>:
IsoFile: <iso-filename>
IsoUrl: <iso-download-url> # optional
Sha256: <checksum>
Kernel: <kernel-path>
Initrds:
- <initrd-path>
Loader: <loader-path> # optional
BootParams: <boot-parameters>
Templates:
- Name: <template-name> # required
Path: <template-path>
ID: <template-id> # optional, mutually exclusive with Contents
Contents: <inline-template> # optional, mutually exclusive with ID
Link: <template-link> # optional
Meta: # optional
<key>: <value>
Automated Profile Generation¶
The drpcli profiles genbootenv command can automatically generate bootenv override profiles from a CSV file, useful for managing multiple ISO versions:
CSV format (first 5 columns required, additional columns become custom params):
Name,IsoFile,Sha256,BootEnv,Version,param1,param2
profile-name,os-installer.iso,checksum-here,base-bootenv,version,value1,value2
This generates profiles with complete bootenv-customize parameters automatically. See drpcli profiles genbootenv --help for full usage details.
Use Cases¶
BootEnv overrides are particularly useful for:
- Multiple ISO versions - Support different versions of the same OS without creating separate bootenvs
- VMware Custom ISO - Complete example
- ESXi Getting Started Guide - Provisioning workflow
- OpenShift RHCOS Customization - Content pack generator
- Sledgehammer versioning - Pin specific Sledgehammer versions for discovery
- Example bootenvs-customize with Sledgehammer - Complete example
- Updating Sledgehammer - Version management
- Bootloader customization - Switch bootloaders for specific hardware or security requirements
- How dr-provision Boots Machines - Architecture details
- Secure Boot Shim Bootloaders Fail With Proxy DHCP - Workaround details
To Do¶
-
Describe bootenv iso building
-
Describe kickstart/preseed usage
-
Describe runner.tmpl inclusion
-
Describe kernel parameters