Upgraded to 16.04, cannot boot. Damaged package maybe.

Asked by DLPaktor

I have a serious problem and I hope someone can help me.

I went to upgrade my Ubuntu 14.04 to 16.04.

It seemed to go smoothly up to the point where it needs to restart.

On the restart, it left a single line of text on a black screen, the last message from fsck , which reads:
  /dev/sda5: clean, 2091595/29884416 files, 34448916/119532800 blocks

I am able to get to the Recovery Mode. I ran the "DPKG Repair Broken Packages" option.
At the end, it showed an "Import Error" with a lengthy symbol name and a file name. I could not copy-and-paste this text, so I took a photo of the screen, and saved it in a DropBox, here:
 https://www.dropbox.com/s/w4nezy4m055s70s/DPKG_Repair_Final_Screen.jpg?dl=0
I presume this is the root cause of the failure.

I am also able to get to a Command Prompt, and have the root password, but I don't know what command to use, (I presume it's a variant of apt-get) and particularly, I don't which package I need and from where.

A little more information, if it might help:

I took a video of the process of running Recovery Mode. After DPKG, I tried "Resume Normal Booting". Most of the items showed a green OK, but the video captured a single FAILED item: Thermal Daemon Service. What the ????? How does that prevent the whole system from starting?

I took a screenshot of the frame that shows it, here:
 https://www.dropbox.com/s/zj2jl4ajedencdz/Failed_Item_In_Resume_Normal_Booting.png?dl=0

Before entering the Recovery Mode menu, there was an error-ish message on the screen, of which I also took a screenshot, here:
 https://www.dropbox.com/s/q66oz8newdhicje/Error-ish_Message_Before_Recovery_Menu.png?dl=0

The overall video is here:
 https://www.dropbox.com/s/nbj5qkytwh634ik/Recovery_Mode_Video.mp4?dl=0

The entire folder can be accessed here:
 https://www.dropbox.com/sh/ttil88slwlaqs01/AABf__zC5C_xYVhFW2TxccFAa?dl=0

Please, any advice?

What command will recover the missing item from the damaged package?

Or: Might there be a way to re-do the upgrade from the Command Prompt?

Finally (in case you're wondering how I'm managing to do this), I first did a test upgrade to a scratch disk on my computer, never expecting that I would end up having to be running off of it. I am able to access my main drive (as a data-object, but not to use it as the O/S nor to access all my apps, saved settings, etc.), so I'm not completely dead-in-the-water, but then, this suggests another question:

Is there a way to do an Ubuntu upgrade on a different drive from the one that's being run? A cross-update, as it were...?

Thanks in advance.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
DLPaktor
Solved:
Last query:
Last reply:
Revision history for this message
DLPaktor (cppege430dtvg7d94rok5-david-9ei9nyjpwdexk1if796so) said :
#1

I came across some advice to use the commands:

 apt-get install apt-file
 apt-file update
 apt-file find libstdc++.so.6
 apt-get install libstdc++6

I tried them from the Recovery Mode -> Drop To Root Shell Prompt shell.

I got an error message remarkably similar to the one in the DPKG_Repair_Final_Screen picture. When I tried to capture it, I found out that:

 THE &0##7334# FILE SYSTEM IS MOUNTED READ-ONLY

which means that, even if I could find the package, it won't be able to be installed!

I mounted my scratch-disk and captured the message. It was:

apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-pkg.so.5.0: symbol _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareERKS4_, version GLIBCXX_3.4.21 not defined in file libstdc++.so.6 with link time reference

The message at the end of DPKG Repair starts "ImportError" and afterwards is the same.

I don't know what to do.

Can I run off the scratch disk and install the package on the main drive (which at that point is merely a data-object)?
And if so, how?

Or is there any other suggestion?

Revision history for this message
Manfred Hampl (m-hampl) said :
#2

1. When you boot in the "recovery - root command prompt" mode, then root file system is mounted read-only. You can switch to read-write with the command

mount -o rw,remount /

see e.g. http://www.psychocats.net/ubuntu/resetpassword

2. You can use chroot to boot one system for modifying another one.
There is a good description at http://askubuntu.com/a/166010

Revision history for this message
DLPaktor (cppege430dtvg7d94rok5-david-9ei9nyjpwdexk1if796so) said :
#3

Manfred, thank you. This is good information in general and I believe I will want to keep it handy for other occasions.

As it happens, I stumbled upon a specific another in another way:

Having captured the exact message, I pasted it into Google ... and found this:

 http://askubuntu.com/questions/777803/apt-relocation-error-version-glibcxx-3-4-21-not-defined-in-file-libstdc-so-6

which pointed me at:

 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22

So I looked in my (mounted as a data-object) main drive's usr/lib/x86_64-linux-gnu/ (note the absence of a slash; it's preceded by /media/...etcetera...) and found that libstdc++.so.6 was sym-linked to libstdc++.so.6.0.22

I then looked in my (running system) scratch drive's /usr/lib/x86_64-linux-gnu and found that libstdc++.so.6 was sym-linked to libstdc++.so.6.0.21

I copied version 21 over to my main drive and changed the link, and this time, when I restarted ...

IT ALL CAME UP!!!!!

And here I had been thinking the problem was something unique to me.

Thank everyone for discussing this and providing advice and clues!

I'm so glad to be back on the air... ;-)