Skip to content

Unable to upgrade Ubuntu 18 LTS to Ubuntu 20

0

Hi all,

I was trying to upgrade our Ubuntu 18 to Ubuntu 20. I followed the steps, but when I execute the command sudo apt install update-manager-core, it says its already in its newest version (1:18.04...) something. I tried to proceed sudo do-release-upgrade but it ended up saying, "a problem occurred during the update. this is usually some sort of network problem, please check your network connection and retry." Im not sure why im getting such error, i can access the internet though, so i assume I dont have issue with network.

Im NOT SURE also if during the sudo apt update && sudo apt upgrade -y command if it downloaded the Ubuntu 20 installer. Is there any some kind of pre-requisite for the account to enabling successfully OS upgrade?

Can anyone help with me on this? thank you!

3 Answers
0

When upgrading Ubuntu from 18.04 LTS to 20.04 LTS, the error you're encountering is fairly common and can be caused by several factors.

First, let's clarify the process: The sudo apt update && sudo apt upgrade -y command doesn't download the Ubuntu 20 installer - it simply updates your current packages to their latest versions within Ubuntu 18. The actual upgrade to Ubuntu 20 happens during the do-release-upgrade process.

For the network error you're experiencing during do-release-upgrade, here are some troubleshooting steps:

  1. Check if your system can reach the Ubuntu update servers. Sometimes there might be temporary connectivity issues or the update servers might be under heavy load.

  2. Try changing your update server. You can do this by editing /etc/apt/sources.list and changing the mirror URL.

  3. Make sure you have enough disk space for the upgrade. Run df -h to check available space.

  4. Try using the -d flag with the upgrade command: sudo do-release-upgrade -d. This might help if the release isn't being detected properly.

  5. Ensure all your current packages are in a consistent state by running:

sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
  1. Before attempting the upgrade again, take a snapshot or backup of your instance. This is crucial for EC2 or Lightsail instances as it allows you to recover if something goes wrong during the upgrade.

There are no special account prerequisites for performing an OS upgrade, but you do need to have sufficient permissions (sudo access) and ensure your system is properly prepared for the upgrade.

If you continue to experience issues, you might consider an alternative approach: create a new Ubuntu 20.04 instance and migrate your data and configurations to it.
Sources
Unable to access EC2 after upgrade from Ubuntu 18 to 20 | AWS re:Post
upgrade ubuntu version on lightsail | AWS re:Post

answered 16 days ago
  • thank you! will keep you posted.

0

thank you! will keep you posted.

answered 16 days ago
0

ok, i found out that our disk space is too small so i upgraded it enough to download the 20.x LTS version.

recap of the context: Upgrade our Ubuntu 18.04.6 LTS LTS to Ubuntu 20.x LTS.

i followed the steps on upgrading and get this issue now.

root@<ip address>:~# sudo do-release-upgrade -d Checking for a new Ubuntu release There is no development version of an LTS available. To upgrade to the latest non-LTS develoment release set Prompt=normal in /etc/update-manager/release-upgrades.

I set the prompt to "normal", and then execute the command again.

root@<ip address>:~# sudo do-release-upgrade -d Checking for a new Ubuntu release Upgrades to the development release are only available from the latest supported release.

root@<ip address>:~# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.6 LTS Release: 18.04 Codename: bionic

How to resolve this?

answered 14 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.