Linux Ubuntu Distribution Upgrade

Reading Time: 4 minutes

In this section we are going to talk about updating Ubuntu.

Scenerio: You logon on and see the following.

This is Ubuntu telling you in one of it’s many ways that there are updates.

One of the ways to update your Ubuntu distribution is through the use of the distribution upgrade command.

sudo apt-get dist-upgrade

There are a number of items you should take stock of.
1) Update manager
2) Boot space

Managing the boot space is a special area by itself so it will be covered at the end or a separate post. It may be necessary to verify you have enough space on the “/boot” partition before you start the upgrade process.

Upgrade Manager: It may be necessary to upgrade we may need to change a machine from LTS support to normal. In the next image we will show what the “normal” setting looks like.

Once this is in place. You MAY need to get the dist-upgrade package. You may need do a apt-get upgrade followed by a dist-upgrade.

Boot Space: One of the things you might need to do is “manually” trim some of the packages so that the “/boot” space is manageable again. If not we may need to “carefully” remove some files. So that an “upgrade” containing either headers or something else may have room to install.

Also you may want to do a directory listing and copy that information out in case you accidentally do something stupid. Remember you won’t do the stupid thing on purpose but that will be little consolation later when it happens. It is possible to do something stupid like “rm -rf vm *” and remove all of your kernels etc (note space between vm and *). It’s at this point you need to hope that you don’t accidentally reboot and that perhaps that you have a backup (ha!) or a similar other box that you can copy from.

In this example you will note that the “/root” is not a separate partition.

In many instances your box may have been created with a seperate /root partition.

I expect I will cover a similar post on recovery and repairing Linux in a separate post. Knowing how to do this is a particularly useful skill set. The current version of the VMware vCenter Converter Standalone Build 8466193 (2017-12-14) won’t know how to fully convert a modern Ubuntu machine. But… it may do just enough of the heavy lifting (Create the VM; Assign the resources; copy the data) that you can boot with recovery tools, re-install grub and reboot so that you have a functioning machine again. (Or we can backup and recover. Choices, Choices…)

WARNING!!!! In the section below we are going to talk about how to upgrade from an unsupported version of Ubuntu. The information below this block should be read thoroughly and reflected on before YOU make any choices.

In the below scenario the year is 2022+ and you have found (unfortunately) that you have a very old, very unsupported version of Groovy. This will require you to step through the upgrade process in an unusual manner. In essence you will need to point your repositories to a new set of sources that are designed old-releases. Then upgrade to Hirsuit.

When you know you are in trouble: (every thing is no longer Groovy)

Checking package manager

Can not upgrade

An upgrade from 'groovy' to 'impish' is not supported with this tool.

If you are doing this in 2022… you are in for some work. Let’s say you check first.

root@apache:/etc/update-manager# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.10
Release:        20.10
Codename:       groovy

Don’t panic quite yet. This will take a bit of editing though. Make a backup up your current APT source.list

cd /etc/apt
cp sources.list sources.list.bak

The facts are simple. By most every standard you are behind the 8-ball. The update from Groovy in 2022+ will need to be a multi-staged operation. For the retro-upgrade in place task you would first replace the “sources.list” file with the following.

deb groovy main restricted universe multiverse 
deb groovy-updates main restricted universe multiverse 
deb groovy-security main restricted universe multiverse

Now you can update using the update command

apt update

And then you can upgrade via. ( please make sure using the -y choice is right for you before using it )

apt upgrade -y

From here the work around is pull down the “hirsuite” upgrade package and execute it. This understandably will take a period of time.

mkdir upgrader
tar -xaf hirsute.tar.gz -C upgrader
cd upgrader
sudo ./hirsute

After the installation you can reboot and update as usual.

sudo apt update && sudo apt upgrade
sudo do-release-upgrade

Now that you are at “hirsuite” you probably should consider if you need to execute any remaining updates – like to impish (21.10)


This entry was posted in Linux, Ubuntu. Bookmark the permalink.