Replies: 4 comments 2 replies
-
If you use the new WSL Preview there is a new command |
Beta Was this translation helpful? Give feedback.
-
I'm assuming that you haven't written any files to the vhdx; just the format. If that's the case, then maybe/hopefully there's a recovery option. Accidentally reformatted a EXT4 drive to NTFS; lost all data. What are my options? and a few others. The general consensus seems to be TestDisk, but also some mentions that it isn't necessarily an easy process -- Make sure to read the doc thoroughly. And, of course, if you have space, create a copy of the If you need to TestDisk under WSL (I'm not sure if you will), then you'll need the WSL Preview (available from the Microsoft Store or here in "Releases"), since as @Biswa96 mentioned, that adds the ability to mount Try:
You should then be able to use TestDisk (the Linux version) on the drive/partition. Note also that someone on Super User mentioned being able to recover with a |
Beta Was this translation helpful? Give feedback.
-
Many thanks for both of your replies @Biswa96 @NotTheDr01ds ! It seems the version installed for wsl is by default the preview... Luckily this feature may get across the Mount-VHD not available in the home version. Before advancing to wsl --mount, lsblk yields NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS After doing wsl --mount --bare --vhd ext4.vhdx it gives NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS |
Beta Was this translation helpful? Give feedback.
-
In the end there seems to be no luck on my side: the testdisk detects GPT partition table at the beginning (similar to this https://forum.cgsecurity.org/phpBB3/viewtopic.php?t=6436), but might not be able to detect anything except the reformatted partition for the mounted drive. Disk /dev/sdd - 274 GB / 256 GiB - CHS 33418 255 63
Also tried fsck: sudo fsck.ext4 -v /dev/sdd The superblock could not be read or does not describe a valid ext2/ext3/ext4 Found a gpt partition table in /dev/sdd |
Beta Was this translation helpful? Give feedback.
-
Version
Windows 11 Home 10.0.22621 Build 22621
WSL Version
WSL2
Distro Version
Ubuntu 20.04
I have mounted the solid state drive of one laptop to another and attached the ext4 virtual disk image on Disk Management.
There is no option on right clicking the attached disk other than "New Simple Volume". (Shows unallocated drive in the box)
I did that but it seemed it overwrote on the vhdx file such that its partition turned into NFTS.
Is there any way to recover the original partition for the ext4 system? I have tried multiple solutions / efforts available online but none of them works so far.
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions