Skip to content

defs: allow templating kernel arguments - #2818

Merged
supakeen merged 1 commit into
osbuild:mainfrom
supakeen:template-kernel-arguments
Nov 10, 2026
Merged

supakeen merged 1 commit into
osbuild:mainfrom
supakeen:template-kernel-arguments

Conversation

@supakeen

@supakeen supakeen commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Allow for using Go templates in kernel arguments. This has a singular main use case (see 1).

When building UKIs we need a way to couple potentially auto-mounted partitions to the UKI. "Normally" this is done by a matching roothash or usrhash value, but we aren't ready for doing that yet.

UKIs should really only boot with the correct partition, but by not supplying any image filter or hashes systemd-dissect always selects the latest version of a partition. This means systems fail to boot if we explicitly select an older UKI.

To fix this, let's allow templating the kernel arguments so we can embed an image_filter into the UKI's arguments that ensures we select the corresponding partitions.


This is part of few changes. I won't directly use this in TeamSBC (instead I'm using a workaround) but if/when we want to create UKIs separatey from the os pipeline's RPM transaction we will need these options to be templateable anyhow.

Allow for using Go templates in kernel arguments. This has a singular
main use case (see [1]).

When building UKIs we need a way to couple potentially auto-mounted
partitions to the UKI. "Normally" this is done by a matching `roothash`
or `usrhash` value, but we aren't ready for doing that yet.

UKIs should really only boot with the correct partition, but by not
supplying any image filter or hashes `systemd-dissect` always selects
the latest version of a partition. This means systems fail to boot if we
explicitly select an older UKI.

To fix this, let's allow templating the kernel arguments so we can embed
an `image_filter` into the UKI's arguments that ensures we select the
corresponding partitions.

[1]: teamsbc/distribution#53

Signed-off-by: Simon de Vlieger <[email protected]>
@supakeen
supakeen requested a review from a team as a code owner November 9, 2026 12:49
@supakeen
supakeen added this pull request to the merge queue Nov 10, 2026
Merged via the queue into osbuild:main with commit e183644 Nov 10, 2026
75 of 78 checks passed
@supakeen
supakeen deleted the template-kernel-arguments branch November 10, 2026 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants