-
Notifications
You must be signed in to change notification settings - Fork 855
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
WSL Distro missing after updating to windows 11 preview #7136
Comments
What is the output of |
Windows Subsystem for Linux has no installed distributions. I am having the same issue and I have not been able to resolve it. |
Before starting docker the output was as @tunsco2010 says. After starting docker the output is as follows:
So it looks like the docker distro's were also deleted and are recreated when I started docker for desktop. The microsoft store does list Ubuntu as installed but I am hesitant to start Ubuntu through the windows store as I have read in another issue that this might cause a fresh install and thus data loss. Currently the vhdx still exists so I would prefer to avoid that. |
Same issue, I ran ubuntu as from the store and it seems to have wiped itself. wsl.exe -l -v shows both of my installations but both appear to be fresh installations. e; I have absolutely no idea what is going on but after leaving this comment and relaunching ubuntu again with the intention of grabbing all my projects off github again my data is back. I did nothing between the last launch and this most recent launch. |
@therealkenc anything I can do? |
Probably it was deleted. Reinstall the distribution. |
The vhdx is right there still.. |
I am not sure if this is a good idea but this is what I would do as workaround in that situation:
|
@rouke-broersma do you know what Windows build you upgrade from to this version? That would help us determine what could be going on here. As well, could you please collect feedback via Feedback Hub and post the link here? (Your repro steps can just be you starting up WSL). As for an immediate work around, I would recommend copying the vhdx's that you have to somewhere where you can access them and then it is possible to mount them into WSL to copy off any key info. |
@craigloewen-msft thank you, I actually did already check the vhdx and it includes all my files. I am currently trying to reinstall but I get this error:
I also can't delete the existing Ubuntu filesystem because it's locked by System even if I shutdown wsl with I upgraded from the latest Dev channel build available to me but I do not know which version that was. Can I find that anywhere? I submitted the feeback hub item here: https://aka.ms/AAd4j4j |
Filing the feedback hub item will help us check if we can see what build you upgraded from, so thanks for doing that! As for getting you unblocked, I would recommend creating a copy of the VHD somewhere on your file system to make sure your files are safe. Then if you run |
I don't see the distro in wsl and I tried uninstalling from the store page but I couldn't find any way to do that. I'll try to uninstall through programs later, thank you for the suggestion. |
@rouke-broersma thanks for the feedback item. I was able to confirm that your device upgraded from 21390. WSL keeps its distro registrations under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss, but during the upgrade, there was nothing found under this key for your user. So that's at least the cause of this behavior- but, I can't immediately tell why there was no data observed there originally. |
Can I fix that? |
Having the exact same issue here, just to be clear, @craigloewen-msft your official recommendation is to back-up the .vhdx, then to |
@adrastogi based on your hints with the registry keys I recreated the registry items (by guessing) for my distro and it gets recognized by wsl and windows terminal now! It's complaining that the vhdx is in use though. Which is also why I cannot delete or reinstall this distro, as the filesystem is in use by 'System'. I recreated the registry like this: |
Run |
@Biswa96 it was still in use by System even after shutdown of wsl. I said that somewhere above. What I did do was: Mark vhdx as read-only and restart system. On restart unmark as read-only and voila! I am now in my wsl distro! It's a bit broken though... I login straight to root instead of to my configured user and I get this message:
Running dmesg gives me these errors:
I can however switch to my normal user so I think something is not entirely correct in my registry settings. Probably need to set some default user in there.
|
Just to reiterate on this thread, please be careful accessing and modify files in AppData or in the registry. Modifying these files can lead to data loss or putting your WSL into a bad state! I will also reiterate our official guidance here if you find yourself in a state where you still have a VHD in the AppData folder but it isn't being recognized:
This approach minimizes the amount of 'surgery' you have to do here, such as swapping out live VHDs, or changing registry values. |
In case someone has the same issue, I ended-up rolling back to windows 10, and redid the update to 11 some days after, and it worked this time (no WSL issue whatsoever). |
@rouke-broersma and @Hebilicious When did you install the WSL2 before you download and install Windows 11 update, hours or days? |
@licanhua months before |
Thanks to confirm that. |
I also have the same problem.
Here is my feedback: https://aka.ms/AAevw7q It's a brand new laptop, which updated to Windows 11 after activation. It's fresh system, and the only command that I run was
|
I had the same issue on Windows 11. Steps that helped me fix the issue:
|
bash seems to work |
I'm having the same issue in Windows Terminal: I notice that I can get to the instance by running Powershell, then So this seems to be a windows terminal issue. |
Here's what I did to to get rid of this error.
|
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! |
Windows Build Number
Microsoft Windows [Version 10.0.22000.51]
WSL Version
Kernel Version
?
Distro Version
Ubuntu latest (windows store without version number)
Other Software
No response
Repro Steps
Update to windows 11 preview??
Expected Behavior
I expect my wsl to be exactly like I left it
Actual Behavior
No distro's were available.
After starting docker for desktop, docker distro's were available. However the ubuntu distro is still gone.
I can still find the folder and vhdx for Ubuntu in %LocalAppData%
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: