Upgrading Ubuntu from 14.04 LTS to 15.04

Asked by Lie Ryan on 2015-11-19

I am changing from an Ubuntu LTS release to a normal release channel.

I followed the prompts by update-manager to upgrade Ubuntu, and during the upgrade, I noticed that a large number of packages fails to upgrade (including systemd, init, but also many others), I then realized that update-manager was trying to upgrade me to 15.04 and upgrading directly from 14.04 to 15.04 wasn't supported. I presume update-manager didn't offer 14.10 upgrade since it's already EOL, but I was expecting that update-manager should not skip 14.10 upgrade even if it is EOL, as it is a required upgrade to change from LTS release to normal release.

apt-get now claims that there are a bunch of unmet dependencies. Trying to fix it with apt-get install -f:

    ...
    Errors were encountered while processing:
     initscripts
     util-linux
     dmsetup
     procps
     udev
     systemd
     libdevmapper1.02.1:amd64
     libcryptsetup4
    E: Sub-process /usr/bin/dpkg returned an error code (1)

 or dpkg --configure -a:

    ...
    Setting up initscripts (2.88dsf-53.2ubuntu12) ...
    insserv: warning: script 'S85vpnagentd_init' missing LSB tags and overrides
    insserv: warning: script 'vpnagentd_init' missing LSB tags and overrides
    insserv: There is a loop between service rc.local and procps if started
    insserv: loop involving service procps at depth 2
    insserv: loop involving service udev at depth 1
    insserv: There is a loop at service rc.local if started
    insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
    ... a bunch of these ...
    insserv: Starting vpnagentd_init depends on rc.local and therefore on system facility `$all' which can not be true!
    insserv: warning: script 'S85vpnagentd_init' missing LSB tags and overrides
    insserv: warning: script 'vpnagentd_init' missing LSB tags and overrides
    insserv: There is a loop between service grub-common and procps if started
    insserv: loop involving service procps at depth 2
    insserv: loop involving service udev at depth 1
    insserv: There is a loop at service grub-common if started
    ... many others ...
    insserv: exiting now without changing boot order!
    update-rc.d: error: insserv rejected the script header
    dpkg: error processing package initscripts (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of util-linux:
     util-linux depends on initscripts; however:
      Package initscripts is not configured yet.
    ... more ...
    dpkg: too many errors, stopping
    Processing triggers for libc-bin (2.21-0ubuntu4) ...
    Errors were encountered while processing:
     binfmt-support
     kmod
     ... about 50 package names ...
     virtualbox-dkms
     gnome
    Processing was halted because there were too many errors.

neither fixes the issue.

Is there a way to back out the upgrade or am I doomed to do a clean reinstall?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Solved by:
Lie Ryan
Solved:
2015-12-28
Last query:
2015-12-28
Last reply:
2015-11-19
Lie Ryan (lie-1296) said : #1

I use btrfs as my root filesystem system and I discovered that apt automatically creates a btrfs snapshot of the system before doing the release upgrade. This is the recovery method I used:

1. Boot from a Linux LiveCD (any version) or do an ISO Boot (https://help.ubuntu.com/community/Grub2/ISOBoot)
2. Create a btrfs snapshot from the automatically created snapshot (so we have a backup if the restore fails), let's call this @restored_root
3. Setup a chroot to @restored_root snapshot, bind mount /dev, mount all drives, copy resolv.conf
4. (inside chroot) Change /etc/apt/sources.list to point to http://old-releases.ubuntu.com and change the version name to utopic
5. (inside chroot) apt-get update && apt-get dist-upgrade
6. Set the system to boot from the new snapshot (move the original root snapshot @ to @original_root, and move @restored_root to @)
7. If the upgrade went well, delete the old snapshot to release the disk space

I'm currently still in the middle of #5; I will update if things went well.

I suggest you wait until April next year then you can upgrade directly to Xenial. To upgrade to 15.04 you will need to upgrade to Utopic first (Ubuntu 14.10) then to Vivid (Ubuntu 15.04).

Lie Ryan (lie-1296) said : #3

The process above went well. Recovering from btrfs snapshot does work, and I was able to upgrade from old-releases.ubuntu.com.

 I had then immediately upgraded to vivid and then to wily.