Skip to content

Commit 4ac4253

Browse files
henrywangclaude
andcommitted
tests: Skip --bootloader flag for UKI images in install-outside-container
For UKI (Unified Kernel Image) images, the boot setup is handled differently than BLS (Type1) images. UKI images have the kernel, initrd, and cmdline bundled in a single .efi file at /boot/EFI/Linux/. When installing a UKI image with --composefs-backend, passing --bootloader=systemd causes the install to go through the BLS boot setup path which doesn't work for UKI images. Fix this by checking the bootType from status and skipping the --bootloader flag for UKI images, allowing the UKI boot setup to handle it correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
1 parent b64bed4 commit 4ac4253

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tmt/tests/booted/test-install-outside-container.nu

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ let base_args = $"bootc install to-disk --disable-selinux --via-loopback --sourc
3131

3232
let install_cmd = if (tap is_composefs) {
3333
let st = bootc status --json | from json
34-
let bootloader = ($st.status.booted.composefs.bootloader | str downcase)
35-
$"($base_args) --composefs-backend --bootloader=($bootloader) --filesystem ext4 ./disk.img"
34+
let boot_type = ($st.status.booted.composefs.bootType | str downcase)
35+
# For UKI images, don't pass --bootloader as UKI boot setup handles it differently
36+
if $boot_type == "uki" {
37+
$"($base_args) --composefs-backend --filesystem ext4 ./disk.img"
38+
} else {
39+
let bootloader = ($st.status.booted.composefs.bootloader | str downcase)
40+
$"($base_args) --composefs-backend --bootloader=($bootloader) --filesystem ext4 ./disk.img"
41+
}
3642
} else {
3743
$"($base_args) --filesystem xfs ./disk.img"
3844
}

0 commit comments

Comments
 (0)