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

WSL got corrupted #3536

Closed
fenjen opened this issue Sep 11, 2018 · 4 comments
Closed

WSL got corrupted #3536

fenjen opened this issue Sep 11, 2018 · 4 comments

Comments

@fenjen
Copy link

fenjen commented Sep 11, 2018

Problem is solved!

I've been using Debian GNU/Linux with the Windows Subsystem for Linux for a couple of weeks now and it worked very well. It's a blessing for developers.

Yesterday it stopped working. When I try to start bash, the console reads

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 Eine Datei kann nicht erstellt werden, wenn sie bereits vorhanden ist.

Press any key to continue...

I was a bit shocked since I haven't backed up the most recent files. Here are a couple of questions:

  1. What's the reason for the installation has become corrupted?

  2. Is it possible to repair the installation?

  3. If not, can I access files from the filesystem?

  4. I've spent some time researching, how I (1) could create a snapshot of my WSL-Linux or (2) backup the entire installation. What I really had in mind was to simply copy a folder somewhere (»snapshot«) and be able to copy it back. That's most simple and most effective. This simple backup mechanism would help now and it would allow for a second try. Is that possible?


  • Your Windows build number: (Type ver at a Windows Command Prompt)

Microsoft Windows [Version 10.0.17134.165]

  • What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots)

Click on the Debian icon that came with the installation / run bash.exe.

  • What's wrong / what should be happening instead:

Until yesterday I got a bash prompt. Now I get this message I posted above. I'm not aware of anything special happend. The only differing thing is that my Windows was running over the weekend. I also checked the Windows event log, but I found nothing unusual, not even a reboot.

Please tell me which additional information I can provide.

@fenjen
Copy link
Author

fenjen commented Sep 11, 2018

I am sorry, I found the answer here. So only question 4 remains: Is it possible to backup / snapshot my whole installation by copying some folder somewhere?

@therealkenc
Copy link
Collaborator

therealkenc commented Sep 11, 2018

Is it possible to backup / snapshot my whole installation by copying some folder somewhere?

Not in the sense you mean ("by copying some folder somewhere"). Your question is not dissimilar to this MSFT community thread (with short answer "no"). But you can backup your WSL installation (or the bits you care about) with tarjust like on Real Linux ref #2567.

@fenjen
Copy link
Author

fenjen commented Sep 11, 2018

@therealkenc Thanks! The problem here is that I need to setup my system first before I can load a backup or a snapshot. When running on a host system, guest systems should be very easy to backup and restore (like snapshots with ESX or VirtualBox). Do you know what is the reason that this is not possible?

@therealkenc
Copy link
Collaborator

The problem here is that I need to setup my system first

Yes I was going to say explicitly that is the "downside" (but left it as implied). It isn't supposed to be a big downside for dev scenarios, given that bootstrapping Ubuntu from the Store is supposed to be quick and straightforward. Let's call it: The OS bits are backed up in the cloud. The local configuration bits you can tarball. But I am not making excuses, see below.

guest systems should be very easy to backup and restore (like snapshots with ESX or VirtualBox).

They should.

Do you know what is the reason that this is not possible?

The reason? Meh, dunno. Any discourse on that degrades into the sad MSFT community thread I linked pretty fast, so that would be the place to ask the question. From a technical standpoint, WSL has no /dev/sda, so the "normal" way to snapshot the whole disk image doesn't apply. If you want container semantics, and making container snapshots is a common (as opposed to exceptional) scenario for your workflow, then you use a container. It is practically the whole reason Docker exists, and in that case is the right tool for the job.

That said, wslconfig /backup is imminently doable. You can post an ask for that on UserVoice. But note #2567 didn't exactly cause a gate rush. Between "we want CUDA" or "we want nmap" and "we want distro snapshots", distro snapshots probably loses a popularity contest. But stay tuned. WSL improves almost every week, and an optimist could be forgiven for hoping that more container-like semantics are on the way. Bonne chance.

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

2 participants