7

I faced during sudo do-release-upgrade this situation:

Reading cache
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Hit http://security.ubuntu.com/ubuntu groovy-security InRelease
Hit http://archive.ubuntu.com/ubuntu groovy InRelease
Hit http://archive.ubuntu.com/ubuntu groovy-updates InRelease
Hit http://archive.ubuntu.com/ubuntu groovy-backports InRelease
Fetched 0 B in 6s (0 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done

Restoring original system state

Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command detached from window (Wed Jul 14 08:30:31 2021) ===
=== Command terminated with exit status 1 (Wed Jul 14 08:30:41 2021) ===

and hold in terminal, no further action.

How to fix it and conduct full upgrade?

2 Answers 2

10

TL;DR: apt purge snapd

I also have a WSL1 system. Using do-release-upgrade to go from ubuntu 20.10 to 21.04 failed in the same way. I ran across this reddit post which pointed me in the right direction. Apparently, WSL doesn't like to upgrade snapd for some reason. I don't use snapd, so I just deleted it.

After removing snapd, I still saw the lspci failure, but it updated almost everything okay. There was one package which failed: usrmerge, which failed exactly like this askubuntu question: Both /lib/udev/hwdb.bin and /usr/lib/udev/hwdb.bin exist. The solution is to delete one of them. I deleted the older one.

2
  • 1
    Beat me to it - I opened up Reddit this morning and that was the first post staring me in the face! Since the OP mentioned in the comments on my answer that this is a corporate laptop, we may not see a response until Monday. But I'm hopeful that this will resolve the issues. Jul 24, 2021 at 13:39
  • This worked for me as well with WSL2 upgrading from focal
    – Erich
    Jan 23, 2022 at 21:03
1

It sounds like you are using WSL1, since lspci is failing somewhere during the upgrade. /proc support is a lot more limited under WSL1 than it is under WSL2.

If that's the case, try converting the instance to WSL2 before running the do-release-upgrade.

  • First, confirm the distribution name, if you don't know it already, with wsl -l -v.
  • Make sure the instance isn't running via wsl --terminate <distroname>. Confirm that it is stopped after a few minutes with wsl -l -v again.
  • Back up the instance using wsl --export <distroname> <filename.tar>
  • Change the WSL version of the instance with wsl --set-version <distroname> 2

Try your sudo do-release-upgrade again there. You can always change the version back to WSL1 after that completes.

Remember, unlike the LTS releases, 21.04 is not necessarily tested by Canonical with WSL (and even less of a chance that they've tested WSL1). So keep a backup of the 20.04 to go back to just in case.

18
  • I have status: wsl --set-version Ubuntu 2 Conversion in progress, this may take a few minutes... For information on key differences with WSL 2 please visit aka.ms/wsl2 The request is not supported. Winver reports build 1909 so according to my knowledge WSL2 should be supported Jul 16, 2021 at 8:07
  • Ah, yes, but only if you've installed WSL2. Sorry, I made an assumption there. Have you installed it per those steps? Jul 16, 2021 at 8:47
  • I've instralled patch for kernel (don't know how to confirm success, also verify build and revision number. Naext in this step: C:\WINDOWS\system32>wsl --set-default-version 2 For information on key differences with WSL 2 please visit aka.ms/wsl2 I suspect that this step is not successful Jul 19, 2021 at 12:08
  • That's the normal message. Now, assuming that you've already backed up, try converting your existing instance from v1 to v2 with wsl --set-version <distroname> 2 Jul 19, 2021 at 12:31
  • C:\WINDOWS\system32>wsl --set-version Ubuntu 2 Conversion in progress, this may take a few minutes... For information on key differences with WSL 2 please visit aka.ms/wsl2 The request is not supported. Jul 19, 2021 at 12:51

You must log in to answer this question.

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