Public bug reported:

Release: Kubuntu 26.04.1 (resolute), desktop ISO, booted over PXE with
boot=casper netboot=nfs

What happens:
During boot, “Generating APT cache for cdrom” takes about 2½ minutes. After 
reading file:/cdrom, it repeatedly tries archive.ubuntu.com and 
security.ubuntu.com and fails with “Temporary failure resolving” until it gives 
up. Total boot to desktop is about 4 minutes, versus about 1½ with the fix 
below.

Cause:
scripts/casper-bottom/41apt_build_cache_cdrom (added for LP #2145807) removes 
everything from /root/etc/apt/sources.list.d except cdrom.sources, but doesn’t 
handle the legacy /root/etc/apt/sources.list, which in the 26.04 image contains:

deb http://archive.ubuntu.com/ubuntu/ resolute main restricted universe 
multiverse
deb http://security.ubuntu.com/ubuntu/ resolute-security main restricted 
universe multiverse
deb http://archive.ubuntu.com/ubuntu/ resolute-updates main restricted universe 
multiverse

So apt-get update queries the internet mirrors as well. On optical or
USB boot there’s no network at this stage, so the lookups fail
instantly. On netboot the network is up, but DNS isn’t usable yet
(/etc/resolv.conf points to the systemd-resolved stub, which isn’t
running), so every lookup waits out a timeout.

Fix:
Also remove sources.list inside the overlay, before apt-get update:


    rm -f -- /root/etc/apt/sources.list
    chroot /root apt-get update --no-list-cleanup

Since this runs on the temporary overlay of /etc/apt, the live system’s
real sources.list is unaffected once the overlay is unmounted. Tested by
adding the patched script as an extra initrd: the step now completes in
seconds, and the live session and installer work normally.

** Affects: casper (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2173250

Title:
  casper: 41apt_build_cache_cdrom ignores /etc/apt/sources.list,
  stalling netboot for minutes

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/2173250/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to