-
Notifications
You must be signed in to change notification settings - Fork 822
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 --install Failing on Fresh Windows 11 Install #9453
Comments
The only things modified since OS install are:
I simply followed the steps in this support article: https://learn.microsoft.com/en-us/windows/wsl/install. I am not used to Windows (I usually use macOS/Linux) and simply followed the steps. The guide says "This command will enable the features necessary to run WSL and install the Ubuntu distribution of Linux.". However, do I need to enable "developer mode"? This is not mentioned. |
I have investigated further. There appears to be a bug with syncing the settings between windows settings and the xbox app / wsl install. When I run Toggling the "New apps will save to" setting from C to D and back again fixed this! However, this also changes the setting in the xbox app. These should probably be separate settings. There is also a clear UI synching bug here. Perhaps the user should also be notified that these are linked somehow as that is not clear. Windows Storage SettingsXbox Settings |
Your workaround worked for me as well, thanks! My Xbox settings were set to another drive to save space on my OS drive. |
I confirm !! |
Thanks!
Worked for me too, thanks! |
I'm facing the same issue. I just got a new fresh installation of Windows 11 Pro. I just followed the same steps as @John-P did, and WSL is not working for me. Here are some screenshots: As you can see in the below image, it shows that Ubuntu was installed, but it hangs on Docker Desktop also hangs on this looping I can't even run Also, the LxssManager service is permanently stopped, even if I set the startup type as automatic. Every time I reboot/shut down the system, when Windows starts, the service is stopped. I don't know what is going on if I am doing something wrong, but I've been using macOS/Linux as a DevOps Engineer, and now I give Windows a chance, and I can't use it. FYI, that's not true for Windows 10. I was using it until today seamlessly. WSL working fine, Docker, and Kubernetes also. If there is any log information I could provide, please guide me and I will provide as much information as possible. I will try ultimately reinstalling WSL on my current Windows 11 environment and provide more information if I get progress. |
Quick update here @John-P and for anyone looking for a solution. I did some research over the internet and found this workaround that worked for me: #6405 (comment) Now I am able to install Ubuntu and Debian distros, run Docker Desktop, enable the Kubernetes feature inside of it, etc. |
Same as the original poster; worked with same workaround |
Windows 11 Pro My Ubuntu shell suddenly started giving "file not found" errors. I removed WSL & the needed files to try & start over from scratch. Even Windows Store gives the "you must install to the system drive" when it attempts to pull down the WSL updates. EDIT: I even checked the registry for where app installs are configured. It shows that the C drive is the volume to be used. I know how to get the "Name" value, but don't know where to find the proper "MediaId" value to see if correcting those fixes the issue... Also confirmed that using the XBOX App to default installs to the D drive changes the following Registry value for default install volume. That was being changed to "2" every time I launched the XBOX App. So now I have to have it configured for C (which I don't want) and to prompt for the install location every time. EDIT 2: Added feedback for the XBOX App itself, since this issue has been reported for so long here on github. |
I'm also now having this problem as of earlier this week. |
OS Name Microsoft Windows 11 Pro Had a working Ubuntu WSL environment.
My Settings > Storage all have the default drive to |
This is the exact same thing that is happening for me. |
Did anyone else managed to fix this? It simply stopped working and I can't understand what's going on. I tried everything but formatting the pc. |
OS Name Microsoft Windows 11 Home I might've found a secondary fix to implement alongside switching the default drive. After running
I disabled and then enabled Windows Subsystem for Linux directly from By this point any I tried installing Arch but got an error:
So I then installed the Kernel from the given url: aka.ms/wsl2kernel And Arch is now working properly |
This fixed it for me |
I managed to fix this by running |
Can confirm, changing and reverting the default Windows storage locations fixed the issue. For some reason it didn't work just by changing the location for the new apps though, I had to do this with all of the default locations listed. I also made sure the Xbox App had the same default installation location set as in the Windows storage settings. Only then did the |
Same issue just happened to me after I had to do a System Restore and then reinstalled a game using the Xbox PC App/Windows Store. I set the download location to my secondary large D: drive, which had worked fine before and caused no problems with WSL, but this time I got "Could not access specified file" or something similar if I ran The issue is 100% a problem using the Xbox App to install games to non-system partitions. No idea why it affects WSL, but it is still happening on Win 11 Pro in 2024. |
Just wanted to say that none of the fixes here worked for me. So I had to dig deeper to check what's going on for my specific case. In my situation, I had run On one of the reinstall instances, I opened up and looked inside the Event Viewer logs and it turns out that WSL was trying to install itself to my I disabled that drive in my BIOS and brute-forced the installation to then occur on the More digging in Event Viewer revealed that the Appx Package Manager was trying to find a file called Opened up an admin Powershell, navigated to the default Used Ran I then checked to see if, in the Optional Features of Windows, all of the required dependencies for WSL were enabled. I saw that "Windows Subsystem For Linux" was disabled so I enabled it and restarted my PC. Finally, ran For where to look in Event Viewer to find out the necessary info, follow the "Get Diagnostic Information" section of this doc from Microsoft. It specifies two areas that pertains to AppxPackage troubleshooting. Hopefully this helps someone out there who faces the same niche issue as me. |
This solution worked wonderfully on my machine as i have a very old WSL2 installation. thanks a lot! |
Just wanted to say this worked for me as well when toggling C: and D: drives in storage settings failed. |
Just a note here, Windows Subsystem For Linux from Optional Features should not be enabled for WSL2. As far as I recall, that is only for Legacy use. For WSL2, it was moved to the Microsoft Store so it could be updated independently from the OS. The command "wsl --install" also pulls from the Microsoft Store. I don't know personally if it will "break" anything or give you limited functionality, but it's not supposed to be enabled. |
Hey, guys. it's my way to solve this problem: 1/ 2/ 3/ 4/ 5/ 6/ 7/ 8/ 9/ Docker desktop - WSL drive missing. As it's not difficult to understand docker wants me to run command wsl --unregister docker-desktop-data from terminal. I didn't close error message and opened terminal with administrator previledges and type there wsl --unregister docker-desktop-data 10/ I hope this was useful for you, if this was useful push reaction below. |
almost same. the command the command VersionWindows 11 Build 22631 |
This looks the same as what I'm addressing in other bugs. If you're willing to try the below I'd appreciate it. This is not an official build, if you still see issues when trying this build, please get back to me with more logs from this post, in addition to our logs. #11319 (comment) |
Install from https://github.com/microsoft/WSL/releases. This fixed it for me |
Version
Windows 11 Home Build 22621.963
WSL Version
Kernel Version
No response
Distro Version
No response
Other Software
No response
Repro Steps
wsl --install
Expected Behavior
wsl --install
on a (almost completely) clean Windows 11 install to install WSL2 and Ubuntu.Actual Behavior
Produces an error even though Storage Settings for new content are the system drive (C).
Diagnostic Logs
"The deployment operation was blocked due to a per-package-family policy restricting deployments on a non-system volume. Per policy, this app must be installed to the system drive, but that's not set as the default. In Storage Settings, make the system drive the default location to save new content, then retry the install."
The text was updated successfully, but these errors were encountered: