WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Ubuntu on WSL gets corrupted - WslRegisterDistribution failed with error: 0x800700b7

Open icex opened this issue 8 years ago • 23 comments

  • 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...

icex avatar Jul 04 '18 21:07 icex

PS: This happened on my PC and on my Laptop, both after a reboot.

icex avatar Jul 04 '18 21:07 icex

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

MVoz avatar Jul 05 '18 10:07 MVoz

Thanks. Restarting LxssManager solved it.

"Windows Resource Protection did not find any integrity violations."

icex avatar Jul 05 '18 10:07 icex

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.

nick-walt avatar Jul 23 '18 04:07 nick-walt

Thank you. I ran into the same thing and restarting the service as you describe fixed it.

KenLast avatar Sep 16 '18 18:09 KenLast

I get this error on both Ubuntu and OpenSuse. Restarting LxssManager solves it. But when I restart my Windows problem happens again. Any ideas?

saidfagan avatar Nov 03 '18 06:11 saidfagan

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.

icex avatar Nov 03 '18 07:11 icex

Restarting LxssManager solved it for me too

NicholasIoanJones avatar Dec 05 '18 14:12 NicholasIoanJones

Restarting the Manager does resolve it, but it happens everytime I start the PC again :(

caal-15 avatar Dec 17 '18 23:12 caal-15

@caal-15: I found this very helpful: https://github.com/Microsoft/WSL/issues/2576#issuecomment-456386629

kj-joseph avatar Jan 29 '19 19:01 kj-joseph

@kj-joseph Thank you!, that was actually really helpful :)

caal-15 avatar Jan 30 '19 22:01 caal-15

For those looking how to restart LxssManager, here is an instruction.

epogrebnyak avatar May 26 '19 08:05 epogrebnyak

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.

objt-ba avatar Aug 23 '19 12:08 objt-ba

I cant restart LxssManager, it's stop and when I try to run it, console print ERROR 1058

jrdx0 avatar Sep 06 '19 23:09 jrdx0

I found a better way to deal it, first delete the files, then delete reg, then reinstall. Finaly: its work

vseal001 avatar Feb 25 '20 09:02 vseal001

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?

CiaranWelsh avatar Mar 19 '20 18:03 CiaranWelsh

This can happen if Kasperski is installed.

ThrashAbaddon avatar Mar 22 '20 21:03 ThrashAbaddon

This can happen if Kasperski is installed.

Did stopping the Kasperski solve it for you @ThrashAbaddon ?

vjkaran avatar Apr 12 '20 21:04 vjkaran

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. image (this picture belongs to terminal configuration)

I leave it here in case it helps someone

juanccamachob94 avatar May 30 '21 11:05 juanccamachob94

Fore those of you still in trouble. Download rootfs and import manually could at least work. https://gist.github.com/djfdyuruiry/61e32fb69645bd2618182ee17373d068

LiLejia avatar Nov 15 '21 10:11 LiLejia