Score:2

do-release-upgrade silently fails upgrading from 18.04 LTS to 20.04 LTS in WSL

ru flag

It's high time I upgrade Ubuntu from 18.04 to 20.04! But I don't get very far before the process aborts without an error message. Is there a log file I can check for further information?

$ uname -a
Linux tribble 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic

$ sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [1554 B]
Get:2 Upgrade tool [1340 kB]
Fetched 1342 kB in 0s (0 B/s)
authenticate 'focal.tar.gz' against 'focal.tar.gz.gpg'
extracting 'focal.tar.gz'

In the created screen:

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit http://archive.ubuntu.com/ubuntu bionic InRelease
Hit http://ppa.launchpad.net/maxmind/ppa/ubuntu bionic InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit https://packagecloud.io/cs50/repo/ubuntu bionic InRelease
Fetched 0 B in 0s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
[LONG PAUSE]

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command terminated with exit status 1 (Thu Aug  5 02:10:50 2021) ===

Apparently, there's /var/log/dist-upgrade/main.log. All it shows is that Quirks.focalPostInitialUpdate "called abort".

2021-08-05 02:08:40,403 INFO Using config files '['./DistUpgrade.cfg.bionic', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2021-08-05 02:08:40,403 INFO uname information: 'Linux tribble 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64'
2021-08-05 02:08:40,852 INFO apt version: '1.6.14'
2021-08-05 02:08:40,853 INFO python version: '3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]'
2021-08-05 02:08:40,859 INFO release-upgrader version '20.04.34' started
2021-08-05 02:08:40,866 INFO locale: 'en_US' 'UTF-8'
2021-08-05 02:08:40,948 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for kernel?
2021-08-05 02:08:40,948 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for initrd?
2021-08-05 02:08:40,968 DEBUG Using 'DistUpgradeViewText' view
2021-08-05 02:08:41,024 DEBUG enable dpkg --force-overwrite
2021-08-05 02:08:41,055 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2021-08-05 02:08:43,346 DEBUG lsb-release: 'bionic'
2021-08-05 02:08:43,346 DEBUG _pythonSymlinkCheck run
2021-08-05 02:08:43,347 DEBUG openCache()
2021-08-05 02:08:43,347 DEBUG quirks: running PreCacheOpen
2021-08-05 02:08:43,347 DEBUG running Quirks.PreCacheOpen
2021-08-05 02:08:44,659 DEBUG /openCache(), new cache size 72360
2021-08-05 02:08:44,660 DEBUG need_server_mode(): can not find a desktop meta package or key deps, running in server mode
2021-08-05 02:08:44,660 DEBUG checkViewDepends()
2021-08-05 02:08:44,662 DEBUG running doUpdate() (showErrors=False)
2021-08-05 02:08:46,643 DEBUG openCache()
2021-08-05 02:08:48,077 DEBUG /openCache(), new cache size 72360
2021-08-05 02:08:48,077 DEBUG doPostInitialUpdate
2021-08-05 02:08:48,077 DEBUG quirks: running focalPostInitialUpdate
2021-08-05 02:08:48,077 DEBUG running Quirks.focalPostInitialUpdate
2021-08-05 02:10:48,996 DEBUG abort called
2021-08-05 02:10:48,998 DEBUG openCache()
2021-08-05 02:10:50,287 DEBUG /openCache(), new cache size 72360

Other files in /var/log/dist-upgrade reveal nothing either.


Additional info:

  • Windows was brought up to date beforehand (in case it was some WSL issue).
  • sudo apt update && sudo apt upgrade did not help.
