how to enter the ext4 partition
Hello I am a new user of BASH with Windows preview insider
When i do the command "ls ", i can see all the NTFS partitions like one lettre each Microsoft@DESKTOP-G51CU1Q:/mnt$ ls c e f g h j k q r But no ext4 partition!!!
however i can continue to see the contents of the EXT4 partitions on Windows10-14371 with EXT2FSD ( http://www.ext2fsd.com/ ) how to be able to also view them with BASH (mount ?)
http://www.hostingpics.net/viewer.php?id=479092ext.png
This is similar to #214 and #530. Currently only fixed NTFS volumes will appear as DriveFs mounts. Definitely something that we will be revisiting in the future.
Fbougron, reading different FSes in Linux requires kernel-mode modules loaded, I believe, at boot on linux. Since the NT kernel reads NTFS partitions, and LXSS stores Linux-related file properties with NT extended attributes, NTFS is the only FS available (actually also ReFS but you get the picture).
To get real Ext-FS support from windows is something I don't think we can expect that from the MS team. Native Ext-FS support on Windows would be a cool feature in general, and I don't think it is really something directly linked to the Windows Subsystem for Linux (since it amounts basically to a kernel-mode filesystem driver).
WSL does do the VFS (virtual filesystem) emulation, which is the interesting part of the problem anyway. The rest of it is just a matter of coding something like ext2fsd, or a driver for it.
It would be cool if MS opened up the filesystem driver API for the NT Kernel so users could write drivers for the different linux filesystems though.
This is why I think FUSE (#414) is so important before someone above the WSL team's pay grade (#423) declares bash.exe 'done'. MS can't reasonably do a "clean room" re-implementation of Ext4, but we can do this. With CUSE someone could do OSS or ALSA over a socket even if it's not a priority for the WSL team. User Voice is here.
I mean, they could do a clean-room reimplementation of Ext4, but it would be a lot of work and relatively little market for it, since the Linix side already has interop through the ntfs-3g project. But my preference would be for MS to implement something like VFS on the Windows side with a well-documented API so OSS coders could do the hard work of a fully functional Ext4 driver for Windows. The point is though that this would have to be something implemented in directly in the NT Kernel by the Kernel team, not the WSL team (they seem to only work directly with the lxss/lxcore/lxsession/bash.exe stuff, which is my guess why they have to make inter-departmental requests to the Kernel team and the Console team for changes to be made).
OSS coders can already do Ext4 on Windows without Microsoft's help, if someone felt so inclined. MS even tells you how to get started here. A VFS type layer is entirely possible too. Windows filesystems do not need to be developed by the MS NT Kernel team. It's already just a driver.
@therealkenc Oh? Do the Linux FSes support all of the extended attributes and (maybe overcomplicated) security security model used by the NT kernel and implemented in NTFS?
Nope. But you could implement all of the NTFS security constructs in a Linux kernel module if one was so inclined, just as you could implement all of the Linux security constructs in a Windows driver if one was so inclined. You were asking for a "a well-documented API so OSS coders could do the hard work of a fully functional Ext4 driver for Windows". If by "fully functional" you mean including Linux security constructs, then yep you'd need to implement those in a Windows driver. But you wouldn't need the MS NT Kernel team to do that. This setting aside the fact that an Ext4 filesystem on Windows would probably care about such security constructs about as much as the ntfs-3g filesystem on Linux does (that is, not that much). You'd probably mount the thing with some blanket permissions for the user that mounted it.
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.
@benhillis can you confirm that I'm accurately describing this?
@segin You are mostly correct. Currently we only support fixed NTFS volumes.
Another voice chiming in. Would be great to access files from my ubuntu partition via WSL.
I'm still excited about WSL--please keep up the morale and hard work!
I'd like to be able to do this in WSL. Thanks for all the hard work folks
Would be great to work this out to make Rails 10x faster. #893
@aurimus This talk by Theodore Ts'o should probably explain why adding ext4 support is not necessarily just a matter of adding a driver:
https://www.youtube.com/watch?v=2mYDFr5T4tY
It turns out that getting good performance and supporting lots of features of the Ext filesystems would require MS to invest quite a lot of resources. Ts'o says in that talk that it takes 7-10 years for new filesystem drivers in the Linux kernel to become mature.
MS could probably relatively quickly write a small compatibility driver (something like ntfs-3g on Linux), but to really get first-party-level-performance out of it would likely take a while (or maybe coding resources that they wouldn't want to spend on such a niche feature).
Edit: But if the Microsoft team wants to prove me wrong, I'm rooting for ya.
They don't have to. Ext2/3/4 File System Driver for Windows:
https://sourceforge.net/p/ext2fsd/code/ci/master/tree/
@therealkenc so you are saying that I can see linux partitions from Bash by mounting them with your mentioned driver?
@therealkenc -- I don't know the provenance of that driver; are you saying that it's as robust and well-optimized as the ext4 driver baked into the Linux kernel?
There is also Paragon Extfs driver, would that do?
Those file system drivers for Windows (both ext2fsd and paragon extfs) work great for mounting an EXT2/3/4 volume in Windows. But as far as I know you can't access them from Bash.
@mstrelan sounds like it's true..
Just saying it's doable, same as ISO9660 or FAT32. You can't mount Ext2 partitions or CDs or DOS floppy disks in WSL Creators, of course, because the infrastructure doesn't exist. Whether you can add a "yet" to that last sentence depends on where this project goes after all the low hanging fruit bits are finished.