Updating from Ubuntu 16 to 18

I had some problems when updating from U16 to U18 (Bionic Beaver). Here I share those problems and the solutions. In tty1 terminal I called the following commands:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
$ sudo do-release-upgrade
Initially the update failed because my computer could not locate a release file for one of the repositories. This was the repository I added manually to the /etc/apt/sources.list file many months ago when I installed R. To solve that problem I commented out that repository in the sources.list file. I was then able to proceed, updating and upgrading, downloading the U18 files and installing them.



I have a dual boot Linux and Windows setup and have edited the file /etc/default/grub by commenting out GRUB_HIDDEN_TIMEOUT=0. This meant that during the U18 installation I was asked whether I wanted to merge these edits with the new grub file. I chose "no" and accepted the new grub file.



I then removed packages and was asked to restart the computer. This is when the problems started. On reboot, I went into Ubuntu (rather than Windows) but it did not go to the normal Ubuntu log-in screen. Instead the computer looped through three or four different screens, two black screens, and one which had a list of text with "[OK]" written in the far left column. The first time it did this I thought there was an error so I switched off the computer and turned it on again. The same looping occurred on reboot and the last line of text on one of the screens read:
Started GNOME display manager... p link was shut down....
I partially resolved this by following the steps in this link. It was tricky to follow the steps. I could move to a tty terminal using Ctrl+Alt+F7 and Alt+F2 but the screen-switching continued. I had to be very quick at logging in and running the commands while the screen was on the terminal. Ultimately I switched my display manager from gdm3 to lightdm and restarted. This was met with some success. On restarting, the screens no longer switched and looped. I could now see the U18 log-in screen.



I attempted to log-in, the screen went black and the log-in screen reappeared. I could not advance into the GUI. I could use the ttys but not the GUI. The problem was that the nvidia driver on my computer was not compatible with my graphics card. This solution is described in this link. The code nvidia-current showed that my current nvidia driver was version 340. Compatible drivers $ sudo apt-cache search nvidia-[0-9]+$ did not include 340. However 367 was included so I ran:
$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ sudo apt install nvidia-367
$ sudo reboot



True success! I was then able to log-in to the GUI as before and access Ubuntu 18.04.





Alastair Clarke
31 August, 2019