From 7aeb4ee1894be88faa0bff02ae606d1e83f4fa6b Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 11 Sep 2026 14:37:08 -0300 Subject: [PATCH 1/3] test(xcat-core): nodeset refuses an Ubuntu POWER live image it can boot reg_linux_diskfull_installation_flat fails on every ppc64le cell of xcat-core-devel-ubuntu-cd. nodeset stops before it writes a grub2 entry (build #119, ubuntu-24-ppc64le-devel): xcat25-cn: The network boot initrd.gz is not found in /install/ubuntu24.04.4/ppc64el/install/netboot. The Ubuntu ppc64el live-server ISO carries no netboot tree. It keeps the installer kernel and initrd under casper: 22.04 and 24.04 ship hwe-vmlinux and hwe-initrd beside vmlinux and initrd, 26.04 ships the release pair only. %INSTALL_BOOT_FILES describes that layout for x86 and not for POWER, and mkinstall carries a second, POWER-only precondition on install/netboot/initrd.gz that no live image satisfies. The new cases resolve the POWER casper layouts, and ask a single routine whether media is bootable. They fail now. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/unit/debian_install_boot_files.t | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/xCAT-test/unit/debian_install_boot_files.t b/xCAT-test/unit/debian_install_boot_files.t index dc664cbb0..3bcbcfd31 100644 --- a/xCAT-test/unit/debian_install_boot_files.t +++ b/xCAT-test/unit/debian_install_boot_files.t @@ -103,6 +103,58 @@ is( 'riscv64 does not accept the kernel name the other live images use', ); +# The Ubuntu ppc64el live-server ISO carries no netboot tree at all. 22.04 and 24.04 ship +# casper/hwe-vmlinux + casper/hwe-initrd beside casper/vmlinux + casper/initrd; 26.04 ships +# the release pair only. Without these entries nodeset stops the diskful install with +# "The network boot initrd.gz is not found in /install/netboot". +is( + resolved('ppc64le', 'ppc64el', media('casper/vmlinux', 'casper/initrd')), + 'casper/vmlinux|casper/initrd', + 'the POWER live image keeps its kernel under casper', +); +is( + resolved('ppc64le', 'ppc64el', + media('casper/hwe-vmlinux', 'casper/hwe-initrd', 'casper/vmlinux', 'casper/initrd')), + 'casper/hwe-vmlinux|casper/hwe-initrd', + 'the POWER hardware-enablement kernel wins over the release kernel', +); +is( + resolved('ppc64le', 'ppc64el', + media('install/netboot/ubuntu-installer/ppc64el/vmlinux', + 'install/netboot/ubuntu-installer/ppc64el/initrd.gz', + 'casper/vmlinux', 'casper/initrd')), + 'install/netboot/ubuntu-installer/ppc64el/vmlinux|install/netboot/ubuntu-installer/ppc64el/initrd.gz', + 'a POWER netboot tree still wins over a live image on the same media', +); + +# mkinstall refused POWER media that carried no install/netboot/initrd.gz, whatever +# install_boot_files could resolve. One routine answers the question now. +can_ok('xCAT_plugin::debian', 'install_media_is_bootable'); +is( + xCAT_plugin::debian::install_media_is_bootable('ppc64le', 'ppc64el', + media('casper/vmlinux', 'casper/initrd')), + 1, + 'a POWER live image is bootable media', +); +is( + xCAT_plugin::debian::install_media_is_bootable('ppc64le', 'ppc64el', + media('install/netboot/ubuntu-installer/ppc64el/vmlinux', + 'install/netboot/ubuntu-installer/ppc64el/initrd.gz')), + 1, + 'a POWER netboot tree is bootable media', +); +is( + xCAT_plugin::debian::install_media_is_bootable('ppc64le', 'ppc64el', media('README')), + 0, + 'media with no installer is not bootable media', +); +is( + xCAT_plugin::debian::install_media_is_bootable('x86_64', 'amd64', + media('casper/vmlinuz', 'casper/initrd')), + 1, + 'an x86 live image is bootable media', +); + # --- nothing to boot ------------------------------------------------------- is(resolved('x86_64', 'amd64', media('casper/vmlinuz')), undef, 'a kernel without its initrd is not a match'); From 0c27708c0f0399c98f09fc7e9b17d1f9b1b7ba1f Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Fri, 11 Sep 2026 14:39:23 -0300 Subject: [PATCH 2/3] fix(xcat-core): nodeset cannot boot an Ubuntu POWER install from live media nodeset stops the diskful install on every ppc64le cell of xcat-core-devel-ubuntu-cd (build #119, ubuntu-24-ppc64le-devel): xcat25-cn: The network boot initrd.gz is not found in /install/ubuntu24.04.4/ppc64el/install/netboot. The Ubuntu ppc64el live-server ISO carries no netboot tree. The installer kernel and initrd sit under casper. Two places in xCAT-server/lib/xcat/plugins/debian.pm reject that media: %INSTALL_BOOT_FILES describes no casper layout for POWER, and mkinstall applies a second, POWER-only precondition on install/netboot/initrd.gz before it calls the resolver. The POWER table now carries casper/hwe-vmlinux + casper/hwe-initrd and casper/vmlinux + casper/initrd, after the netboot entries so a netboot tree still wins. install_media_is_bootable replaces the POWER-only precondition, so one routine decides what media can boot. debian_install_boot_files.t resolves the POWER casper layouts and drives install_media_is_bootable. It fails without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-server/lib/xcat/plugins/debian.pm | 32 ++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index e085efc28..813d8dc58 100644 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -191,6 +191,8 @@ my %INSTALL_BOOT_FILES = ( 'ppc64' => [ [ 'install/netboot/ubuntu-installer/{darch}/vmlinux', 'install/netboot/ubuntu-installer/{darch}/initrd.gz' ], [ 'install/vmlinux', 'install/netboot/initrd.gz' ], + [ 'casper/hwe-vmlinux', 'casper/hwe-initrd' ], + [ 'casper/vmlinux', 'casper/initrd' ], ], 'riscv64' => [ [ 'casper/vmlinux', 'casper/initrd' ], @@ -379,6 +381,27 @@ sub _no_grub2_loader { return; } +#------------------------------------------------------- + +=head3 install_media_is_bootable + + Descriptions: Report whether copied media carries an install kernel and initrd. + Arguments: + $arch - the xCAT architecture of the node + $darch - the dpkg architecture + $pkgdir - the directory copycds wrote the media to + Returns: 1 when the media can boot a network install, 0 when it cannot + +=cut + +#------------------------------------------------------- +sub install_media_is_bootable +{ + my ($arch, $darch, $pkgdir) = @_; + + return install_boot_files($arch, $darch, $pkgdir) ? 1 : 0; +} + sub is_ubuntu_live_media { my $media_path = shift; @@ -1176,10 +1199,11 @@ sub mkinstall { next; } - if ($arch =~ /ppc64/i and !(-e "$pkgdir/install/netboot/initrd.gz") and - !(-e "$pkgdir/install/netboot/ubuntu-installer/$darch/initrd.gz")) { - xCAT::MsgUtils->report_node_error($callback, $node, - "The network boot initrd.gz is not found in $pkgdir/install/netboot. This is provided by Ubuntu, please download and retry." + # The POWER live-server ISO keeps its installer under casper and ships no netboot + # tree, so the media that can boot it is the media install_boot_files resolves. + unless (install_media_is_bootable($arch, $darch, $pkgdir)) { + xCAT::MsgUtils->report_node_error($callback, $node, + "No install kernel and initrd were found on the media in $pkgdir." ); next; } From 28e59642ca872e987baa5fa74bf3576ff5cf9ec8 Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Mon, 14 Sep 2026 08:23:53 -0300 Subject: [PATCH 3/3] style(xcat-core): the boot-file test comments retell the bug report Three comments in debian_install_boot_files.t explain more than the code hides. One narrates the media table the assertions already list. One repeats the nodeset error message and the releases that produce it. One describes what mkinstall used to refuse before the change. A comment states why, once, where the reader cannot re-derive it. Each of the three now carries only the fact the assertions do not show. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-test/unit/debian_install_boot_files.t | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/xCAT-test/unit/debian_install_boot_files.t b/xCAT-test/unit/debian_install_boot_files.t index 3bcbcfd31..d866c36b2 100644 --- a/xCAT-test/unit/debian_install_boot_files.t +++ b/xCAT-test/unit/debian_install_boot_files.t @@ -7,10 +7,9 @@ use File::Temp qw(tempdir); use FindBin; use Test::More; -# The installer kernel and initrd sit in a different place on every Ubuntu media layout: -# netboot trees name them after the Debian architecture, live images keep them under -# casper, and a hardware-enablement kernel ships beside the release one. Build each layout -# on disk and ask the resolver, rather than reading the table that describes them. +# The installer kernel and initrd sit in a different place on every Ubuntu media layout. +# Build each layout on disk and ask the resolver, rather than read the table that +# describes them. use lib "$FindBin::Bin/../../perl-xCAT"; use lib "$FindBin::Bin/../../xCAT-server/lib/perl"; @@ -103,10 +102,9 @@ is( 'riscv64 does not accept the kernel name the other live images use', ); -# The Ubuntu ppc64el live-server ISO carries no netboot tree at all. 22.04 and 24.04 ship -# casper/hwe-vmlinux + casper/hwe-initrd beside casper/vmlinux + casper/initrd; 26.04 ships -# the release pair only. Without these entries nodeset stops the diskful install with -# "The network boot initrd.gz is not found in /install/netboot". +# The Ubuntu ppc64el live-server ISO carries no netboot tree. 22.04 and 24.04 ship the +# hardware-enablement pair under casper beside the release pair; 26.04 ships the release +# pair only. is( resolved('ppc64le', 'ppc64el', media('casper/vmlinux', 'casper/initrd')), 'casper/vmlinux|casper/initrd', @@ -127,8 +125,7 @@ is( 'a POWER netboot tree still wins over a live image on the same media', ); -# mkinstall refused POWER media that carried no install/netboot/initrd.gz, whatever -# install_boot_files could resolve. One routine answers the question now. +# mkinstall asks this routine, so it accepts every media install_boot_files resolves. can_ok('xCAT_plugin::debian', 'install_media_is_bootable'); is( xCAT_plugin::debian::install_media_is_bootable('ppc64le', 'ppc64el',