2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-11-21 01:42:15 +00:00
Commit Graph

3 Commits

Author SHA1 Message Date
Daniel Hilst ebcc2e1d0e test(xcat-core): capture the install source shim in the Genesis boot script
The shell, discover, standby and runcmd destinies load the Genesis kernel
through the same UEFI script as an osimage kernel. setstate asks for a shim
with the os of the node, so an install source answers for a kernel that no
distribution signed.

The new node keeps the install source of the first node of the test, so both
shims are on disk and the order decides the answer. Two assertions of twelve
fail: the script names /install/alma9.8/x86_64/EFI/BOOT/BOOTX64.EFI.

The nodeset helper takes currstate and provmethod, so the node reads as the
shell destiny it is.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 14:49:28 -03:00
Daniel Hilst 022a80f351 feat(xcat-core): load the kernel of an ipxe node through a Secure Boot shim
This PR adds a shim to the UEFI boot scripts of netboot=ipxe nodes, so a node
with Secure Boot on reaches its kernel.

The firmware signature database does not hold the keys of a Linux
distribution. A UEFI node with netboot=ipxe loads snponly-shim.efi and
snponly.efi, both signed, and then stops at the kernel with "Verification
failed: Security Policy Violation".

xCAT::SecureBoot::shim_url_path names a shim for one node. The shim of the
install source comes first, because its vendor certificate signs the kernel of
its own distribution. copycds keeps the names of the DVD, so the module tries
EFI/BOOT/BOOTX64.EFI, EFI/BOOT/bootx64.efi and EFI/boot/bootx64.efi: EL and
openEuler ship the first, openSUSE the second and Ubuntu the third. When no
install source carries a shim, the module names the shim of ipxe-xcat, which
verifies a kernel that a MOK key signs.

xnba.pm writes the shim line after imgload in the UEFI script of an ipxe node,
and mknb.pm writes it in the UEFI discovery scripts. iPXE fetches the shim only
when it cannot load the kernel itself, so a node with Secure Boot off reads no
shim. netboot=xnba is unchanged: no key signs xnba.efi.

The elilo and ESXi paths and the Genesis kernel stay unsigned, and the iPXE
documentation now says so. The validation matrix gets a row for a UEFI install,
a netboot image and discovery with Secure Boot on.

secureboot_ipxe_node_shim.t and secureboot_genesis_shim.t drive nodeset and
mknb into a scratch TFTP root. Four assertions of ten and two of seven fail
without this change.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 11:57:07 -03:00
Daniel Hilst 7b518ca742 test(xcat-core): capture the missing Secure Boot shim in the iPXE boot scripts
With netboot=ipxe a UEFI node loads snponly-shim.efi, which Microsoft signs,
and reaches iPXE with Secure Boot on. The boot scripts then load the kernel
with imgfetch and imgload, and the firmware refuses it: the signature
database does not hold the keys of the distribution, and nothing signs the
Genesis kernel. The node stops with "Verification failed: Security Policy
Violation".

The two tests drive nodeset and mknb into a scratch TFTP root and read the
UEFI scripts they write. Four assertions of nine and two of seven fail on
master: no script names a shim.

Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com>
2026-10-07 11:46:50 -03:00