I got the same warning when updating a virtual server running on the Gandi service by commanding do-release-upgrade
. In my case, the exact error was:
No valid mirror found
While scanning your repository information no mirror entry for the
upgrade was found. This can happen if you run an internal mirror or
if the mirror information is out of date.
Do you want to rewrite your 'sources.list' file anyway? If you choose
'Yes' here it will update all 'focal' to 'jammy' entries.
If you select 'No' the upgrade will cancel.
But I simply answered "y" to go ahead and try the update (after taking a snapshot of the disk, for safety), and everything went fine. I think the do-release-upgrade
must have updated the mirror information. In fact, after the upgrade, the contents of the server's /etc/apt/sources.list.d/
directory was
-rw-r--r-- 1 root root 0 2017-05-15 14:48 ubuntu-xenial-backports.list
-rw-r--r-- 1 root root 70 2023-07-03 11:18 ubuntu-xenial-gandi.list
-rw-r--r-- 1 root root 68 2023-07-03 11:18 ubuntu-xenial-gandi.list.distUpgrade
-rw-r--r-- 1 root root 69 2017-08-19 19:50 ubuntu-xenial-gandi.list.save
-rw-r--r-- 1 root root 0 2017-05-15 14:48 ubuntu-xenial-proposed.list
-rw-r--r-- 1 root root 91 2023-07-03 11:18 ubuntu-xenial-security.list
-rw-r--r-- 1 root root 91 2023-07-03 11:18 ubuntu-xenial-security.list.distUpgrade
-rw-r--r-- 1 root root 92 2017-08-19 19:50 ubuntu-xenial-security.list.save
-rw-r--r-- 1 root root 90 2023-07-03 11:18 ubuntu-xenial-updates.list
-rw-r--r-- 1 root root 90 2023-07-03 11:18 ubuntu-xenial-updates.list.distUpgrade
-rw-r--r-- 1 root root 91 2017-08-19 19:50 ubuntu-xenial-updates.list.save
-rw-r--r-- 1 root root 82 2023-07-03 11:18 ubuntu-xenial.list
-rw-r--r-- 1 root root 82 2023-07-03 11:18 ubuntu-xenial.list.distUpgrade
-rw-r--r-- 1 root root 83 2017-08-19 19:50 ubuntu-xenial.list.save
and, to take an example, the content of ubuntu-xenial.list
is now
deb [arch=amd64] https://mirrors.gandi.net/ubuntu/ jammy main multiverse universe
while that of ubuntu-xenial.list.distUpgrade
is
deb [arch=amd64] https://mirrors.gandi.net/ubuntu/ focal main multiverse universe
and that of ubuntu-xenial.list.save
is
deb [arch=amd64] https://mirrors.gandi.net/ubuntu/ xenial main multiverse universe
I think the "xenial" is a holdover from the first installation of Ubuntu I did in 2017 (16.04 is codenamed Xenial Xerus), while "focal" is the version I upgraded from (20.04, or "Focal Fossa"), and "jammy" is the version I upgraded to (22.04, or "Jammy Jellyfish").
Edited to add, on 2023-07-19:
I queried Gandi's customer about the warning, and they gave the following advice:
Before do-release-upgrade you could uninstall the following package:
apt remove gandi-hosting-vm2
and then after the do-release-upgrade, reinstall the package:
apt install gandi-hosting-vm2