In linux packages like ntfs-3g enable linux systems to read and write to NTFS drives. However when I connect a drive that was previously used in linux to a Windows system, Windows does not recognize the drive. Are there any utilities that enable Windows to read and write to linux partition schemes?
2 Answers
You can now also do this with the Windows Subsystem for Linux.
To mount linux partitions with WSL, you need to have a WSL distribution installed. (https://learn.microsoft.com/en-us/windows/wsl/install / https://www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10)
Step 1: Read the Disks Device ID from wmic (with CMD.exe)
wmic diskdrive list brief
which results in a table like this:
Caption DeviceID Model Partitions Size
Generic MassStorageClass USB Device \\.\PHYSICALDRIVE1 Generic MassStorageClass USB Device 0
WDC PC SN530 SDBPNPZ-1T00-1002 \\.\PHYSICALDRIVE0 WDC PC SN530 SDBPNPZ-1T00-1002 5 1024203640320
You need the "DeviceID" of the disk that contains the linux partition you want to mount, and the Partition number. To Get the Partition number, use:
wmic diskdrive get manufacturer, model, partitions
and
wmic partition get BlockSize, StartingOffset, Name, Index
to get the correct Partition number.
Step 2: Mount the partition using this command:
wsl --mount \\.\PHYSICALDRIVE1 --partition 1 -t ext4
You can then open this path in explorer to access the linux partition:
\\wsl$\Ubuntu-20.04\mnt\wsl
Credit to Linux nightly ( https://linuxnightly.com/mount-and-access-hard-drives-in-windows-subsystem-for-linux-wsl/ )
If you'd rather mount the whole disk, use --bare and don't specify an option:
wsl --mount \\.\PHYSICALDRIVE1 --bare
but then you need to manually mount the disk inside wsl. You can find more information here: ( https://learn.microsoft.com/en-us/windows/wsl/wsl2-mount-disk )
- 131
For ext2/ext3/ext4 I use ext2fsd which despite being a dead project still works under Windows 10 just fine. Haven't tested it under W11.
I'd personally use a VM, e.g. VirtualBox with Linux + Samba/SFTP/FTP server to access other filesystems such as btrfs, XFS or ZFS. A native FS driver is better than anything available for Windows.