Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upgrade from Ubuntu 20.04 to 22.04 #8618

Closed
1 of 2 tasks
aradalvand opened this issue Jul 15, 2022 · 9 comments
Closed
1 of 2 tasks

Cannot upgrade from Ubuntu 20.04 to 22.04 #8618

aradalvand opened this issue Jul 15, 2022 · 9 comments

Comments

@aradalvand
Copy link

aradalvand commented Jul 15, 2022

I couldn't find any relevant information in the docs regarding how to upgrade an Ubuntu WSL instance. Can you point me in the right direction?
There's an Ubuntu 22.04 LTS app on Microsoft Store, where it gets confusing is that the Ubuntu app's description section includes the following statement:

Ubuntu is always the latest LTS version of Ubuntu. When new LTS versions are released, Ubuntu can be upgraded from the command line by using:
sudo do-release-upgrade

But the Ubuntu app is actually 20.04, and not 22.04, which is the latest LTS version.

Another confusing thing is that the 22.04 doesn't even show up when you run wsl --list --online. What is going on here?

Version

Microsoft Windows [Version 10.0.22622.290]

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

Linux version 5.10.102.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220)

Distro Version

Ubuntu 20.04.4 LTS

Other Software

No response

Repro Steps

  • Run wsl --update
  • Run wsl --shutdown
  • Open a new WSL shell
  • Run sudo do-release-upgrade

Expected Behavior

It should upgrade to Ubuntu 22.04 LTS

Actual Behavior

It doesn't, here's the output of sudo do-release-upgrade:

Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.

Diagnostic Logs

No response

@CountParadox
Copy link

I am facing the same behavior here.

@yehorb
Copy link

yehorb commented Jul 18, 2022

Check if you have the latest "Ubuntu" app installed. If you installed your Ubuntu from the Microsoft Store long ago, you might have the older version of the app, called "Ubuntu for Windows". It is 20.04 LTS, and it will not update automatically. If you indeed have "Ubuntu for Windows", and not just "Ubuntu" you can reinstall the app to get updates. At least that's what I did. Back up important files, delete the "Ubuntu for Windows" and install "Ubuntu" from Microsoft Store.

@CountParadox
Copy link

CountParadox commented Jul 20, 2022

I have the one simply titled 'Ubuntu'
image

Its store page says that it should be the latest LTS release
image

yet the aforementioned command results in:
image

@NotTheDr01ds
Copy link

NotTheDr01ds commented Jul 21, 2022

Short answer:

sudo do-release-upgrade -d

But please read to the end to understand why .

Also, if you have the ability to "Close" this issue yourself, I'd encourage you to do so, since this isn't an issue with WSL itself.

I couldn't find any relevant information in the docs regarding how to upgrade an Ubuntu WSL instance. Can you point me in the right direction?

Upgrading a WSL distribution is always going to require a distribution-specific process, so it's really not something that would be appropriate for the WSL docs themselves (other than perhaps a statement to the effect to check the distribution documentation).

Ubuntu is always the latest LTS version of Ubuntu. When new LTS versions are released, Ubuntu can be upgraded from the command line by using:
sudo do-release-upgrade

I agree that's confusing on multiple levels (and currently/temporarily wrong), so let me attempt to explain:

Typically, there are 2 different types of Ubuntu distributions in the Microsoft Store:

  • "Versioned" LTS releases (currently 18.04, 20.04, and 22.04)
  • A single unversioned one named "Ubuntu"

I honestly can't recall if they bumped "Ubuntu" to 20.04 immediately after 20.04 was released, but I doubt it. Even LTS releases are a bit of a "slow roll" by Canonical. They usually wait for the .1 release, such as 22.04.1, currently scheduled for release on August 4th.

So at some point, perhaps August 4th, the unversioned "Ubuntu" in the Store will become 22.04.1.

I will say that the 22.04 release has been a bit more "problematic" than normal because of Canonical's shift to a new installer (out-of-box-experience/OOBE) for WSL. It's generated a few issues. It seems to be improving, but I still prefer the "normal" WSL installer, which you can still run using command-line arguments.

But even when the Ubuntu distro in the Microsoft Store is upgraded, that won't upgrade your existing install. Rather than rehash all that here, let me point you to my explanation on Ask Ubuntu.

Run sudo do-release-upgrade
Checking for a new Ubuntu release
There is no development version of an LTS available.
To upgrade to the latest non-LTS development release
set Prompt=normal in /etc/update-manager/release-upgrades.

Historically, the same "upgrade" policy holds true for LTS releases with do-release-upgrade. It won't work until 22.04.1 is released. See this Ask Ubuntu answer.

In the meantime, if you do want to proceed with an upgrade, realize that the upgrade path is still considered "in development". It can be forced with sudo do-release-upgrade -d.

@felipecrs
Copy link

Just to mention, 22.04.1 is out, and therefore do-release-upgrade should now work without any other flags.

@worthwhileindustries
Copy link

Just to mention, 22.04.1 is out, and therefore do-release-upgrade should now work without any other flags.

I recently did wsl --update after installing 22H2, and that got me to the below versions of wsl2 and then I did exactly the above comment and now none of the GUI apps work.

Default Distribution: Ubuntu
Default Version: 2
WSL version: 0.66.2.0
Kernel version: 5.15.57.1
WSLg version: 1.0.42
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.608

Seems like WSLg is not working or setup properly after the upgrade and intellij is borked

$ google-chrome-stable
[760:760:1006/200821.502514:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY
[760:760:1006/200821.502558:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
$ /opt/jetbrains-toolbox/jetbrains-toolbox.sh
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f1870963cf4, pid=631, tid=631
#
# JRE version: OpenJDK Runtime Environment JBR-17.0.2+8-334.25-nomod (17.0.2+8) (build 17.0.2+8-b334.25)
# Java VM: OpenJDK 64-Bit Server VM JBR-17.0.2+8-334.25-nomod (17.0.2+8-b334.25, mixed mode, tiered, compressed oops, compressed class ptrs, serial gc, linux-amd64)
# Problematic frame:
# C  [libgtk-3.so.0+0x18ccf4]
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/tristan/.local/share/JetBrains/Toolbox/logs/toolbox-error-631.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.

@worthwhileindustries
Copy link

I guess I have "Ubuntu on Windows", the older version https://discourse.ubuntu.com/t/what-exactly-is-the-ubuntu-on-windows-ms-store-app-for/28246 ... probably end up just deleting everything and reinstalling it to see if it wslg starts working again.

@worthwhileindustries
Copy link

I can't give repro steps but, hopefully this can help someone. I removed all traces of any distros in programs and features and restarted machine, and then tried installing the "Ubuntu" app in the app store which installed 22.04.1. I did this repeatedly with different outcomes every time. Sometimes during the install it would fail or it would go into text mode install but, GUI would still not work until finally, it showed a GUI for the install and that's when everything seemed to work as expected. I still cannot get desktop icons working in from windows though. They don't automatically get created and when I try to manually make one it tries to start but fails and then I can't even start a GUI from within the distro. I have to restart everything.

image

Copy link
Contributor

This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants