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 corrupted after compacted #27

Open
electroboyz opened this issue Oct 17, 2023 · 6 comments
Open

wsl corrupted after compacted #27

electroboyz opened this issue Oct 17, 2023 · 6 comments

Comments

@electroboyz
Copy link

compacting was successful but wsl became corrupted, cant start it anymore
tried to mount manually but every attempt failed. be careful before running this thing.

@polarathene
Copy link

wsl became corrupted

Not a specific WSL distro / disk?

If you get an unresponsive WSL experience and commands like wsl --shutdown no longer responds this isn't necessarily corruption. It can happen when the host filesystem runs out of disk space for example. If you free up disk-space it will still be unresponsive until you reboot the host system but can work again after that.

wslcompact is just providing a convenience for you, running the same commands you could do manually.


Since it's been 2 weeks, is WSL working for you now? Did you do anything specific to make it functional again? Or did you find that restarting your system resolved it like I mentioned?

@TheNoFace
Copy link

TheNoFace commented Nov 8, 2023

My Ubuntu 22.04 image is also corrupted after using wslcompact, resizing 466551 MB to 190242 MB.

Starting WSL gives following error:

<3>WSL (12) ERROR: CreateProcessEntryCommon:370: getpwuid(1000) failed 0
<3>WSL (12) ERROR: CreateProcessEntryCommon:374: getpwuid(0) failed 0
#

wsl --shutdown works fine, but restarting make no difference.

@electroboyz
Copy link
Author

electroboyz commented Nov 8, 2023 via email

@TheNoFace
Copy link

TheNoFace commented Nov 9, 2023

i fixed it by using fsck, mount the corrupted vhdx on other linux

In my case, fsck and e2fsck was not able to recover my system since wslcompact somehow corrupted necessary system script files with meaningless @^@^ strings.

Use Optimize-VHD for now. Check microsoft/WSL#10244

@electroboyz
Copy link
Author

electroboyz commented Nov 9, 2023 via email

@dg-nvm
Copy link

dg-nvm commented May 15, 2024

the core of this program is wsl --export ""$wsl_distro"" - | wsl --import wslcompact ""$tmp_folder"" - so I guess ask Microsoft why WSL did corrupt the export/import.

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

4 participants