1

The traditional way to upgrade Ubuntu 18.04 LTS to 20.04 LTS without waiting for the release of Ubuntu 20.04.01 - command do-release-upgrade with the key -d. But this method has been repeatedly criticized in responses and comments on this site (for example, here). Recently, I came across a different method on the Internet:

sed -i 's/bionic/focal/g' /etc/apt/sources.list
apt-get update
apt-get upgrade
apt-get dist-upgrade
reboot

This method, unlike the traditional one, does not have negative reviews (perhaps because it is less well-known). I tried both methods on the VM and both of them led me to get a system similar to Ubuntu 20.04 LTS (at least at first glance):

# uname -rv
5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal

# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

But which one should I choose to upgrade my production server? I understand that the ideal answer is to wait for July 23 (release date of Ubuntu 20.04.01), but what if I need to get the result right now? Which of the two evils described above is the lesser?

Ivan Olshansky
  • 123
  • 1
  • 2
  • 7

1 Answers1

4

Ubuntu is not Debian (despite how many of treat it as if it is; myself included).

Ubuntu tools very much rely on python, more so than Debian. As such there is more critical issues with python packages in Ubuntu than in Debian.

Ubuntu tools ensure upgrades occur in an order that won't create issues, and have been tested for this (such as ensuring python is upgraded at the right time) which the Debian upgrade method (changing sources and then a dist-upgrade) does not. I'm using that as example.

It also has other pitfalls mitigated, eg. if you're using a terminal on a GUI, and screensaver kicks in during the dist-upgrade setup in your question, you may have lost access to your terminal if screensaver had activated due to timeout unless you disabled it before hand (but you knew that of course and wouldn't have been caught out). The update-manager Ubuntu tool does that for you (unless you've heavily modified your environment beyond what it caters for).

If you want the best method to upgrade, refer to the release notes for the release you want to move to, in this case Ubuntu 20.04 LTS or https://wiki.ubuntu.com/FocalFossa/ReleaseNotes

It has a section titled "Upgrading from Ubuntu 18.04 LTS or 19.10" which contains the instructions that were well tested, and any problems encountered by testers have been documented (in the release notes if critical enough, otherwise on bug reports on launchpad but you'll be very unlikely to hit any of these).

FYI: Is the debian method still used, yep. Used it myself about 36 hours after 20.04's release to bump myself to 20.10 on this box; but I only had ~six packages to peruse and look for potential pitfalls, and since most were just text files containing the release name(s) etc I decided in my case it wasn't a problem. If you're capable of doing this evaluation, then by all means use it, but a bump from 18.04 to 20.04 will contain more than my ~six packages, and will contain many critical packages where my upgrade had none.

This answer is general in nature; my chosen examples are just that - examples and incomplete & simplified.

Ubuntu 20.04.1 Release date

Also note the scheduled date Thursday 23-July-2020 date is for the release of the 20.04.1 ISO (for new installs), the taps to allow installed systems to upgrade is unlikely to occur until the following Monday-Tuesday (even Wednesday..) and if issues occur with new installs that tap turn date is likely to pushed back a little longer, so don't lock on expecting it on that date.

guiverc
  • 33,561