1

I tried do-release-upgrade and it failed (again!). Not sure what I'm doing wrong as it has mostly worked in the past. These are the log files from /var/log/dist-upgrade:

apt.log
main.log

Any help would be appreciated.
Thanks.

Ubuntu 22.04.1

Edit (as requested)

apt-mark showhold:

snapd
ubuntu-desktop
ubuntu-desktop-minimal

Okay. I unheld those packages and updated my system and ran do-release-upgrade again. And I got the same error as last time:

Updating repository information

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 'jammy' to 'kinetic' entries. If you select 'No' the upgrade will cancel.

Thomas Ward
  • 74,764
vaskark
  • 243
  • Please edit your question to show us the complete output of apt-mark showhold – user535733 Oct 27 '22 at 21:07
  • 2
    Logs appear to suggest that your system is not up-to-date, or at least that your package manager already has preexisting problems. You can't release upgrade in these conditions. Please edit your question and include the output of both sudo apt update and sudo apt upgrade – Nmath Oct 27 '22 at 21:29
  • Your output suggest multiple or cascading/sequential problems. Your initial problem packages marked "hold". Your subsequent problem is a bad mirror (see https://askubuntu.com/questions/37753). – user535733 Oct 28 '22 at 18:23

2 Answers2

0

Your apt.log output says...

  Hold prevents MarkInstall of ubuntu-desktop:amd64 < 1.481 @hi mK NPb IPb >
  Hold prevents MarkInstall of ubuntu-desktop-minimal:amd64 < 1.481 @hi mK NPb IPb >

...which suggests that you have packages that have been marked "Hold". Such marking specifically prevents upgrading, including release-upgrading.

Your apt-mark output confirms that you have three packages marked "hold:"

snapd
ubuntu-desktop
ubuntu-desktop-minimal

We don't know why you marked those packages to never be upgraded, but that's the source of your current problem.

  1. Release the hold on those three packages:
sudo apt-mark unhold snapd ubuntu-desktop ubuntu-desktop-minimal
  1. Run sudo apt update and sudo apt upgrade to capture any upgrades required for the release-upgrade.

  2. Finally, run do-release-upgrade again.

user535733
  • 62,253
0

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
Teemu Leisti
  • 294
  • 2
  • 16