NotTheDr01ds avatar
vn flag
Doubt this is the problem, but worth checking -- Did you `sudo apt update && sudo apt upgrade` immediately before trying the `do-release-upgrade`?
ru flag
@NotTheDr01ds I did indeed do this.
NotTheDr01ds avatar
vn flag
See if [this one](https://askubuntu.com/questions/1071646/restoring-original-system-state-aborting) helps.
NotTheDr01ds avatar
vn flag
Actually, [this one](https://askubuntu.com/a/1344071/1165986) has a better chance. I've seen that be a problem on WSL1, but since this was WSL2, I didn't think it was the answer. However, that question/answer was just about "regular" (non-WSL) Ubuntu, so it could certainly be what's causing the problem for you as well.
ru flag
@NotTheDr01ds oo, the second mentions a log file! I'll check these out in a bit.
NotTheDr01ds avatar
vn flag
True! I didn't even notice the log file in that linked question (which I know was part of your question as well).
NotTheDr01ds avatar
vn flag
Did you get a chance to try the `sudo apt-get purge snapd` mentioned in that question?
ru flag
@NotTheDr01ds, Not yet. I figured I'd try getting Windows up to date first; this will take a while. A bit busy with other things atm, so it's something that can be done without my attention.
ru flag
@NotTheDr01ds, Removing snapd did the trick. Closed as dup of [this](https://askubuntu.com/q/1344069/602945). Thanks for the help.
Score:5
in flag

I had the same issue. I thought I didn't have snap installed and there are no PPAs as far as I know. Checked out /var/log/dist-upgrade/main.log and there were no errors. Here's the output:

2021-08-05 16:57:53,055 INFO Using config files '['./DistUpgrade.cfg.bionic', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2021-08-05 16:57:53,055 INFO uname information: 'Linux DESKTOP-514S07G 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64'
2021-08-05 16:57:53,586 INFO apt version: '1.6.14'
2021-08-05 16:57:53,587 INFO python version: '3.6.9 (default, Jan 26 2021, 15:33:00)
[GCC 8.4.0]'
2021-08-05 16:57:53,601 INFO release-upgrader version '20.04.34' started
2021-08-05 16:57:53,648 INFO locale: 'en_US' 'UTF-8'
2021-08-05 16:57:53,820 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for kernel?
2021-08-05 16:57:53,820 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for initrd?
2021-08-05 16:57:53,870 DEBUG Using 'DistUpgradeViewText' view
2021-08-05 16:57:53,991 DEBUG enable dpkg --force-overwrite
2021-08-05 16:57:54,198 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2021-08-05 16:57:56,401 DEBUG lsb-release: 'bionic'
2021-08-05 16:57:56,402 DEBUG _pythonSymlinkCheck run
2021-08-05 16:57:56,403 DEBUG openCache()
2021-08-05 16:57:56,403 DEBUG quirks: running PreCacheOpen
2021-08-05 16:57:56,403 DEBUG running Quirks.PreCacheOpen
2021-08-05 16:57:57,597 DEBUG /openCache(), new cache size 72355
2021-08-05 16:57:57,598 DEBUG need_server_mode(): can not find a desktop meta package or key deps, running in server mode
2021-08-05 16:57:57,598 DEBUG checkViewDepends()
2021-08-05 16:57:57,603 DEBUG running doUpdate() (showErrors=False)
2021-08-05 16:58:03,578 DEBUG openCache()
2021-08-05 16:58:04,857 DEBUG /openCache(), new cache size 72355
2021-08-05 16:58:04,857 DEBUG doPostInitialUpdate
2021-08-05 16:58:04,857 DEBUG quirks: running focalPostInitialUpdate
2021-08-05 16:58:04,858 DEBUG running Quirks.focalPostInitialUpdate
2021-08-05 16:58:05,643 DEBUG abort called
2021-08-05 16:58:05,644 DEBUG openCache()
2021-08-05 16:58:06,869 DEBUG /openCache(), new cache size 72355

It turned out I had snapd installed and removing it solved the problem.

NotTheDr01ds avatar
vn flag
Welcome to Ask Ubuntu. I know this is frustrating, but Ask Ubuntu intentionally doesn't allow new users to post comments until they have enough rep. Normally, I'd say "this is more a comment", but I also know that the log wouldn't fit in a comment. But your information does show one big difference between your system and @ikegami's question. Your `uname` line shows that you are using WSL1, where the `uname` for @ikegami shows it is WSL2. While usually that doesn't make a difference, I've seen it be a pretty big factor for Ubuntu upgrades on WSL.
NotTheDr01ds avatar
vn flag
Also, are you sure you don't have snapd installed? AFAIK, it's there by default unless you've removed it.
Adrian Sanabria avatar
in flag
@NotTheDr01ds you nailed it - I did indeed have snapd. Removed it and it's now happily updating, thanks!
in flag
Nailed it snapd removed
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.