8

Today I wanted to upgrade from LTS to LTS. I performed

update-manager -d 

and started the upgrade. However, after having downloaded all files and running the installation, the upgrade failed, or at least it failed partially. There is some erroneous behavior regarding graphics and window management. The two screenshots show the behavior, something similar to what we know from Windows...

enter image description here

enter image description here

I had the hope, that an additional

apt-get update
apt-get upgrade

would install remaining (potentially missing) packages, but the list is quite empty

Get:1 http://de.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Hit:2 http://archive.canonical.com/ubuntu xenial InRelease                    
Ign:3 http://archive.canonical.com precise InRelease                                                     
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease              
Hit:5 http://archive.canonical.com precise Release                                  
Hit:7 http://de.archive.ubuntu.com/ubuntu xenial-updates InRelease                  
Hit:8 http://de.archive.ubuntu.com/ubuntu xenial-backports InRelease
Fetched 247 kB in 1s (220 kB/s)                    
Reading package lists... Done
W: http://archive.canonical.com/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)

and everything is installed. I have the impression, that I need to redo, or at least somehow continue the failed upgrade, but I don't know how to. The two approaches I tried didn't yield anything:

sudo apt-get -f dist-upgrade

says, there is nothing to install. And

sudo update-manager -d 

tells me, that I'm up to date.

Any ideas, how I can fix this problem?

After restarting multiple times, I notice that from time to time the applications also look differently, see the following screenshot. enter image description here

5
  • Did you try sudo do-release-upgrade?
    – rsl
    Apr 22, 2016 at 17:17
  • This only gives Checking for a new Ubuntu release; No new release found
    – Thomas
    Apr 22, 2016 at 17:20
  • What I'm wondering is Why do we still have a "precise" reference in there? (I also have it in my one upgraded computer!) May 17, 2016 at 6:09
  • Do you still have release upgrade info? Could you post sudo updatedb; locate apt-clone Also grep -n deb /etc/apt/sources.list /etc/apt/sources.list.d/*.list
    – user.dz
    Jun 23, 2016 at 9:35
  • The output is: sudo updatedb; locate apt-clone /var/log/dist-upgrade/apt-clone_system_state.tar.gz The output of grep is pasted at pastebin.
    – Thomas
    Jun 23, 2016 at 21:32

5 Answers 5

5

This worked for me after a botched sudo do-release-upgrade from 14.04 to 16.04. The updater's automatic attempt to restore to the previous version failed as well but left me at the terminal where I was able to complete the upgrade as follows.

1) Replace the contents of /etc/apt/sources.list with the following

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe 
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main universe 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main universe 
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main universe 
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main universe 
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main universe

Optional) If you are receiving error insserv: Service mountdevsubfs has to be enabled to start service hwclock1, run the command sudo rm /var/lib/dpkg/info/util-linux.postinst

2) sudo apt-get update -- updates package lists

3) sudo apt-get dist-upgrade -- this will take a while, installs all the updated packages

4) sudo apt-get autoremove -- removes unnecessary packages

5) sudo apt-get autoclean -- cleans old packages from repository

6) sudo update-grub -- updates grub boot config

Now if you run sudo do-release-upgrade, you should get the response No new release found. and you can reboot with sudo shutdown -r now. After reboot, you might want to repeat steps 2 to 5 to be sure all updates are installed.

1
  • This worked great for me when I encountered launchpad.net/bugs/798414 during a do-release-upgrade (a full /boot partition), thanks!
    – mrexodia
    Dec 23, 2017 at 17:16
1

From the Official Ubuntu website: 14.04 LTS to LTS upgrades will be enabled with the 16.04.1 LTS point release, in approximately 3 months time.

If in a hurry, do a fresh install ;-)

2
  • 3
    I would prefer fixing my problem over a fresh install
    – Thomas
    Apr 24, 2016 at 15:17
  • You stated you wanted to upgrade from LTS to LTS. That option will only be available after te point release (checked and confirmed myself). Fresh installs are no biggie if you have a separate partition for home.
    – Jan
    Apr 30, 2016 at 6:14
1

I think I fixed the error.

I reinstalled unity and ubuntu-desktop. I also had to enable desktop icons again (Ubuntu Tweak -> Tweaks -> Desktop Icons -> On). Everything looks normal again.

0

My first attempt,I just run sudo do-release-upgrade on 14.04 LTS failed badly, completely blank and dead, no network, no console, no grub menu at boot, nothing. I had to boot from liveUSB and revert to previous btrfs snapshot (well, that is really good idea IMHO, to have a snapshot ready for such case).

Anyway, I suspect that it may be just a problem with my pc, sometimes setting display to sleep that is impossible to wake up. It did happen sometimes on my 14.04, and upgrade may got stuck with some kind of question in the middle of progress, that was impossible to answer. I had to perform cold reboot and that may be reason.

My second attempt went much better. But it went installing 15.10 Willy first, and ended somehow unsure with errors - unmet dependencies. I have avoided the display sleep this time so I had an option to run sudo apt-get install -f to fix that, and then, I have attempted to run sudo do-release upgrade again and this time it took Xenial 16.04 LTS and finished OK. It preserved all user settings, mounts, vnc and so on - just perfect.

There is setting of update-manager whether it should offer version upgrade, and perhaps You have "LTS version only" there (or "never") - it may result in "no new release found" IMHO, since direct 14.04 to 16.04 is not supported yet.. Try to put "for any new version" there and let it upgrade to Willy first.

But I must repeat that using btrfs snapshots (working well on Trusty), or any other but good enough backup, is good idea when trying such upgrade.

-3

Start on recovery mode, and press alt+f1 Write

apt install grub

And finally

Sudo dpkg --configure -a

This will fix any possible upgrading error. It worked for me after a lot of unsuccessfully trying other stuff. Have a nice day!

2
  • 2
    What's this apt command you speak of? Re-installing Grub won't fix graphics issues and configuring pending unconfigured packages only helps if packages related to the issue are installed but not configured (which is not the case as far as we can tell). -1 Jul 31, 2016 at 20:03
  • This worked for me. I think it would have fixed the posters issue. The OP did not need the recovery and grub part, but others might. May 11, 2017 at 5:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .