Score:1

Issue with ext4.vhdx using WSL2 in Windows 11

tr flag

I had and issue with WSL installing a package, so I decided to uninstall Ubuntu 22.04 to fresh install again. I did the mistake to delete manually some files and then I had some issues to reinstall Ubuntu, it displayed an error: there was no file in C:\Users\PC\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState\ext4.vhdx.

Finally I was able to installed, and later I wanted to inspect the folder to see what is inside, and seems to be empty. Is that correct? Now my Ubuntu terminal runs correctly. I updated packages, open Python3 in the terminal open Visual Studio Code from WSL, but overall I have the feeling that something is wrong.

Another thing is that when I go to the Linux folder, there are two Ubuntu folders, and when I try to access Ubuntu 22.04 it does not allow me. Before I just had one Ubuntu in that location.

Ubuntu folder in Windows

Score:4
vn flag

At this point, it seems that you have two "distributions" still "registered", as far as WSL understands. You can see the list of distributions with:

wsl.exe -l -v

I'm assuming that this list matches your screenshot:

  • Ubuntu
  • Ubuntu-22.04

Given that the package location for 22.04 is empty, I'm also assuming that this was the first one you installed and the one that you manually deleted.

I know it sounds like I'm repeating myself (and your question), and that's because the command to fix this is destructive and irreversible, so please make sure that you are removing the right one (if you have any files in the other that are important).

Assuming that Ubuntu works and Ubuntu-22.04 doesn't:

# Warning:  destructive operation
wsl --unregister Ubuntu-22.04

That should remove the registration for the one that you removed manually.

Juan Rosello avatar
tr flag
Many thanks for this reply, I do not have any important files there, so I will follow this instructions. Greetings!
Juan Rosello avatar
tr flag
Many thanks for your help! I fixed it following the commands you posted. Greetings!
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.