Upgrading to Ubuntu 18.04

I really like Ubuntu and I use it in different flavours on most of my computers at home. I tend to stick to the LTS and upgrade when the xx.04.1 version is out (in other words, when it prompts me to do so).

I know a fresh installation is usually the best but I also like to just do the upgrade and so far it worked perfectly for me. Except in one case.

I am going to put here my fix, hope it can help others.

from 16.04 to 18.04

The upgrade worked without any problem on all my machines except this one laptop. The laptop was previously upgraded from a 14 LTS and this could be the reason.

To prepare for upgrade I first ran

apt-get update && apt-get upgrade

Waited until it finished and successfully updated the 16.04 LTS, I didn’t need to run a dist-upgrade as there wasn’t any package held back.

I started the release upgrade from the terminal and everything seemed to go well until it failed:

# do-release-upgrade 
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B] 
Get:2 Upgrade tool [1,258 kB] 
Fetched 1,258 kB in 0s (0 B/s) 
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' 
extracting 'bionic.tar.gz'
(...)
Upgrading
Inhibiting until Ctrl+C is pressed...
Fetched 0 B in 0s (0 B/s)
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 228417 files and directories currently installed.)
Removing systemd-shim (9-1bzr4ubuntu1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with
different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed
dpkg: error processing package systemd-shim (--remove):
installed systemd-shim package post-removal script subprocess returned error exit status 2
Errors were encountered while processing:
systemd-shim
(...)
Upgrade complete

The upgrade has completed but there were errors during the upgrade
process.

To continue please press [ENTER

Popped into a console and tried to fix it manually and force remove systemd-shim but it didn’t work. After a quick search I was able to resolve the problem renaming the file and forcing the pending installation to be completed

# mv /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service{,bak}

# apt-get -f install

That worked but just to stay on the safe side I then ran my usual upgrade routine which consists of:

apt-get update && apt-get upgrade
apt-get dist-upgrade
apt-get autoremove && apt-get clean

Followed by another do-release-upgrade which happily showed that there was nothing else left. A quick reboot and we should be good, right? Wrong.

where is the dock?

The system booted and I was greeted by the new beautiful log in screen. Enter the password and… where is the dock?

Pressing the “windows” key I was able to see the default gnome dock and all my applications as Favourites, but the new shiny Ubuntu dock was nowhere to be found.

Even opening the settings showed a completely empty ‘dock’ section.

I tried installing gnome-tweaks but still no joy. In the end I figured out that something (an extension probably) was missing and a quick apt-cache search confirmed my suspicion.

# apt-get install gnome-shell-extension-appindicator \
gnome-shell-extension-ubuntu-dock \
gnome-shell-extension-system-monitor \
gnome-shell-extension-top-icons-plus \
gnome-shell-extensions

After installing a few extensions I had the dock back and the configuration showing in the Settings. Not sure if all of these are needed, probably the ubuntu-dock alone would do.

I am on TPTM podcast

Yes, I am on Talk Python To Me podcast Episode #174: Coming into Python from another Industry (part 2).

Now I have a very good excuse to brush up my github and start adding all the stuff I have been working on.