mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-21 16:39:30 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user