6

I have a Raspberry Pi running Ubuntu 21.10, which I recently learned is EOL. No worries, I'll just upgrade to the next version (which, happily enough, is an LTS release)... or so I thought...

I'd like to upgrade to Ubuntu 22.04 LTS, but none of the upgrade tools seem to be working at all, which is very confusing to me.

For context, I'm accustomed to working with Debian, where you simply edit your apt.sources.list and upgrade packages. From what I've found, with Ubuntu, the preferred method of upgrading seems to be the do-release-upgrade tool. However, that tool is not doing anything on my system (and I haven't found any command-line switches like --actually-do-upgrade that I'm missing):

anthony@planetsrv:~$ sudo do-release-upgrade
Checking for a new Ubuntu release
Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife

Please install all available updates for your release before upgrading.

It just tells me that I'm EOL -- I know that, that's why I'm trying to upgrade! :) The link just gives the release schedule; I don't see any instructions or tips about upgrading from an EOL'd version.

When running apt update, I get nothing but 404 errors:

anthony@planetsrv:~$ sudo apt update
Ign:1 http://ports.ubuntu.com/ubuntu-ports impish InRelease
Ign:2 http://ports.ubuntu.com/ubuntu-ports impish-updates InRelease
Ign:3 http://ports.ubuntu.com/ubuntu-ports impish-backports InRelease
Ign:4 http://ports.ubuntu.com/ubuntu-ports impish-security InRelease
Err:5 http://ports.ubuntu.com/ubuntu-ports impish Release
  404  Not Found [IP: 2620:2d:4000:1::19 80]
Err:6 http://ports.ubuntu.com/ubuntu-ports impish-updates Release
  404  Not Found [IP: 2620:2d:4000:1::19 80]
Err:7 http://ports.ubuntu.com/ubuntu-ports impish-backports Release
  404  Not Found [IP: 2620:2d:4000:1::19 80]
Err:8 http://ports.ubuntu.com/ubuntu-ports impish-security Release
  404  Not Found [IP: 2620:2d:4000:1::19 80]
Reading package lists... Done
E: The repository 'http://ports.ubuntu.com/ubuntu-ports impish Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports impish-updates Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports impish-backports Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports impish-security Release' no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Same with apt upgrade:

anthony@planetsrv:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  libfwupdplugin1
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
  apt apt-utils cloud-init gtk-update-icon-cache keyutils libapt-pkg6.0 libgtk-3-0 libgtk-3-bin libgtk-3-common libkeyutils1 libnss-systemd libpam-systemd librados2 librbd1 libsystemd0 libudev1
  python3-distupgrade snapd systemd systemd-sysv systemd-timesyncd ubuntu-advantage-tools ubuntu-release-upgrader-core udev
24 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 41.2 MB of archives.
After this operation, 122 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Err:1 http://ports.ubuntu.com/ubuntu-ports impish-updates/main arm64 libnss-systemd arm64 248.3-1ubuntu8.6
  404  Not Found [IP: 2620:2d:4000:1::19 80]
Err:2 http://ports.ubuntu.com/ubuntu-ports impish-updates/main arm64 libsystemd0 arm64 248.3-1ubuntu8.6
  404  Not Found [IP: 2620:2d:4000:1::19 80]
Err:3 http://ports.ubuntu.com/ubuntu-ports impish-updates/main arm64 systemd-timesyncd arm64 248.3-1ubuntu8.6

...snipping repetitive similar lines, you get the idea :)...

E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/libnss-systemd_248.3-1ubuntu8.6_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/libsystemd0_248.3-1ubuntu8.6_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80] E: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/systemd-timesyncd_248.3-1ubuntu8.6_arm64.deb 404 Not Found [IP: 2620:2d:4000:1::19 80]

...snipping some more...

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I came across this question which suggests that the packages have moved to old-releases.ubuntu.com or us.archive.ubuntu.com, but neither of those seem to work for me. I also came across this question where the resolution seemed to be a complete wipe and reinstall, which I'd rather avoid.

Here's my current sources.list (stripped of comments):

deb http://ports.ubuntu.com/ubuntu-ports impish main restricted
deb http://ports.ubuntu.com/ubuntu-ports impish-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports impish universe
deb http://ports.ubuntu.com/ubuntu-ports impish-updates universe
deb http://ports.ubuntu.com/ubuntu-ports impish multiverse
deb http://ports.ubuntu.com/ubuntu-ports impish-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports impish-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports impish-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports impish-security universe
deb http://ports.ubuntu.com/ubuntu-ports impish-security multiverse

