I’m one of the (probably) few people that still dual-boot Windows and Linux. There are plenty things that are easier for me to do on a Linux host rather than in Windows, even with WSL being quite useful these days. An example of this is virtualization related experiments (specifically with Qemu/KVM).
A little while back I started writing an upcoming blog post while booted into Linux and took some screenshots that I wanted to use for it. Like a rookie, I pushed the draft of the post to git, but didn’t include the screenshots.
While continuing on with writing the post, now in Windows, I needed a way to copy the files from the partition that lives on the same SSD as my Windows C: partition to said C: drive.
The Broken Way
Ez-pz, I’ll just use the new fancy WSL features that allow this, right? WRONG.
WSL includes support for mounting Linux filesystems with the following command:
|
|
Identifying the desired PHYSICALDRIVE number of the target disk can be done using wmic
:
|
|
The Seagate FireCuda drive is the one I care about, so I need to target \\.\PHYSICALDRIVE4
.
Figuring out the partition is also relatively simple with diskpart
:
|
|
Which, for me, results in:
|
|
Now that I know I need \\.\PHYSICALDRIVE4
and partition 4
, I attempt to mount:
|
|
And am presented with the wonderful error message:
|
|
๐
There are others afflicted by this terrible terrible error, too: https://github.com/microsoft/WSL/issues/8773
The Working Way
Not wanting to spend too much time on it, I looked for alternatives. I remember using a tool called Ext2Fsd baaaaack in the day to accomplish this, but the builds are now very out of date, wth the last update being circa 2017.
After some Google-fu, I found an experimental revival fork of the project here: https://github.com/bobranten/Ext4Fsd. These diligent folk worked on signing the driver for use in Windows 10 and 11. I’ll let their README.md
do the explaining:
This is a branch of the Ext2Fsd project by Matt Wu where I try to implement support for metadata checksums and jbd2. I have also updated the project so it can be compiled with Visual Studio 2019 and Visual Studio 2022. The current status of the development is that all metadata checksums is implemented and jbd2 is ported to support 64-bit blocknumbers. The driver is now ready to be tested!
Warning
I want to emphasise that the authors claim that it is currently in testing, so odd behaviour or data loss MAY be a risk.
It worked just fine for my needs, though!
Using it is super simple, just like I remember:
- Download the latest
-setup.exe
release package from https://github.com/bobranten/Ext4Fsd/releases. - Install the package.
- Open the newly installed
Ext2 Volume Manager
application. - Right-click the ext4 volume that you want to mount and press Assign Drive Letter.
- Your ext4 partition will automagically get an un-used drive letter associated, like plugging in a USB drive, and the ext4 volume will be available for you to use in Windows!
To revert (unmount):
- Right-click the mounted target volume in
Ext2 Volume Manager
. - Click Change Drive Letter.
- Select the drive letter in the box and click Remove, followed by Done.