Upgrading from an unsupported Ubuntu (18.10 to 19.10)

Update (March 2020): I’ve heard from 10+ people who say these instructions work for them, I think it’s reliable. See also this Ask Ubuntu post. Some folks are finding their way to this blog searching for “An upgrade from ‘cosmic’ to ‘eoan’ is not supported with this tool.” That makes sense, it’s the error the upgrade tool gives. Finally, if you see an error about “Upgrades from 18.04 on the i386 architecture are not supported” that is sadly true; 32 bit support stopped in 18.04. I don’t know how to help you with that.

A couple of weeks ago I blogged about being unable to upgrade from Ubuntu 18.10 (cosmic) to 19.10 (eoan), or even 19.04 (disco). Ubuntu 18.10 is fully end of life and deprecated and the do-release-upgrade tool we normally use to upgrade things refused to run. (Note that this tool is bundled in the ubuntu-release-upgrader-core package) Fortunately one of my readers Alejandro saw my post and suggested a solution. I just tried it and it works. Details below.

The underlying problem is do-release-upgrade on 18.10 was trying to upgrade directly from 18.10 → 19.10. But that’s not possible. And it’s no longer possible to upgrade 18.10 → 19.04 because 19.04 is also not supported. So you’re stuck.

The gist of the solution is to hack a config file to force an 18.10 → 19.04 update. It turns out Ubuntu’s do-release-upgrade tool is a generic program, the version installed on an 18.10 system is not 18.10 specific. Instead it downloads metadata files from the Internet and uses those to figure out what to do. Alejandro’s suggestion boils down to intercepting those metadata files after download and hacking them to point to 19.04 instead of 19.10. The packages needed to do the 18.10 → 19.04 upgrade are still online, do-release-upgrade just wasn’t finding them.

Needless to say, the instructions below come with a big warning this may break your system. It worked for me, but no idea if it will work for you.

18.10 → 19.10 steps

  1. zRun do-release-upgrade on the 18.10 system. This will give you an error about being unsupported. But behind the scenes, the tool will download some metadata files we want to modify.
  2. As root, go in to /var/lib/update-manager and copy the file meta-release to a new file meta-release2. This file was downloaded by do-release-upgrade from the Internet and tells the upgrader how to upgrade.
  3. Edit meta-release2. Remove all entries for eoan entirely. Modify the disco entry so it says Supported: 1
    Update April 2020: reader F.K. write to say “I found that ubuntu repo returns 404 and `do-release-upgrade` can’t run update. I changed all link in meta-release2 for disco to  http://old-releases.ubuntu.com/  and its works.” I can’t test this but it seems plausible of Ubuntu finally moved the disco update files out of the live repo (say, in preparation for the 20.04 release.)
  4. Edit the file /usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py. Change this line of code
    self.metarelease_information = open(self.METARELEASE_FILE, "r")
    To read
    self.metarelease_information = open(self.METARELEASE_FILE + "2", "r")
    That will tell the upgrader to use your modified file instead of the original. (It will also avoid any redownloads overwriting your changes.)
  5. Run do-release-upgrade. It should now be doing an upgrade 18.10 → 19.04. Let that run as normal and reboot.
  6. Congratulations! You’re now running 19.04. Remove the /var/lib/update-manager/meta-release2 you made.
  7. Since 19.10 is supported, all you have to do to upgrade 19.04 → 19.10 is run do-release-upgrade again. No hacks necessary, you’re back on the main path.

Like I said, it worked for me. I’m a little surprised Ubuntu doesn’t support this officially out of the box, it seems simple enough. I suspect they just want to have nothing at all to do with older systems. Still if it were me I’d add some flag to enable at-your-own-risk upgrades for people like me who were stuck.

I think I also could have upgraded my system simply by editing /etc/apt/sources files and relying on apt dist-upgrade. That’s the underlying tool that’s doing all the work anyway. But the Ubuntu upgrade scripts have a little extra stuff in them and it’s nice to be able to run it just in case it’s important.

I’m very grateful to Alejandro for his emailing me the suggestion on the fix.

12 thoughts on “Upgrading from an unsupported Ubuntu (18.10 to 19.10)

  1. Thanks for posting this! A lot of people have been having trouble since 19.04 became unsupported and this post is the only source of help at the moment!

  2. Thank god I was upgrading a few days after you did it! ;-)

    I was searching for exactly that situation and didn’t find any help. Your blog post was the only resource I found that helped me to upgrade from 18.10 to the outdated 19.04.

  3. i tried the basic just editing the sources as you thought might work and it didnt. really the only thing that works is your full explanation. its really great. I love when I see how its all glued together like that lol.

  4. Thanks – this saved me after literally a day of googling, head scratching and probably making things worse for myself !

  5. I tried the upgrade from cosmic to eoan as outlined, but ultimately got error messages stating that this was not supported in i386 architecture at this time. Any suggestions?

    1. Sorry to hear it! IIRC Ubuntu dropped support for 32 bit systems (i386) in 19.10 (eoan). I hope you got a nice clean error message and it didn’t break your system!

Comments are closed.