From f1b044f2a8cb6e323419d5522843779ae7270368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Sat, 5 Sep 2026 01:49:30 -0300 Subject: [PATCH] fix(genimage): take the netboot mirror from the ports archive off amd64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit archive.ubuntu.com publishes amd64 and i386 only, so debootstrap could not find a single package for a ppc64el or riscv64 netboot image and genimage failed on every architecture except x86. The default mirror is now the ports archive for those architectures. site.ubuntu_apt_mirror still overrides it, for a local mirror that serves every architecture. Signed-off-by: Vinícius Ferrão <2031761+viniciusferrao@users.noreply.github.com> --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index c63de378e..17005cdb5 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -259,8 +259,13 @@ unless ($onlyinitrd) { # site.ubuntu_apt_mirror overrides; otherwise default to the public archive. A live-server # ISO is never a complete debootstrap source, so a real mirror is always required here. my @aptmirror = xCAT::TableUtils->get_site_attribute("ubuntu_apt_mirror"); + # archive.ubuntu.com publishes amd64 and i386 only. Every other architecture, ppc64el + # and riscv64 included, is on the ports archive. + my $default = ($uarch =~ /^(?:amd64|i386)$/) + ? 'http://archive.ubuntu.com/ubuntu' + : 'http://ports.ubuntu.com/ubuntu-ports'; my $mirror = (defined $aptmirror[0] && length $aptmirror[0]) - ? $aptmirror[0] : 'http://archive.ubuntu.com/ubuntu'; + ? $aptmirror[0] : $default; (my $codename = $osver) =~ s/^ubuntu//; # Strip ONLY a trailing third component. A bare s/\.\d+$// also strips the minor from a # two-part osvers (ubuntu26.04 -> "26"), which misses the %cn map below and reaches