19
3
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?
19
3
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?
10
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.
3
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.
2The 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 – 2017-08-28T20:40:13.627
1@Ramhound - Once the volume is mounted in ext2fsd
it can be accessed from WSL like any other Windows volume. – AFH – 2017-08-28T20:49:14.560
@AFH how would you mount that to WSL? – Aftab Naveed – 2018-04-25T10:26:43.230
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 – 2018-04-25T10:43:57.043
ext2fsd is very slow for me. 800kb/s compared to 20 mb/s on native linux. – x0a – 2018-07-01T19:54:31.623
@x0a - I've not noticed the performance. I use it only occasionally and I'm grateful that I have Windows access at all. – AFH – 2018-07-01T21:17:39.740
ext2fsd doesn't work in Windows 10 x64, at least on my Surface Pro 4. The driver isn't loaded. To make Windows load that driver, I have to jump through things I cannot remember shortly after. Not recommended. – ygoe – 2018-12-29T13:53:44.847
@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 – 2018-12-29T14:55:31.033
I think the Surface has some special safe boot option. That really does prevent unsigned drivers from loading, as opposed to regular installations that never should but still do load such drivers. – ygoe – 2018-12-29T18:12:49.953
Yeah, that is possible. This thread has some info about that https://askubuntu.com/questions/9933/how-to-read-ext4-partitions-in-windows
– Strepsils – 2017-08-31T11:38:14.457