Report on System Crash related to Failed OS Update - Ubuntu 20.04

Hello! I’m not sure if this is the correct place for this, for I think it’s proper for support if others encounter the same problem, but I solved it before I got to post the problem here.


This is a report on a recent system crash I had in the process of trying to update the system (not upgrade, but just update). I will try to describe the journey the best I can remember, in case anyone else gets into the same problem.
For context, I have been using Ubuntu since 2015, starting with the 14.04 version.


System:

  • Device: Lenovo B570
  • OS: Ubuntu 20.04 LTS , 64 bits
  • Processor: Intel® Pentium(R) CPU B950 @ 2.10GHz × 2
  • GPU: Mesa Intel® HD Graphics 2000 (SNB GT1)

Disaster Journey:

It all started with the :no_entry: warning icon flashing back again. I went to Synaptic, selected “Repair Broken Packages”, and it dissapeared. Didn’t gave importance as usual. Then the Software Updater informed that there were new updates available, I proceeded to update, and for the first time ever in 10 years I received a warning from the Updater: “Error. Check your Internet Connection” (the internet was and remained perfectly fine all along, and with good speed). Then I tried to update from terminal, and saw the same error listed among the packages that failed: “Cannot fetch package”. I made some other vane attempts (I don’t remember what), then decided to pay attention to the error log and realized of the following: the packages that were failing had changed their repositories to an “esm” direction, which was inaccessible for it corresponds to the Ubuntu Pro subscription. My conclusion at that moment was that, since I was using the 20.04 version and its EOL was already due, some packages shortly after reconfigured to be updatable only via ESM. After investigating on the problem for hours along days, I found not even a clue on the possible solution. So I went to Synaptics back again, selected the list of “ready to be upgraded” packages, and they were all marked with a “!” warning sign. I reviewed them, it was like 30 packages, saw nothing to risky (I don’t remember at all what it was), and decided to uninstall them and reinstall them, in the same command, which is what the UI from synaptics indicated that it’s what was going to happen. Enter. First sign that something had gone terribly wrong is that I started to see in the log a lot of completely unrelated software being uninstalled. Firefox was being uninstalled, third party apps were being uninstalled, the entire universe got uninstalled. As it was supposedly an “uninstall and reinstall operation”, after it finished, I rebooted the system, and then days of horror and agony started. First thing the system was not to boot. After the “Lenovo” splash screen, there was only a black screen. After hours, I found by sheer chance a shortcut that gave me a first step forward:

Ctrl-Alt-F1

That brought up what I then learned was the “Emergency Mode” command prompt. I logged in, and the first output kept mentioning that “The esm mode was activated” and that there were 30 packages ready for update (the same I thought I had uninstalled, so trying to uninstall them uninstalled everything except those packages, which is odd). “sudo apt update” kept reporting the repositories were inaccessible, and “sudo apt upgrade” kept reporting the “failed to fetch” error. I executed “apt-get check”, which failed and reported broken packages, and immediately after I executed one of the first things that seemed to help a bit:

sudo dpkg-reconfigure libdvd-pkg

Errors kept undeterred, and I think, for I sadly can not remember (it was stressing all along) that I somehow managed to disable the suggested updates from the “esm” repositories, and then rebooted. If I’m not mistaken, it was after that that I finally got a first spark of light: after logging back again in the emergency log, I was greeted by the announcement that version 22.04 was available and that I could proceed to upgrade. So I did, in the hopes that that would correct some issues. All the process went without issues, fortunately, and after the reboot, the log that appeared prior to the emergency prompt stopped showing package errors and now it was only showing “failed to mount” errors. After much investigation, I tried my luck entering the GRUB prompt, and I was greeted by a yet again emergency prompt from the GRUB itself. After much futile attempts, this savior sent by god himself allowed me for the first time ever to correct all of those errors, and in the next reboot for the first time the log after the Lenovo splash screen showed [OK] checks. Still back to the emergency prompt. The first clue from that same video, which was also shown in the loading log, was that an error was occurring regarding wrongly configured UUIDs, and that tutorial suggested I could correct that by editing the fstab file. I was clueless on how to do it for I could not access any UI, and after reading the file via the command prompt I was even more clueless for everything seemed to be correct. Hapless, I tried to spend the last bullet: try to get the system to reconfigure by upgrading to the last upgrade available, 24.04. I did so with such a luck, that it failed, and the error log asked me to install usrmerge . So I did,

sudo apt install usrmerge

and rebooted, with the hopes of being able to start the upgrade in the next attempt. Instead, lo and behold, my laptop rebooted back into the beautiful 22.04 desktop in all its brightness and glory. Minus the uninstalled apps, but that was a minimal side effect.
I made sure to make some health and settings checks, and all was perfectly fine, like if nothing had happened. One odd thing I found in this check was that the Xenial repositories were marked to be fetched by the updater, and that was the source of some errors still occurring when running “sudo apt update”. So I deselected that and the error disappeared, and finally “sudo apt update” executed without incidents.

So, there you go. That was a hell of a journey, so I wanted to share it in case someone else runs in the same misfortune, because I saw this series of problems reported nowhere else.

1 Like

Welcome to Ubuntu Discourse :slight_smile:

Thanks for sharing your experiences with the community.

Please mark your post as the solution to help others who may encounter this issue.

1 Like

Hello! Can I mark the OP as the solution? I don’t see the option as in the comments.

I think you can only mark a reply as the solution not the original post.

Hope that helps.

1 Like

Solved as described in the OP.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.