PGTS Humble Blog
Thread: Open Source Software
|And if your head explodes with dark forebodings too -- I'll see you on the dark side of the moon!|
Ubuntu 18.04 Upgrade
Chronogical Blog Entries:
Date: Thu, 23 Aug 2018 22:51:07 +1000
Upgrading to Ubuntu 18.04
In my first attempt at upgrading to 18.04, I logged onto a workstation, opened a terminal shell, and ran the "do-release-upgrade" script from the command prompt. There were a number of errors reported, which I did not take note of, because it reported that despite the errors ... The upgrade had been successful.
When I rebooted, however ... Only the user access screens would appear. The machine would not respond to keyboard or mouse input. I was no longer able to start a session on the machine.
I seem to recall making this mistake in the past ... On reflection, I probably should have used the GUI update tool when interacting with the Desktop GUI ... Or used telnet to run the "de-release-script" remotely ... But it was too late for regrets. I set about trying to recover ... The file system was still intact ... But it would have been quite a big task to re-build the OS (last resort).
Fortunately, I was still able to login remotely ... When I did, I saw that the version was still 16.04 (??) ... I tried running apt-get ... It failed and suggested I use the -f option ... Which I did ... And got this error:
dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd'
I found a suggestion online that I should manually over-write the file. So I followed that suggestion and forced the over-write. Then I tried "apt-get -f dist-upgrade" ... But it failed with this error:
Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1)
Next I tried "apt-get -f install"
It completed with the following warnings:
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... W: APT had planned for dpkg to do more than it reported back (1783 vs 1787). Affected packages: ca-certificates:amd64
I tried "apt-get update" ... It returned the following error messages:
AppStream system cache was updated, but problems were found: Metadata files have errors: /var/cache/app-info/xmls/fwupd.xml Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code
I tried "apt-get update" again ... And then aptitude suggested that I run "apt-get autoremove" ... Which I did ... And it got busy removing obsolete packages.
Finally, things began to look ok ... I rebooted the machine, and was rewarded with the 18.04 splash screen ... I breathed a sigh of relief ... It had been a genuine white-knuckle ride!
For the next desktop upgrade I tried connecting to the target workstation with telnet and running the do-release command ... However there were two packages that failed with Hash sum mismatch errors
I've seen the errors before. If the package is very old, it can prove intractable. And the only way to resolve it is to remove the link from your sources list. But for current packages, I have found that the problem often resolves itself after a day or so ... Sol I came back to it the next night. In this case, that was all I needed to do.
When I managed to download all of the packages, the update ran as ok ... For future refence, I must make a note to myself to login remotely whenever I invoke "do-release-upgrade" from the command line.
There was one step that caused me some concern ... The installation of snapd took almost 10 minutes. The following screen was displayed without any feedback:
Checking for installed snaps No snaps are installed yet. Try 'snap install hello-world'. Installing snap gnome-3-26-1604
I logged in with another session and checked the progress and it seemed ok ... So I waited patiently ... Eventually it completed successfully and the desktop look ok after a reboot:
The next machine I tried to update was a server. For this upgrade, I logged in remotely using putty. However the upgrade got stuck on this step:
2018-08-21 20:57:35,075 INFO release-upgrader version '18.04.24' started 2018-08-21 20:57:35,082 INFO locale: 'en_AU' 'UTF-8' 2018-08-21 20:57:35,161 DEBUG screen returned: 'No Sockets found in /var/run/screen/S-root. ' 2018-08-21 20:57:35,162 INFO re-exec inside screen: '['screen', '-e', '\\0\\0', '-c', 'screenrc', '-S', 'ubuntu-release-upgrade-screen-window', '/tmp/ubuntu-release-upgrader-a2igj6xd/bionic', '--mode=server', '--frontend=DistUpgradeViewText']'
I had to recycle the power [hardware reset] to get the system back on-line. When I got back on to the system, it appeared to be broken. Fortunately, APT suggested that I run the command "dpkg --configure -a", in order to fix the problem ... However, after running the command, I was not able to reconnect remotely. I tried recycling the power once again and finally I was able to connect with telnet. I next tried "apt-get autoremove", and APT got busy removing obsolete packages. After rebooting the server, everything looked good.
There was an issue with the DLNA service (miniDLNA), exported media that contained symbolic links, no longer worked. I found error messages in minidlna log similar the following (I've munged the actual link):
[2018/08/22 18:20:36] upnphttp.c:1366: error: Rejecting wide link /minidlna/Movies/A-F/Fubar Movie.mp4 -> /video/movie/M01240.mp4
And a google search revealed the solution ... Namely, adding the followingto minidlna.conf:
Another note to self: Maybe use telnet rather than putty to connect to hosts and run the "do-release-upgrade" script?
Ubuntu 18.04 Desktop First impressions.
The new interface took a little getting used to ... But after a few experiments, I started to warm to it. The trend for Ubuntu seems to be heading in the direction of touch screen and mobile devices ... But there is still enough desktop friendly hooks in the UI.
Applications that I had placed on my desktop all appeared without the icons I had mapped to them ... However when I launched them and "trusted them", the icons re-appeared.
I liked the fact that the file manager remembered my preferences ... So when I changed the view from icon to list, it remembered that the next time it started, unlike the 16.04 file manager.
Once again 18.04 tried to connect to my Google accounts and once again Google blocked them. I decided to just remove my Google Accounts from all desktop apps except Firefox and Chrome. Both these browsers can remember my desktop settings and connect to my email account, calendar, Gdrive etc ... And I am way past the endless configuration of desktops apps to connect with online accounts. Much easier to just use a single portal (i.e. the Browser). Nevertheless even after removing access to my Gmail accounts, the issues persisted. It seems that GNOME-Calendar would not let go of my Gmail accounts. Eventually, I ran the following to remove GNOME-Calendar:
apt-get purge gnome-calendar
On one of the machines (the first one I upgraded), the default movie player (Totem) no longer worked ... The audio stream seemed ok, but the video stream appeared as a strange psychedelic mixture of orange and red. VLC and xine both appeared to work ok. A quick search online revealed that the totem issue had been noticed by other users (known bug?). I also had some difficulty using handbrake on the first machine. And I couldn't view DVDs ... I had to remove, re-install and reconfigure libdvd-pkg.
In addition to this, the dock seemed to be missing from the first machine. However a mini dock would appear when I clicked the Activities link in the top left corner, so in effect the Activities link now behaves like a "launch" button (and indeed if I pressed the "Windows launch" button on the keyboard it had the same effect). On the second machine however, which did have a dock, the auto-hide feature was flakey ... After a bit of experimentation, I turned off dock auto-hide and moved it to the bottom the screen. I might investigate this later.
Also Totem was ok on the second machine ... So it was not a generic bug ... Possibly related the problems I had when I tried to upgrade from the terminal? I tried removing Totem from the machine #1 and re-installing, but it was still broken ... I will wait a little while to see if there is a fix for this ... But if there isn't I can just make VLC the default application for playing video. I'm guessing that something went wrong with the first installation when it tried to update the Xorg components. Most probably caused by the fact that I had used many of those same components to launch the terminal application. If I had connected with telnet and then run the "do-release-upgrade" command, I probably would not have had those issues.
Another thing that I found mildy irritating was the fact that the default display for the clock on the top bar showed only the abbreviated weekday plus the hour and minute. I would have preferred soemthing with a little more information (like the month and day). The clock was missing from the right hand corner and the clock that showed in the middle of the top bar seemed to be associated with the calendar. A little research with Google soon found information about "gsettings". A handy little utility that is already installed as part of the distribution. However despite my best efforts I coud not find the setting that controled the display in the middle of the top bar. It seemed to be the POSIX format '%a %H:%M'. I tried searching all settings with the following script;
for x in $(gsettings list-schemas) ; do for y in $(gsettings list-keys $x) ; do echo $y | grep -iq time || continue echo $x $y $(gsettings get $x $y) done done
But nothing matched the suspect ('%a %H:%M') . Nevertheless the gsettings command is a useful little tool and I will try remember it for future reference.
Eventually I found some information about gnome-tweak-tool and installed it from the APT repository. Using the gnome-tweak-tool, I was able to have the date included in the clock display, by navigating to the settings for the "Top Bar".
Another annoying little feature was that the show desktop shortcut was missing. Furthermore the help about keyboard shortcuts was not very clear. After I while I worked out that in order to get to keyboard shortcuts I had to click Settings and then click devices in order to find the keyboard shortcut mappings. The show desktop feature was called Hide all normal windows. It had been disabled ... I mapped to Super-D(rather than the default which seems to be Control-Super-D). I find it really handy to have a single keyboard shortcut that shows the desktop.
Overall, the upgrade of these two desktops and a server were successful ... However it was not up to the usual standard I have come to expect from Ubuntu upgrades, which in the past have run seamlessly and "automagically" resolved conflicts involving version upgrades and dependencies. This has made me a little complacent. And so possibly this upgrade, more like the fragile upgrades from other (well known) proprietary vendors, was the wake-up call I needed ... It left on edge, contemplating disaster recovery contingencies ... Or more accurately lack of same ... I will approach my next upgrade project with more caution.