Attempting upgrade from 20.04 to 22.04
Bo Berglund
bo.berglund at gmail.com
Tue Feb 20 14:51:49 UTC 2024
On Mon, 19 Feb 2024 19:47:40 -0500, Jerry Geis <jerry.geis at gmail.com> wrote:
>I have a location trying to update from 20.04 to 22.04
>
I am also in the process of planning an upgrade of an Ubuntu *server* 20.04.6
LTS to 22.04. It is a headless system only accessed via ssh (using PuTTY from my
Win10 PC).
My problem is that this machine started out back in Jan 2018 as an Ubuntu 16.04
LTS server and it has been dist-upgraded first to 18.04 and then to 20.04 and I
am not sure how long this can be pushed on...
It runs a number of critical services:
- Subversion (as a backup server for the main server, synced every 24h)
- OpenVPN connection server for access to the local LAN and route to the net
- Apache webserver serving 3 different domains
- Acts as a file server (NAS style) for a media library
It also has a lot of tasks that are done on a schedule with just a 4 hour no-op
window between 08-12 every morning.
I also have another Ubuntu server running as a VMWare ESX virtual machine, which
started out as 16.04 back in Jan 2018 too.
This server does not have all the other services, it just runs OpenVPN.
So back in October 2023 I did a release upgrade to 22.04.4 LTS of that server
using the command:
# do-release-upgrade
offered on login after doing a full-upgrade / reboot cycle.
When I did this I encountered a few glitches the worst of which wa a loss of
working DNS...
After a lot of work I finally "solved" it by adding a script which will be run
on boot to make sure that the Google DNS servers are always set up to be used:
-----------------
#!/bin/bash
# This is a script for maintaining google DNS servers in /etc/resolv.conf
# It must be executed as sudo in order to write to the file
# This is a kludge because I could not find out how else to fix DNS
DNS8888=$(grep 8.8.8.8 /etc/resolv.conf)
DNS8844=$(grep 8.8.4.4 /etc/resolv.conf)
#echo "88 = $DNS8888"
#echo "44 = $DNS8844"
if [ "$DNS8888" != "nameserver 8.8.8.8" ]; then
echo "adding nameserver 8.8.8.8"
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
else
echo "resolv.conf contains nameserver 8.8.8.8"
fi
if [ "$DNS8844" != "nameserver 8.8.4.4" ]; then
echo "adding nameserver 8.8.4.4"
echo "nameserver 8.8.4.4" >> /etc/resolv.conf
else
echo "resolv.conf contains nameserver 8.8.4.4"
fi
exit 0
------------------
I don't want to encounter this problem on the server I now need to upgrade, so
what should I prepare/do in order for it not to happen?
I suspect that the bottomline cause is that do-release-upgrade from 16.04 to
18.04 done back in 2019 or so which has then propagated onwards...
--
Bo Berglund
Developer in Sweden
More information about the ubuntu-users
mailing list