Upgrade Ubuntu Server over ssh

I run an Ubunutu server and initially I found it tedious to have to do upgrades by going to the server and manually running the upgrade. I did not want to get too fancy with this process as it was not worth the time. I just log in and set it then come back later and ensure thing are going smoothly and answer any questions that may come up.

I was thinking about doing this via ssh but there is always the possibility that your connection may drop and you can potentially break your server, Ubuntu actually puts up a warning for you in this regard.

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
Do you want to continue?

Continue [yN]

What I did was use a screen session should things disconnect me from my session so that the process can remain running and I can reconnect once I am able to. I have not had an issue as yet (knocks on wood) but you just never know and I prefer to be safe than sorry.

Install screen

sudo apt update && sudo apt install screen

Start a session and accept the license as prompted


If you need to reconnect just run the following command

screen -r

If you have more than one session running find the one you want by running the following command

screen -ls

To connect to one of your running sessions run the following command where 17448 is the screen session id

screen -r 17448

Ensure Update Manager is installed

sudo apt install update-manager-core

Ensure your upgrade config is set to the tree you want to be on


From that file, as you can see, I use lts only:

# Default behavior for the release upgrader.

# Default prompting behavior, valid options:
#  never  - Never check for a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the release that immediately succeeds the currently-running
#           release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that this option should not be
#           used if the currently-running release is not itself an LTS
#           release, since in that case the upgrader won't be able to
#           determine if a newer release is available.

Run a base upgrade

sudo do-release-upgrade

Run a full Upgrade

sudo do-release-upgrade -d

Follow the instructions that appear on screen. You will be asked about keeping files or installing the new version, that will be up to you as only you know your server and what you’ve changed.

Warning : Pay close attention as upgrading a file that has config settings that let your sever do the work you built it for may be overwritten.

Did it work?

Ensure that the upgrade works and that you are on the most recent release as per your upgrader settings.

Run the lsb command:

The lsb_release command provides certain LSB (Linux Standard Base) and distribution-specific information.

lsb_release -a

Here are all the options you can use:

-v, --version
              Show the version of the LSB against which your current installation is compliant.  The version is expressed as a colon separated list of LSB module descriptions.

       -i, --id
              Display the distributor's ID.

       -d, --description
              Display a description of the currently installed distribution.

       -r, --release
              Display the release number of the currently installed distribution.

       -c, --codename
              Display the code name of the currently installed distribution.

       -a, --all
              Display all of the above information.

       -s, --short
              Use the short output format for any information displayed.  This format omits the leading header(s).

       -h, --help
              Show summary of options.

You should see something like this:

Distributor ID: Ubuntu
Description:    Ubuntu 18.04 LTS
Release:        18.04
Codename:       bionic

The Description line would show the sub version number if there are security releases done after the initial release. In those cases you should see something like this which I got from my server prior to the upgrade:

Description:    Ubuntu 16.04.4 LTS

There you go. Did I forget something or do you have something to add to make this article better, leave a comment below.


Linux Lite on older CPUs with PAE

On machines with older Pentium M ™ and Celeron M ™ processors, there is an extra requirement to get Linux installed, I’ve encountered this mainly with Linux Lite as that is the OS of choice I use for older systems.

Important: This only works if your installation is failing with this error kernel requires features not present on the CPU: PAE

Continue reading Linux Lite on older CPUs with PAE

Net Interface not loaded in Debian

I had to build out a Debian server for a project I was working on at home and my internet went down just as I started the build, deciding not to wait until it came back up; I went ahead with the build and finish the configs, upgrades and whatever else would be needed once the interwebs started working again.

The major issue I had was that networking was not able to be configured due to no connection found, that in turn left my software config to use the install media alone. Continue reading Net Interface not loaded in Debian

Systemd Vulnerable to DNS Attacks

Systemd, the Linux world’s favorite init monolith, can be potentially crashed or hijacked by malicious DNS servers. Patches are available to address the security flaw, and should be installed ASAP if you’re affected.
Continue reading Systemd Vulnerable to DNS Attacks

Linux Malware Mines for Cryptocurrency Using Raspberry Pi Devices

A Linux trojan detected under the generic name of Linux.MulDrop.14 is infecting Raspberry Pi devices with the purpose of mining cryptocurrency.

According to Russian antivirus maker Dr.Web, the malware was first spotted online in the second half of May in the form of a script that contains a compressed and encrypted application.

Experts say the initial infection takes place when Raspberry Pi operators leave their devices’ SSH ports open to external connections.

Once a Raspberry Pi device is infected, the malware changes the password for the “pi” account to:


Read the full article here

grub-pc (2.02~beta2-36ubuntu3.10)

I’m running an Ubuntu server and the other day while running updates I started getting the following error:

Setting up grub-pc (2.02~beta2-36ubuntu3.10) ...
/var/lib/dpkg/info/grub-pc.postinst: line 703: syntax error near unexpected token `fi'
dpkg: error processing package grub-pc (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

Opening /var/lib/dpkg/info/grub-pc.postinst I found:

        if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10 then
          if [ -e "/boot/efi/EFI/${bootloader_id}/fbx64.efi" ]; then
            rm -f "/boot/efi/EFI/${bootloader_id}/fbx64.efi";

There was a missing semicolon in the first line and that’s what was breaking my update. I updated it and the error went away:

        if dpkg --compare-versions "$2" lt-nl 2.02~beta2-36ubuntu3.10; then
          if [ -e "/boot/efi/EFI/${bootloader_id}/fbx64.efi" ]; then
            rm -f "/boot/efi/EFI/${bootloader_id}/fbx64.efi";

Installing Linux Kernel v4.10

I started using CentOS over several other Distros that I have been testing ever the years. I still have an Ubuntu laptop just to keep up to date with things seeing that it’s one of the most popular ones.

I’ve covered installing Kernels before but I wanted to refresh that topic and include how to do it on CentOS.

Continue reading Installing Linux Kernel v4.10