My Experiences with Databases & More

Oracle-MySQL-SQL SERVER-Python-Azure-AWS-Oracle Cloud-GCP etc

  • Enter your email address to follow this blog and receive notifications of new posts by email.

  • Total Views

    • 558,488 hits
  • $riram $anka


    The experiences, Test cases, views, and opinions etc expressed in this website are my own and does not reflect the views or opinions of my employer. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content.Product and company names mentioned in this website may be the trademarks of their respective owners.

Ubuntu (Focal Fossa) OS Upgrade V18.04.6 LTS – V20.04.5 LTS

Posted by Sriram Sanka on November 1, 2022


Ubuntu is a Linux distribution based on Debian and composed mostly of free and open-source software. Ubuntu is officially released in three editions: Desktop, Server, and Core for Internet of things devices and robots. All the editions can run on the computer alone, or in a virtual machine.

You can download OS VM Images from either https://www.linuxvmimages.com/ Or https://www.osboxes.org/virtualbox-images/

Ubuntu Can be Upgraded to the Latest using 3 simple steps.

  1. Update – get all the Package Updates.
  2. Upgrade – Package Upgrades to the Latest.
  3. do-release-upgrade – do-release-upgrade handles checking for a new release, updating sources. list , and a range of other tasks, and is the officially recommended upgrade path for server upgrades which must be performed over a remote connection.

You can see if the Latest is available when you login

Microsoft Windows [Version 10.0.19044.2130]
(c) Microsoft Corporation. All rights reserved.

C:\Users\Dell>ssh root@192.168.29.159
root@192.168.29.159's password:
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-84-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

264 updates can be applied immediately.
244 of these updates are standard security updates.
To see these additional updates run: apt list --upgradable

New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Your Hardware Enablement Stack (HWE) is supported until April 2023.

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

root@osboxes:~#

Lets run as Suggested “do-release-upgrade

root@osboxes:~# do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
root@osboxes:~# apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://repo.mysql.com/apt/ubuntu bionic InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [83.3 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [2,786 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [1,558 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [297 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [302 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [55.3 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [60.9 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:14 http://us.archive.ubuntu.com/ubuntu bionic-backports/main amd64 DEP-11 Metadata [8,112 B]
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [10.1 kB]
Fetched 5,344 kB in 1min 38s (54.6 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.

Run apt list –upgradable and restart OS to apply the Changes

root@osboxes:~# apt list --upgradable
Listing... Done
linux-generic-hwe-18.04/bionic-updates,bionic-security 5.4.0.131.147~18.04.108 amd64 [upgradable from: 5.4.0.84.94~18.04.75]
linux-headers-generic-hwe-18.04/bionic-updates,bionic-security 5.4.0.131.147~18.04.108 amd64 [upgradable from: 5.4.0.84.94~18.04.75]
linux-image-generic-hwe-18.04/bionic-updates,bionic-security 5.4.0.131.147~18.04.108 amd64 [upgradable from: 5.4.0.84.94~18.04.75]
root@osboxes:~# apt upgrade
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
root@osboxes:~# init 6
Connection to 192.168.29.159 closed by remote host.
Connection to 192.168.29.159 closed.

C:\Users\Dell>ssh root@192.168.29.159
root@192.168.29.159's password:
Welcome to Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-131-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 updates can be applied immediately.

New release '20.04.5 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

Your Hardware Enablement Stack (HWE) is supported until April 2023.
Last login: Mon Oct 31 10:42:15 2022 from 192.168.29.35
root@osboxes:~# do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1,554 B]
Get:2 Upgrade tool [1,337 kB]
Fetched 1,339 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN] y

Starting additional sshd

To make recovery in case of failure easier, an additional sshd will
be started on port '1022'. If anything goes wrong with the running
ssh you can still connect to the additional one.
If you run a firewall, you may need to temporarily open this port. As
this is potentially dangerous it's not done automatically. You can
open the port with e.g.:
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT'

To continue please press [ENTER]

Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit http://us.archive.ubuntu.com/ubuntu bionic InRelease
Hit http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Checking for installed snaps

Calculating snap size requirements

Updating repository information

Third party sources disabled

Some third party entries in your sources.list were disabled. You can
re-enable them after the upgrade with the 'software-properties' tool
or your package manager.

To continue please press [ENTER]

Selecting previously unselected package libcommon-sense-perl.
(Reading database ... 225251 files and directories currently installed.)
Preparing to unpack .../libcommon-sense-perl_3.74-2build6_amd64.deb ...
Unpacking libcommon-sense-perl (3.74-2build6) ...
Selecting previously unselected package libtypes-serialiser-perl.
Preparing to unpack .../libtypes-serialiser-perl_1.0-1_all.deb ...
Unpacking libtypes-serialiser-perl (1.0-1) ...
Selecting previously unselected package libjson-xs-perl.
Preparing to unpack .../libjson-xs-perl_4.020-1build1_amd64.deb ...
Unpacking libjson-xs-perl (4.020-1build1) ...
Setting up libcommon-sense-perl (3.74-2build6) ...
Setting up libtypes-serialiser-perl (1.0-1) ...
Setting up libjson-xs-perl (4.020-1build1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for cups (2.3.1-9ubuntu1.2) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.4) ...
Processing triggers for libc-bin (2.31-0ubuntu9.9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required.
If you select 'y' the system will be restarted.

Continue [yN] y
Connection to 192.168.29.159 closed by remote host.
Connection to 192.168.29.159 closed.


Successfully Upgraded to the Latest.

C:\Users\Dell>ssh root@192.168.29.159
root@192.168.29.159's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-131-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

0 updates can be applied immediately.

Last login: Mon Oct 31 12:05:59 2022 from 192.168.29.35
root@osboxes:~# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.5 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.5 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
root@osboxes:~#
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: