2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-09-25 09:14:05 +00:00

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>
This commit is contained in:
Daniel Hilst
2026-09-12 14:26:09 -03:00
parent df5c83c0bf
commit 5d0f6fc50d
+15 -2
View File
@@ -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',