-
Notifications
You must be signed in to change notification settings - Fork 842
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
Unable to launch wsl2 #11474
Comments
View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
Diagnostic information
|
@ReinForce-II i have the same issue, how did you resolve it? |
In my case, the rootfs is corrupted, run e2fsck on it solved the problem. |
i cant even start wsl, can you give some insights or links, how to run e2fsck? |
attach the vhdx containing rootfs of wsl2 to another linux system |
I fixed it,here is the details: Issue DescriptionWhen WSL2 shows the following error:
This is typically caused by filesystem corruption due to:
Repair Steps1. Preparation
wsl --install -d Ubuntu-20.04 2. Install Repair ToolsIn the newly created WSL instance, run: sudo apt update
sudo apt install qemu-utils 3. Repair the Filesystem
sudo modprobe nbd
sudo qemu-nbd -c /dev/nbd0 -f vhdx /mnt/path/to/your/ext4.vhdx
sudo e2fsck -f /dev/nbd0
sudo qemu-nbd -d /dev/nbd0 4. Replace the File
wsl --shutdown
5. TestingStart WSL to test if the repair was successful: wsl -d Ubuntu Important Notes
Prevention TipsTo avoid similar issues:
TroubleshootingIf you encounter issues during repair:
CreditsThis guide is based on real-world experience fixing WSL2 filesystem corruption. Feel free to share and improve this guide. References |
@zhhugh thanks for the detailed solution, it worked for me, and I could recover my WSL via e2fsck from another instance. |
Windows Version
10.0.22631.3007
WSL Version
2.1.5.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.146.1-2
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
type wsl in powershell
Expected Behavior
wsl2 launched with no errors
Actual Behavior
Diagnostic Logs
The text was updated successfully, but these errors were encountered: