29

I have a dual boot configured PC.

Since Windows 10 has Windows Subsystem for Linux, is it possible, to access the EXT4 partition from within it?

1

2 Answers 2

15

is it possible to access the EXT4 partition from it?

It does not appear that WSL can access any partition that Windows itself cannot access. It additionally appears to be limited to only NTFS partitions mounted by the system itself. This means network shares wouldn't be accessible even if they were using the NTFS file system.

This is supported by the following statements:

WSL queries system-wide drives for DriveFS; letter mounts that are per-user (like some network maps, or Paragon's ext4fs driver for Windows) aren't picked up.

One of the WSL developers confirmed this was the case.

You are mostly correct. Currently we only support fixed NTFS volumes.

How to enter the ext4 partition

It appears that while this information is correct for Windows 10 1703 and below starting with Windows 10 1709 it should be possible.

In the latest Windows Insider build, the Windows Subsystem for Linux (WSL) now allows you to manually mount Windows drives using the DrvFs file system. Previously, WSL would automatically mount all fixed NTFS drives when you launch Bash, but there was no support for mounting additional storage like removable drives or network locations.

Now, not only can you manually mount any drives on your system, we've also added support for other file systems such as FAT, as well as mounting network locations. This enables you to access any drive, including removable USB sticks or CDs, and any network location you can reach in Windows all from within WSL.

File System Improvements to the Windows Subsystem for Linux

Since the partition already exists on the drive, you should be able to mount it, like you would any other partition in Linux. However, based on the information and examples I found, it might not be possible because Windows itself wouldn't know how to handle the EXT4 partition.

In order to mount a Windows drive using DrvFs, you can use the regular Linux mount command. For example, to mount a removable drive D: as /mnt/d directory, run the following commands:

$ sudo mkdir /mnt/d

$ sudo mount -t drvfs D: /mnt/d

Now, you will be able to access the files of your D: drive under /mnt/d. When you wish to unmount the drive, for example so you can safely remove it, run the following command:

$ sudo umount /mnt/d

The following question is related to this topic Windows 10 Ubuntu Bash Shell: How Do I Mount Other Windows Drives?, and while I have not pulled anything directly from it, it still is related to the subject of mounting volumes from within WSL.

2
  • Is this true of WSL2 also?
    – endolith
    Jul 13, 2021 at 18:13
  • @endolith - My answer was written 2 years before WSL2 was released. The question was about WSL not WSL2
    – Ramhound
    Jul 13, 2021 at 18:51
6

Yes, you can. I regularly use ext2fsd to access ext4 volumes from Windows. Mostly my requirement is for read access, which is how I configure it, and it has worked flawlessly.

I have occasionally tested write access without noticing problems, but I have not used it enough to vouch for its reliability.

The SourceForge link describes it as A Linux ext2/ext3 file system driver for Windows, and it certainly reads ext4 volumes with no problems whatever, but I won't rely on using it for write access until I have either tested it a lot more or seen some reassurances that ext4 is supported.

10
  • 4
    The user isn't really asking how to access EXT4 from within Windows, doing that is well documented, but how to access the EXT4 volume from within Ubuntu specifically the Windows Subsystem for Linux variant. Now I don't disagree that using ext2fsd, would allow them to do this though, because they could simply mount the volume with the supplied command in my answer.
    – Ramhound
    Aug 28, 2017 at 20:40
  • 3
    @Ramhound - Once the volume is mounted in ext2fsd it can be accessed from WSL like any other Windows volume.
    – AFH
    Aug 28, 2017 at 20:49
  • 1
    All Windows volumes with drive letters are mounted automatically when WSL is started, including those accessed with ext2fsd. I assigned U: to the Ubuntu partition, and WSL sees it as /mnt/u/. Type df to check.
    – AFH
    Apr 25, 2018 at 10:43
  • 2
    @x0a - I've not noticed the performance. I use it only occasionally and I'm grateful that I have Windows access at all.
    – AFH
    Jul 1, 2018 at 21:17
  • 2
    @ygoe - It works fine on my Win10x64 desktop, currently at 1803, but it had no problems on any of the previous releases. It is run without parameters on start-up.
    – AFH
    Dec 29, 2018 at 14:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .