-
Notifications
You must be signed in to change notification settings - Fork 855
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
Failed to attach disk 'LocalState\ext4.vhdx' to WSL2: The system cannot find the file specified. #10032
Comments
Hello, I'm new to this computer stuff but I had this issue too. Couldn't find anything except a short 2min YT video. Basically you need to re-install and run your Unix installation through Powershell first. Steps: This will run kali-linux in the Powershell terminal. You can just close the Powershell terminal then run the app from the store. Not sure how or why it works but it worked for me. Hope this helps you and whoever encounters this! |
|
I can confirm, a simple reinstallation via Microsoft Store does not work, but wsl unregister and then install does. |
Agreed. Same issue. This is the way. |
it worked for me, thanks alot |
On point! Thanks! |
It does also for kali |
Can confirm the unregister and install works. Saved my backside today. |
This is it 👍 |
This fixed it. Thank you |
i have it loading, its saying installing ubuntu, im worried. |
|
worked! |
worked. thx |
I have the same problem how to solve? |
I achieved after uninstalling ubuntu from the microsoft store and installing again |
in pws: wsl --install kali-linux |
It's kind of obvious that loosing all your work would fix it guys. |
If your vhdx file is missing, it might be that your data is already gone -- as that file has been deleted which is the storage volume for the Ubuntu operating system. Uninstalling and reinstalling just reinstates that fresh volume. |
Facing this problem too, when trying to install wsl |
Works (as of 11/09/2023): |
TL;DR: Go to "Turn windows features on and off" -> uncheck windows subsystem for linux -> restart -> do it again and check the windows subsystem for linux box and after restarting again you are good to go.I had the same issue as OP, I tried moving my I also tried other solutions which didn't work: Signing out of my user, restarting, closing other processes. Hope this helps. |
I've run into the same problem. Tried using Recuva to see if I could restore the file with no luck. I wonder if this data loss is related to behaviours associated with these directories. From the UWP docs;
Possibly related issues;
I know on Android if the certificate used to sign an app changes, data-loss occurs. I believe the same applies to UWP/sandboxed apps on Windows. So in my case if the certificate for Ubuntu 22.04 changed with an app update, that may have wiped the data (possibly in a manner that leaves just enough behind that errors are raised rather than a new install being started). Looking at the last modified date in MS Store, I can see "Ubuntu 22.04.2 LTS" was modified on 2023-09-03, which is between my last usage and discovery of this issue. Currently installed version is Assuming the issue was caused by
Output is slightly different to what OP posted, so here it what I got (to aid future searches).
|
i had to adapt the unix command so it was 'wsl unregister kali-linux' the ran the 2nd linux command and it worked perfectly thanx! |
I've also had a similar problem, and trying @daniel-rodriguez-azumo's solution didn't work for me. In my case, wsl error after updating the user directory what should I do? how to update the
|
Ah NVM, #9349 (comment) solved my problem I hope in the future this process will be done automatically when updating the user directory. |
Thanks this is working 👍 |
Yeah, it worked! |
had this today. Got lucky just reboot of Windows fixed it. (Microsoft Windows NT 10.0.22621.0) |
This is the one. Thank you! |
it worked, thanks 👍 |
This worked for me. Thank you! |
WARNING: If you unintentionally run it:
|
One should NOTE this operation removes the distro entirely |
Executing the command: wsl --unregister adn then wsl --install doenst fix the problem. But if for a reason you prefer to install it like this way then you should be sure to delete the broken version if you dont want to have trash in your pc |
Thank you so much for this solution I was struggling for hours |
Thank you so much |
Thank you. This solved my problem. |
just use unregister instead of uninstall in the given cmd wsl --uninstall kali-linux and my issue solved |
I found another solution on David Bombal YouTube |
Still works thank you :) |
Hey there,
I'm glad to hear that the fix worked for Ubuntu! Thanks for the help.
Cheers!
…On Mon, Apr 1, 2024 at 5:13 PM Amir Vasseghi ***@***.***> wrote:
>wsl --unregister ubuntu followed by >wsl --install fixes the problem for
ubuntu atleast
Still works thank you :)
—
Reply to this email directly, view it on GitHub
<#10032 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A7QYAJHCX2CSZMZNKRITOZDY3HEXVAVCNFSM6AAAAAAXNH5LWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZQGU3DMMBYGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
thank a lot this fixed the issue 👍
|
Thanks a lot! Solved it with just |
same problem here, |
Confirm that this works perfectly! |
it is 2024 and this works for me!
|
thank you |
What if I don't want to --unregister? I am afraid I'd loose al my (non backed-up) files |
thank you. It's working. |
Windows Version
Microsoft Windows [Version 10.0.22621.1555]
WSL Version
1.2.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
Linux version 5.15.90.1-microsoft-standard-WSL2 (oe-user@oe-host) (x86_64-msft-linux-gcc (GCC) 9.3.0, GNU ld (GNU Binutils) 2.34.0.20200220) #1 SMP Fri Jan 27 02:56:13 UTC 2023
Distro Version
Kali linux
Other Software
No response
Repro Steps
Expected Behavior
The Kali linux installed successfully.
Actual Behavior
Could not open/start it when installed finished.
Diagnostic Logs
The text was updated successfully, but these errors were encountered: