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 distro corrupted #21

Open
maicol07 opened this issue Jul 27, 2023 · 3 comments
Open

WSL distro corrupted #21

maicol07 opened this issue Jul 27, 2023 · 3 comments

Comments

@maicol07
Copy link

Hi,
I've successfully shrinked my WSL image but when I enter Ubuntu it seems corrupted: all files in /etc/ are binaries and therefore the OS can't use them. How can I fix this or do I have to reinstall all?
Thanks

@thusinh1969
Copy link

Do you know why ? I am about to run one... !

@maicol07
Copy link
Author

maicol07 commented Jul 29, 2023

I've tried on another PC with other distros and it worked fine. Also, I've retried on the same PC with other Ubuntu distros, and it also worked fine. The only difference between the first run and the other ones is that the temp folder was set to a folder in an external drive (instead it worked when using a different disk partition). Probably this was the issue. I suggest you to export the distro before shrinking the image, in case something goes wrong.

@bezaisingh
Copy link

I used the temp folder on the D drive as the C drive didn't have enough space, and it shrunk the virtual drive from 48GB to 28GB but then corrupted the virtual drive "ext4.vhdx". Also, I want to highlight that my Ubuntu-20.04 was already moved to the D drive, the directory was D:\WpSystem\S-1-5-21-1570390811-2750708149-32824043-1001\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx.

And now when I try to launch wsl it says

Failed to attach disk 'C:\Users\bijay\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu20.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx' to WSL2: The APPX file can not be accessed because it is not encrypted as expected.
Error code: Wsl/Service/CreateInstance/MountVhd/0x80070199

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

3 participants