Closed engina closed 3 years ago
To anyone who has suffered data loss in WSL 2 fitting the patterns described here since this was closed, please add your report to #9830 and include as much info as you can collect to reproduce the scenario. Thanks!
Just lost my entire master's thesis. I have no idea what happend. my ext4.vhd file is gone, wsl is gone from windows. I'm completly screwed.
Just lost my entire master's thesis. ... [!]
Horrific. Condolences and hopes for recovery to you, @Vitor-Almeida.
If you can manage it, please reconstruct any environmental details and any "administrative" things that might have gone on on your host PC up to the loss, and post in #9830. Check discussions for any conditions in-common. Thanks!
Got the same problem. Im a bit disappointed with wsl, my project that was not committed to github has been gone. My problem now is how can i explain it to my project manager, 😂😂😂
Failed to attach disk 'C:\Users\lambe\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified. Error code: Wsl/Service/CreateInstance/MountVhd/ERROR_FILE_NOT_FOUND
A similar thing happened to me this morning. For me the problem was that it got mounted to the windows itself making it inaccessible for WSL. I could recover it by these steps: 1) Shut down WSL (wsl --shutdown) 2) Open Disk Management (it may ask you to initialize a disk, do not do that!) 3) Find the attached VHD (for me it was a 256G disk with unallocated space) 4) Right click -> detach 5) Start WSL again
I know that it may not be the problem for everyone, but hopefully it helps someone in the future. Also, I don't get why it got mounted to windows.
Just posting here to say this happens (and has happened) to me too. Was WFH yesterday, shut down everything normally at end of day, this morning at office, booting up and WSL2 only displays 'Installing, this may take a few minutes'. Everything gone. This has happened at least 5-6 times now, with varying intervals. Sometimes it doesn't happen for months, sometimes twice in a week.
At this point I've gotten a list of commands to run to restore functionality, but I lost quite a lot of uncommited stuff, stashed changes, documentation this way. Seriously considering wiping Windows 10 and fully migrating to Ubuntu on my workstation.
Happened for me today, have been using wsl for two month or so. All my files in /home/username is gone.
@holewa, that seems like a different issue if you only lost your $HOME. Most people lose their entire WSL virtual disk device.
happened for me today as well
Just happened to me. I have a handful of files from a random project of mine in my home directory, and then various files at root level are also lost, including my entire /nix
directory.
I was using VS Code connected to my WSL instance, it was crashing when trying to generate a plot, I restarted it, then I just restarted the distro entirely using wsl -t Ubuntu-22.04
and at some point between these operations, I lost everything.
EDIT: after running wsl --shutdown
, my files were restored. But now I am slightly terrified of using WSL.
EDIT: after running
wsl --shutdown
, my files were restored. But now I am slightly terrified of using WSL.
Feel lucky; my files never returned.
I've been following this issue for over a year now. People finding this and reporting they have the same problem is a drumbeat.
If you are fortunate enough to read this thread before losing your files, quit using WSL before it eats yours. Microsoft doesn't care. They close every ticket opened about this problem and never fix or even acknowledge the problem.
This happened to me today. Last night shutdown my PC. This morning turn on PC, launch WSL2, the project I was working on in VSCODE is gone. root project folder and everything. gone.
See our contributing instructions for assistance.
Please fill out the below information:
Your Windows build number: (Type
ver
at a Windows Command Prompt) Microsoft Windows [Version 10.0.18362.657]What you're doing and what's happening: I started Ubuntu as usual. It said installing some stuff, it seem to be frozen. There was no feedback. I closed the window and relaunched the Ubuntu. It gave an error that looks like https://github.com/microsoft/WSL/issues/4444 but a bit different. Then I try to re-run it. And it asked me for a username and password for the new Ubuntu installed. My older ubuntu is gone.
BTW after I killed the launch process, later I noticed bsdtar in process explorer.
What's wrong / what should be happening instead: Ubuntu shouldn't have gone for no apparent reason with all my user files.
Strace of the failing command, if applicable:
For WSL launch issues, please [collect detailed logs] I was not logging during this incident happened. Right now the only problem is that my ~user files are gone and this is a brand new Ubuntu installation, my older one is gone.
What could be the problem? Could this be reversed? (I've checked if there is a backup of the rootfs dir in AppData to restore from there, at least retrieve but unluckily there was none)