15
May
2020
22:10

Restoring Ubuntu after an interrupted upgrade

15 May 2020 22:10

Upgraded an old 10 year old PC from Ubuntu 14.04 LTS to 16.04 LTS.
Almost broke the system during the upgrade release.
But everything worked out.

Background

I ran the command to silently update the release "sudo do-release-upgrade -f DistUpgradeViewNonInteractive".
The team worked for a very long time and at some point stopped...

Without hesitation, I pressed Ctrl+C and rebooted.
The computer does not boot (black screen prompting you to enter a username).
Launching a graphical shell from the command line startx naturally it didn't work.

I found it on the Internet at linux.org.ru decision, how to continue installing the new version of Ubuntu 16.04 to replace 14.04 and restore startup after an unsuccessful update attempt. I slightly modified the solution for my case, in which the system is partially functional, the kernel loads until the end, reaching the prompt for entering a username.

Solution

  1. When starting the computer, I selected the menu item grub, which talks about "Recovery Mode"

  2. Selected item "root"

  3. A user prompt with full rights appears:#.

  4. Since there is no Internet, I decided to turn it on to continue the installation process. First I found out the name of the network card:

    ifconfig -a

  5. Enabled the network card:

    dhclient eth0

    где eth0 имя выданное первым в выводе "ifconfig -a".

    Интернет появился.

  6. Continued the process of configuring packages from the place where it hung last time:

    dpkg --configure -a

  7. Updated package cache:

    apt-get update

  8. Continued installing packages from where the interruption occurred:

    dist-upgrade

  9. exit
    10.exit
    11.CTRL+ALT+DEL
    12.I chose the first option - the operating system loaded successfully, including the NVidia video card drivers.

The story can be called complete. But I still need to upgrade to a newer version of the operating system.

Continued

  1. lsb_release -a brought out the old version 16.04.06
  2. launched sudo do-release-upgrade
  3. The command returned the reason:

Not enough free disk space

_The upgrade has aborted. The upgrade needs a total of 3,762 M free

space on disk '/'. Please free at least an additional 2 766 M of disk

space on '/'. Empty your trash and remove temporary packages of

former installations using 'sudo apt-get clean'._

At least now the Ubuntu operating system is restored and working. I'll look for a free place...

P.S. I do not recommend using the -f DistUpgradeViewNonInteractive switch when running do-release-upgrade - messages will be displayed whether to replace the configuration files, but you will not be able to answer them because of this switch.

It is better to launch a distribution version update using the do-release-upgrade command:

sudo do-release-upgrade

P.S. The transition from 16.04 LTS to version 18.04 LTS was successful:

lsb_release -a

LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:core-4.1-ia32:core-4.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

P.P.S. Tried to upgrade to Ubuntu 20

To do this:

sudo gedit /etc/update-manager/release-upgrades

Corrected the line "lts" (stable distribution with a long support cycle) to "normal" (OS release with a short support cycle):

Prompt=normal # lts

I saved the release-upgrades file and ran it for execution.

sudo do-release-upgrade

The version update program wrote that further migration from version 18.04 to Ubuntu 20 for i386 architecture is impossible:

Sorry, no more upgrades for this system

_There will not be any further Ubuntu releases for this system's

'i386' architecture._

Updates for Ubuntu 18.04 will continue until April 2023.

Ubuntu 18.04 LTS will continue to be supported until April 2023.



Related publications