Ubuntu on WSL gets corrupted - WslRegisterDistribution failed with error: 0x800700b7
-
Your Windows build number: Microsoft Windows [Version 10.0.17134.137]
-
What you're doing and what's happening:
Sometimes, after a reboot, when I open Ubuntu I receive the error below and the only solution so far is to reinstall it clean or never reboot(ever). Same issue happened on 18.04 and on 16.04 and I had to reinstall, loosing all my config. -
What's wrong / what should be happening instead:
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x800700b7
The distribution installation has become corrupted.
Please select Reset from App Settings or uninstall and reinstall the app.
Error: 0x800700b7 Cannot create a file when that file already exists.
Press any key to continue...
PS: This happened on my PC and on my Laptop, both after a reboot.
https://github.com/Microsoft/WSL/issues/634#issuecomment-230862990
cmda.exe
sc query LxssManager
sc stop LxssManager
sc start LxssManager
and so apparently you have something with the system, check for errors
sfc /scannow
dism /Online /Cleanup-Image /RestoreHealth
Thanks. Restarting LxssManager solved it.
"Windows Resource Protection did not find any integrity violations."
After running wslconfig /unregister Ubuntu-18.04 I received the error that started this thread. Restarting LxssManager service did not resolve it. However, uninstalling the instance did resolve it.
Thank you. I ran into the same thing and restarting the service as you describe fixed it.
I get this error on both Ubuntu and OpenSuse. Restarting LxssManager solves it. But when I restart my Windows problem happens again. Any ideas?
I had a scheduled task to start some services (using a Vbs script) and I think I had checked run as administrator. I guess that was my cause for this. I could be wrong, but check that if you’re running at startup.
Restarting LxssManager solved it for me too
Restarting the Manager does resolve it, but it happens everytime I start the PC again :(
@caal-15: I found this very helpful: https://github.com/Microsoft/WSL/issues/2576#issuecomment-456386629
@kj-joseph Thank you!, that was actually really helpful :)
For those looking how to restart LxssManager, here is an instruction.
In my case, stopping the LxssManager takes ages, and after stopping it, it won't start again. After a full system reboot everything works again though.
Now, what I have found, is that if an application displays an exception while being connected through an in-line command. (i.e. ubuntu1604 <command>) this can sometimes hang the system. My guess is that this command never comes to an end, and as a result there is no way to use that instance anymore. ... until a full system reboot in my case.
I cant restart LxssManager, it's stop and when I try to run it, console print ERROR 1058
I found a better way to deal it, first delete the files, then delete reg, then reinstall. Finaly: its work
I found a better way to deal it, first delete the files, then delete reg, then reinstall. Finaly: its work
Could you be more specific so others can try and replicate your solution?
This can happen if Kasperski is installed.
This can happen if Kasperski is installed.
Did stopping the Kasperski solve it for you @ThrashAbaddon ?
I came here because of this error
error 0x8007010b al iniciar wsl.exe -d Ubuntu-18.04 (C:/mnt/c/)
It seems that they updated some features of the terminal and my home path /mnt/c/Users/Developer/Documents/ no longer works, but making the following change works, and better, because I can access subdirectories that before the home path did not allow me.
(this picture belongs to terminal configuration)
I leave it here in case it helps someone
Fore those of you still in trouble. Download rootfs and import manually could at least work. https://gist.github.com/djfdyuruiry/61e32fb69645bd2618182ee17373d068