Never use non-LTS Ubuntu releases, unless you want no life
Tech or No-Tech, that is the question
There are always jokes/memes about choosing Operating System, such as this one:
I was obsessed with tech when young and literally had no life. Fortunately, I was not that tech savvy to tackle Arch Linux's rolling release. So I chose Ubuntu as my OS and it accompanies me for nearly a decade. Things work smoothly most of the time, but recent upgrade experience hits me hard with endless issue-debugging overnight and I finally understand what the above picture really means.
Tech Debt: Something you eventually have to pay off
Two years ago(2020) when I was trying to debug a weird nvcc/gcc compile problem, I thought it was some gcc version compatibility issue in old OS. The deadline was close, so I decided to upgrade to latest short-termed Ubuntu 20.10.
Since I'm less and less an OS fan, I waited 2 years keeping the system version untouched and until recently decided to upgrade to Ubuntu 22.04 LTS(Long Term Support). But when I expected it to be as smooth as Windows late-night upgrade but got a huge Error sign on screen, I was like WTF? Ubuntu 20.10 is just 1.5 years old and upgrade is already not supported?
I really regret the reckless short-termed upgrade 2 years ago and finally pay the price.
Upgrade OS level-by-level: Just like climbing the career ladder??
So following is the painful upgrade process. I had to repeat it 3 times: 20.10 -> 21.04, 21.04 -> 21.10, and 21.10 -> 22.04:
1. update /etc/apt/sources.list: Ubuntu moves deprecated release sources.list to the old-releases subdomain. Without updating this file, "apt update" will get a bunch of 404 error. A sample config is like:
## EOL upgrade sources.lis # Required deb https://old-releases.ubuntu.com/ubuntu/ CODENAME main restricted universe multiverse deb https://old-releases.ubuntu.com/ubuntu/ CODENAME-updates main restricted universe multiverse deb https://old-releases.ubuntu.com/ubuntu/ CODENAME-security main restricted universe multiverse
2. Try your luck with do-release-upgrade: when I tried this, the tool was "smart" enough to determine my ubuntu20.10 is too old to upgrade to ubuntu22.04. Come on, I know my OS is old(with fewer than 2 years!), but why doesn't the tool just implement a "--force" flag so I can at least try to upgrade it?
sudo apt-get update sudo apt-get dist-upgrade sudo do-release-upgrade
3. Workaround: Use GUI based upgrade tool.
Thanks to Ubuntu team's mercy, they left over a hole for poor old-release guy to use.
You have to manually download the GUI tool and execute it:
# Downloads the upgrader, check the link above for the URL of the file for your releas wget https://archive.ubuntu.com/ubuntu/dists/hirsute-updates/main/dist-upgrader-all/current/focal.tar.gz # Extract it into a new directory mkdir upgrader tar -xaf hirsute.tar.gz -C upgrader cd upgrader # Run the executable, the name changes based on the release ./hirsute
It has to run in Gnome and no ssh/command line is allowed. In addition, I ran into some crazy X11 magic key issue when I had to run the tool with root.
Ubuntu website has some quite old tutorials for reference: https://help.ubuntu.com/community/EOLUpgrades/
Summary
The upgrade basically ruined my Saturday, fortunately Sunday survived??
It is understandable that Ubuntu doesn't have that much engineering resource as Microsoft does. But to be honest this upgrade hassle is mainly caused by not caring about old-release users, not the engineering challenges.
Why brutally throw old release's source repos into another URL directly without even notifying users? Old releases may not be updated but still usable. Look at how long Microsoft supported Windows XP.
Please treat your old users well Ubuntu, they are all firm supporters of open-source community.