How should I proceed to update my system? Can I just update the release name in my sources.list like I would in Debian, and do the big upgrade that way? Or is there any way to get the original tools (do-release-upgrade) to work properly?

maples
  • 269
  • 1
    "I don't see any instructions or tips about upgrading from an EOL'd version." Does this answer your question? How to install software or upgrade from an old unsupported release? - EOL means End Of Life. Users are expected to upgrade before EOL. If you wait until after EOL, it may still be possible, but the upgrade is unsupported. Never allow your OS to become EOL. – Nmath Aug 11 '22 at 17:56
  • You must install updates before upgrading to a new release, but the EOL date marks the date where the release will no longer have access to any updates. That's what "support" means. Yes, 22.04 is a LTS release, but 21.10 is not an LTS release. It is an "interim" release which means that it only had 9 months of support. When you got the notification ~4 months ago that the new release was available, you had about 3 months to get that done. Users who choose Interim releases need to be able to promptly release upgrade within 3 months when new versions are available. – Nmath Aug 11 '22 at 18:02
  • @Nmath I came across that question already, but as I described, that did not work for me. This is a headless machine which backs up another server, only accessed via SSH (so no desktop notifications), and just emerged from ~1.5 months in a moving box :) I admit I probably should have looked more into the LTS vs non-LTS versions of Ubuntu before installing 21.10, but I've never heard of an old system becoming "stranded" like this before (at least with Linux distros) - I didn't even know that was something I needed to watch out for. – maples Aug 11 '22 at 18:44
  • I can't think of any OS that uses versioned releases that doesn't have a hard EOL date. Windows does it. Mac does it. RHEL and Debian do it. The support period is also clearly stated on the page where you would have downloaded the OS. You also would have gotten a notification of the new release on SSH login, even though you don't have a DE. Interim releases are desiged for people who want to test and/or want newer software sooner. With a new release every 6 months and so many flavors it's simply unrealistic to expect devs to support that many releases. – Nmath Aug 11 '22 at 19:05
  • Well, either way, I've learned my lesson now to pay better attention to EOL dates and the distinction between LTS and non-LTS versions of Ubuntu :) Any ideas on how to get upgraded out of my EOL state? Obviously there existed an upgrade path from 21.10 to 22.04, I can't imagine that they would completely eliminate that path after spending the time and effort to create it in the first place. – maples Aug 11 '22 at 19:19
  • Adding the old/archives to your sources.list is the only method I know to upgrade from an EOL Interim release but you mentied that didn't work for you. – Nmath Aug 11 '22 at 19:40

2 Answers2

9

I figured out the issue I was having with the old-releases server.

Because I'm using a Raspberry Pi, and on an ARM architecture, my sources.list looks like deb http://ports.ubuntu.com/ubuntu-ports/ impish main restricted. Specifically, notice that the URL ends in ubuntu-ports.

On the old-releases server, they apparently don't use a separate directory for the ports vs the main architectures. By updating my sources.list entries to http://old-releases.ubuntu.com/ubuntu/, I was able to get the latest updates to 21.10.

After I got the sources.list figured out, I was able to apt update and apt upgrade, and at that point do-release-upgrade was able to function and upgrade me to 22.04.

Note: as part of the apt upgrade on my system, a new kernel was installed. I should have rebooted at this point, but did not. I just ran do-release-upgrade immediately after. The release upgrade tried to uninstall the older kernel version (the one which was currently running, which the apt update replaced) but threw up a big warning "You're about to uninstall the kernel you're currently running, are you sure???". In my case I said "no", and just did an apt autoremove after rebooting after the release upgrade was finished. I suspect that if I had rebooted after apt upgrade, I would not have seen this issue.

Note 2: The upgrade tool seems to be smart about your architecture, and re-added the -ports for me when it updated my sources.list automatically.

maples
  • 269
  • 1
    Thank you for answering your own question, I would have never figured this out. (not sure if it's going to work yet,but it seems to be) – geneorama Feb 03 '24 at 21:06
-1

Best way to get your Ubuntu up-to-date should be (as one command, so that one is executed automatically after the last)

sudo apt update && sudo apt full-upgrade && sudo apt autoremove

Hope this helps

Otherwise

sudo apt list --upgradable && sudo apt upgrade

should work too. Not sure if that's exactly what you wanted, bit rusty on my ubuntu cmd's ^^

T4b
  • 1