From 5d0f6fc50dbe4753961d64d0eabbd87baf01e47a Mon Sep 17 00:00:00 2001 From: Daniel Hilst <392820+dhilst@users.noreply.github.com> Date: Sat, 12 Sep 2026 14:26:09 -0300 Subject: [PATCH] fix(xcat-core): the Ubuntu ppc64le diskful install stops without grub-ieee1275 A diskful install of Ubuntu on a ppc64el node runs to the bootloader step and stops. curtin reports "dpkg-query: package 'grub-ieee1275' is not installed" from dpkg-reconfigure, and the node never reaches the disk it installed. ubuntu_subiquity_apt_config in xCAT-server/lib/perl/xCAT/Template.pm writes APT::Install-Recommends "false" for every architecture. curtin installs a bootloader package of its own for UEFI and for s390x only, so on a PReP machine grub-ieee1275 reaches the target only as a recommended package of the kernel image, and that setting removes it. The apt block now keeps the recommended packages on ppc64el, online and offline, and is unchanged on every other architecture. ubuntu_subiquity_pkglist.t renders the block for osarch ppc64el and requires that it does not disable the recommended packages. Both assertions fail without this change. Signed-off-by: Daniel Hilst <392820+dhilst@users.noreply.github.com> --- xCAT-server/lib/perl/xCAT/Template.pm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Template.pm b/xCAT-server/lib/perl/xCAT/Template.pm index 79b26101f..44f22b751 100644 --- a/xCAT-server/lib/perl/xCAT/Template.pm +++ b/xCAT-server/lib/perl/xCAT/Template.pm @@ -1850,6 +1850,19 @@ sub ubuntu_subiquity_apt_mirror # The key curtin names in the Deb822 source it writes for the primary apt mirror on 24.04 and later. my $UBUNTU_ARCHIVE_KEYRING = '/usr/share/keyrings/ubuntu-archive-keyring.gpg'; +# The apt lines that keep the recommended packages out of the install. ospkgs installs without +# them and the installer matches it. ppc64el is the exception: curtin installs a bootloader +# package of its own for UEFI and for s390x only, and on a PReP machine install_grub runs +# "dpkg-reconfigure grub-ieee1275" on a package the Ubuntu kernel image merely recommends. With +# the recommended packages off that package is absent and the install stops there. +sub ubuntu_subiquity_no_recommends_lines +{ + my ($osarch) = @_; + + return () if defined($osarch) && $osarch =~ /^ppc64/i; + return (q( conf: 'APT::Install-Recommends "false";')); +} + sub ubuntu_subiquity_apt_config { my ($media_dir, $osarch, $pkgdirs) = @_; @@ -1877,7 +1890,7 @@ sub ubuntu_subiquity_apt_config ' apt:', ' preserve_sources_list: false', ' geoip: false', - q( conf: 'APT::Install-Recommends "false";'), + ubuntu_subiquity_no_recommends_lines($osarch), ' mirror-selection:', ' primary:', " - uri: $online_mirror", @@ -1916,7 +1929,7 @@ sub ubuntu_subiquity_apt_config ' preserve_sources_list: false', ' fallback: offline-install', ' geoip: false', - q( conf: 'APT::Install-Recommends "false";'), + ubuntu_subiquity_no_recommends_lines($osarch), ' disable_suites:', ' - updates', ' - backports',