Panic moments: Ubuntu wouldn’t boot properly after upgrade to Xenial


Xenial being released for quite some time now, I decided on a sunny Friday afternoon to do the big jump from Trusty to the latest greatest release. Used to the command line, I launch the "do-release-upgrade" command. 1500+ MB of packets to be downloaded, thousands to be upgraded, some new to be installed and about a hundred to be removed. Hit Enter and let him go…

Two hours later and a couple of questions like "Which /etc/default/rcS do you want to have?", the installation completed, time for a reboot. And then, misery starts… The logon screen would not come. Screen starts to flicker, intermittently showing dozens of "orphaned inodes" from a filesystem check. What the Hell !

Hitting Ctrl-Alt-F2 I get to a command line. Great! All is not lost… But then, running "sudo apt-get -f install", I get a "relocation error" with mention of a libstdc++ library. Aouch! dpkg is still alive but anything depending on apt is dead in the water.

Searching the web, I found a page on askubuntu.com that made a lot of sense to me. This would be a relic of a previous installation of GCC 5 from ppa:ubuntu-toolchain-r/test. And indeed, I did that because I used GCC 5.3 these days, instead of the 4.8 that came with Trusty.

However, the recipe given there did not work as smoothly as described.

Trying to run ppa-purge, it said "command not found". Installing through apt was obviously not possible so I had to find the package on packages.ubuntu.com, download it using wget and then install it with "dpkg -i".

But that wasn't enough because the first thing ppa-purge does is call apt-get !

Another comment on the askubuntu.com page mentionned that the libstdc++ library had to be installed. So I downloaded and installed that library from packages.ubuntu.com. And since my system is running both 64b and 32b applications, I needed to install it for both amd64 and i386.

After that step, apt-get is back to life. Yes! Trying ppa-purge didn't do anything yet. The upgrade to xenial had disabled all thirdparty source lists so it did not find anything to purge. Re-enable the ubuntu-toolchain-r-test.list in /etc/apt/source.list.d/, run apt-get update to re-fetch the package list and try again ppa-purge. And this time, it removes some stuff, installs some new stuff.

Reboot and get a working system !

Notes:

1) Nothing of that kind is expected if ubuntu-toolchain-r/test is not used. Next time, I upgrade, I'll for sure purge the toolchain ppa if I install it again.

2) As complicated as it sounds, Linux, at least, gives us the possibility to fix what the automated procedure failed to do. Not all operating systems would make this possible…

 

Share

,

Les commentaires sont fermés.