Upgrade Ubuntu 18.04.04 LTS to 20.04 LTS



Upgrading from Ubuntu 18.04 LTS

By executing the sudo do-release-upgrade command we can upgrade Ubuntu 18.04.4 LTS to it’s latest released LTS version. If you're doing this too soon, it will tell you that there is No new release found. In that case, and at your own risk, add the -d flag at the end of the command to force the upgrade. [Please read below notes before taking any forced action]

 In case you receive the No new release found message you have four options to achieve desired upgradation:

a.       The first and recommended approach is to simply wait. Direct upgrades from Ubuntu 18.04 LTS to Ubuntu 20.04 Focal Fossa LTS will most likely be unavailable until late July 2020.

b.      Force direct upgrade by using the -d switch. In this case sudo do-release-upgrade -d will force upgrade from Ubuntu 20.04 LTS to Ubuntu 20.04 LTS. In case you receive an "Upgrades to the development release are only available from the latest supported release." message, make sure that release upgrader default behavior is set to ltswithin /etc/update-manager/release-upgrades.

c.       Upgrade to 19.10 first by changing the default behavior of the release upgrader to normalwithin the /etc/update-manager/release-upgrades file. When ready, execute the sudo do-release-upgrade command again. Once your system is upgraded to Ubuntu 19.10 then follow the Ubuntu 19.10 to Ubuntu 20.04 upgrade procedure while keeping the release upgrader behavior set to normal.

d.      Use the Debian way described below to upgrade your Ubuntu 18.04 system.



Please wait until the Upgradation is available through the normal way [Option: a]



We are following option (b) for our purpose.

Step: 01

Login to the server and check it’s current version.

#lsb_release -a




Step: 02

Update all packages.

#apt update




Step: 04

#sudo apt install update-manager-core





#sudo do-release-upgrade -d





Select [y] for yes to continue the process.





Press Enter.
Important Note: Please read all messages carefully.





Read the message and press [y] to continue.




During the up-gradation process, we will be prompted for permission to restart services during package upgrades without asking.

Press <Yes>




Prompt will come to install lxd. Select version 4.0 and press <Ok>





Select “Install the package maintainer’s version” for openssh-server and press <Ok>





Remove obsolete packages?
Press Continue [y]




System upgrade is complete. Restart required
To finish the upgrade, a restart is required.

Press Continue [y]




After the reboot, we can see the server has been upgraded from 18.04.4 LTS to 20.04 LTS release.
Let’s verify further.


Congratulation the up-gradation is done.








Alternative upgradation way: [Option (d)]

If you've selected the traditional Debian path, you're going to need to change the /etc/apt/sources.list file and replace the name of your previous release with bionic. So, if you're on 18.04, replace every instance of bionic with focal. If you currently have 19.10, replace eoan with focal.

This process can be automated by using the following sed command:
$ sudo sed -i 's/bionic/focal/g' /etc/apt/sources.list                                
OR
$ sudo sed -i 's/eoan/focal/g' /etc/apt/sources.list
Then, look in /etc/apt/sources.list.d/. Change any files in there the same way.

Now, you can run the Ubuntu dist upgrade. First, update the Apt sources. Then, run the Ubuntu upgrade.

#sudo apt update
#sudo apt -y dist-upgrade

The upgrade should take a bit of time. Chances are, every package on the system will be upgraded. When the Ubuntu upgrade does finish, reboot the system. When the system comes back up, you'll be running Ubuntu 20.04 LTS Focal Fossa!

Now proceed as per below screenshots. [As shown earlier]



























Remarks: Upgradation process is completed but we can see that our system is still at 18.04.4 LTS version. It’s time to reboot he system to see the effect.

Now we can see that our system has successfully upgrade to Ubuntu 20.04 LTS version.











Thank you for your patience

Comments

Popular posts from this blog

Disabling Zimbra's AntiSpam, Amavis and AntiVirus filtering

Cambium cnPilot E400/E410/E500 Configuration Tutorial

Error "Unable to retrive Zimbra GPG key for package validation"