An upgrade from 'hirsute' to 'jammy' is not supported with this tool [closed]
Asked Answered
S

4

9

i was upgrading ubuntu 21.04 hirsute to 22.04 by following this tutorial ,in step 6 it's failing it's throwing an following error please help me to fix this issue

Reading cache

Checking package manager

Can not upgrade 

An upgrade from 'hirsute' to 'jammy' is not supported with this tool.
https://linuxconfig.org/how-to-upgrade-ubuntu-to-22-04-lts-jammy-jellyfish
Solfeggio answered 19/7, 2022 at 9:33 Comment(0)
M
18

UPDATE: thanks to smknstd, JoeCool, MDarrinT and PurplProto.

Script is working again.

You can chose 3 different methods:

# First method, upgrade to 22.04 with the official ubuntu method ( old-releases.ubuntu.com )
# Replace sources.list   
text="deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ hirsute-security main restricted universe multiverse"
sudo echo "$text" | sudo tee /etc/apt/sources.list
# Prerequisites
sudo apt-get update
sudo apt-get install update-manager-core update-manager -y
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y 
# Download and run the ubuntu upgrade tool
wget http://archive.ubuntu.com/ubuntu/dists/jammy-updates/main/dist-upgrader-all/current/jammy.tar.gz
tar -xaf jammy.tar.gz 
sudo ./jammy --frontend=DistUpgradeViewText

-------------------------------++++++++++++++++++++++++--------------------------------

# Second method, upgrade to 22.04 replacing the entire sources.list with the jammy repos
# Replace sources.list   
text="deb http://archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jammy main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main universe restricted multiverse
deb-src http://security.ubuntu.com/ubuntu jammy-security main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse
deb-src http://archive.ubuntu.com/ubuntu/ jammy-updates main universe restricted multiverse"
sudo echo "$text" | sudo tee /etc/apt/sources.list
# Bypass "An upgrade from 'xxx' to 'xxx' is not supported with this tool" error
sudo sed -i 's/continue/pass/g' /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py
# Start upgrade
sudo apt-get update
sudo do-release-upgrade
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get install -f -y
sudo apt-get autoremove --purge -y
       
-------------------------------++++++++++++++++++++++++--------------------------------

# Third method, upgrade to 22.04 replacing the current distro codename with jammy into the sources.list with sed
# Replace sources.list  
sudo sed -i 's/hirsute/jammy/g' /etc/apt/sources.list
# Bypass "An upgrade from 'xxx' to 'xxx' is not supported with this tool" error
sudo sed -i 's/continue/pass/g' /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py
# Start upgrade
sudo apt-get update
sudo do-release-upgrade
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get install -f -y
sudo apt-get autoremove --purge -y
       

LInk to the complete github script here.

Mihe answered 20/7, 2022 at 10:35 Comment(8)
This just upgrades you from 21.04 to 21.10… do you have to do this and then run it again to update from 21.10 to 22.04?Rossanarosse
yes two times, tested yesterday on a vm. 21.04 to 21.10 and then 21.10 to 22.04Mihe
it worked for me, but before I had to edit the source list to point to the "old releases" endpoint: sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.listLanceted
I getting WARNING:root:file 'impish.tar.gz.gpg' missing How i have to workaround that?Odontoid
Try the new scriptMihe
I used the script above, but it does not helpOdontoid
If you used the "sed -i.bak -r 's/(archive|security).ubuntu.com/old-releases.ubuntu.com/g'" command you will be unable to use that script. Use the second one instead github.com/daboynb/linux_scripts/blob/main/….Mihe
Thank you, script worked! 21.10 today to 22.04Joesphjoete
H
8

Well, I tried the approach above. It failed.

Going through the script, I decided to check the Ubuntu server for the packages. Strange, there are all these NotFound errors. Guess what? The apt files referenced were missing from the Ubuntu server.

Then I went in and changed all the hirsute labels to jammy in the /etc/apt/sources.list file. Once I did that, apt ran. I could then run the script indicated above and have it find the packages.

Now, it works. A couple of messages about php-fpm not being enabled under Apache HTTP, but since I run nginx, I hope it works.

And it worked. I had to run through the apt upgrade && apt update && apt dist-upgrade && apt autoremove to clean out the detritus, but I have a working install on LTS.

Higdon answered 24/7, 2022 at 2:55 Comment(1)
You can use sed to make updating the sources list easier: sed -i 's/hirsute/jammy/g' /etc/apt/sources.list.Scuff
B
2

Before running the script, I had to modify my sources.list (/etc/apt/sources.list) and comment-out all lines leaving only these:

## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse

Then it went first to 'impish' and then to 'jammy' by running the script twice.

Or you can sudo do-release-upgrade after the first script; from 'impish' to 'jammy'.

Thank you and voted-up your answer.

Bedim answered 24/7, 2022 at 22:37 Comment(1)
@Scuff I'm not so to linux yet, but hope I will use sed next time.Bedim
F
-1

official (unsupported) upgrade path from EOL is described here:

https://help.ubuntu.com/community/EOLUpgrades

and requires pointing apt to old-releases.ubuntu.com mirror

Ferdinana answered 24/7, 2022 at 8:0 Comment(1)
An upgrade from 'hirsute' to 'jammy' is not supported with this tool. And "impish" version goes to 404Bedim

© 2022 - 2024 — McMap. All rights reserved.