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/Service/CreateInstance/WSL_E_DISK_CORRUPTED #12271

Open
1 of 2 tasks
arthurmluz opened this issue Nov 14, 2024 · 3 comments
Open
1 of 2 tasks

Wsl/Service/CreateInstance/WSL_E_DISK_CORRUPTED #12271

arthurmluz opened this issue Nov 14, 2024 · 3 comments

Comments

@arthurmluz
Copy link

arthurmluz commented Nov 14, 2024

Windows Version

icrosoft Windows [versão 10.0.22631.4460]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-2

Distro Version

Ubuntu

Other Software

No response

Repro Steps

My notebook abruptly went into bluescreen while having vscode with the WSL open.

Got the BIOS message saying my HD got problems and it was being repaired.

When I got back, I tried to open WSL and got the following message;

Wsl/Service/CreateInstance/WSL_E_DISK_CORRUPTED

Expected Behavior

WSL to start

Actual Behavior

I get error and it wont open

Diagnostic Logs

WslLogs-2024-11-14_20-02-12.zip

I have tried following these instructions, but I can't perform wsl.exe lsblk and after I mount the vhd using the mount flag, I get an error saying the file is being used by another process Wsl/Service/AttachDisk/MountVhd/HCS/ERROR_SHARING_VIOLATION.

I had a project with commits that I didn't push, so I really need to get the files back,

Thanks.

Copy link

The logs shows that a disk mount error occured. Try to follow these repair instructions and see if that solves the issue.

Diagnostic information
Detected appx version: 2.2.4.0
Detected user visible error: Wsl/Service/CreateInstance/WSL_E_DISK_CORRUPTED
Found evidence of ext4 error: [    4.082459] EXT4-fs (sdc): VFS: Can't find ext4 filesystem

@OneBlue
Copy link
Collaborator

OneBlue commented Nov 14, 2024

@arthurmluz: This might be because the disk was in use by WSL. Can you try to run wsl --shutdownbecause trying to mount the disk ?

@arthurmluz
Copy link
Author

@arthurmluz: This might be because the disk was in use by WSL. Can you try to run wsl --shutdownbecause trying to mount the disk ?

Yes I have tried the following:

> wsl --shutdown
> wsl.exe --mount .\ext4.vhdx --vhd --bare
A operação foi concluída com êxito. (Translation: the operation completed sucessfully)
> wsl.exe lsblk
Falha ao anexar o disco '******\ext4.vhdx' ao WSL2: O arquivo já está sendo usado por outro processo.
(Translation: Failed to attach the disc '....' File already in use by another process)
Error code: Wsl/Service/CreateInstance/MountVhd/HCS/ERROR_SHARING_VIOLATION
> wsl --shutdown
> wsl.exe lsblk
A distribuição não pôde ser iniciada porque seu disco virtual está corrompido.
Translation: (The distribution can't start because your virtual disk is corrupted)
Error code: Wsl/Service/CreateInstance/WSL_E_DISK_CORRUPTED

I also tried the following things to remount it:

  • converted the .vhdx file to .vhd with qemu-img;
  • downloading VirtualBox and starting a VM with .vhd file;
  • use 'guestmount' to mount it but I got: guestmount: no operating system was found on this disk

Finally, I used DMDE to restore my files manually

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

2 participants