Mounting partitions on boot drive with WSL2
Issue
I have a Linux partition and the windows partition on the same drive, at the moment it's impossible to access the linux partition from windows using WSL, which I find quite frustrating as I'm forced to re-boot into Linux to access the files I need.
Feature Request
I'd like to be able to mount an individual partition, even if in the boot drive, on WSL.
I'm having the same issue (mentioned in #10775) but with an Ext4 partition on a drive that's not the Windows boot drive but does have an active NTFS partition on it.
Bump, please add, would be really nice for dual-boot laptop setups where WSL could be used to access existing linux system in case it's needed
Ye I have same issue, having NixOS(LUKS btrfs) and windows (bitlocker ntfs) dual boot configuration. I can easily open bitlocker partition with cryprsetup (even managed to automate with by creating BEK and using as keyfile with crypttab) but not vice versa. My current solution is using VMware workstation (it CAN passthrough single partition) with Alpine Linux, mounting disks and sharing disk with SMB. waiting for less complicated and manual(VM can't be launched at boot because admin access required) method. Were there any workarounds?
Same here - I believe this feature would be very useful for many of us as it should be quite common to have multiple partitions on the same drive.
Also, maybe this is also related to #6015?
Ye I have same issue, having NixOS(LUKS btrfs) and windows (bitlocker ntfs) dual boot configuration. I can easily open bitlocker partition with cryprsetup (even managed to automate with by creating BEK and using as keyfile with crypttab) but not vice versa. My current solution is using VMware workstation (it CAN passthrough single partition) with Alpine Linux, mounting disks and sharing disk with SMB. waiting for less complicated and manual(VM can't be launched at boot because admin access required) method. Were there any workarounds?
The same, both in setup and desire. There is a chance for wsl2 to be the best solution for Windows to mount alien filesystems from Linux, only if it is capable of mounting partitions on the same disk where Windows boot from.
It's like 2 years old issue and no single PR or commit, that's real shame 😭
Would very much like to see this. My giant physical swap partition from Linux is being wasted!
Basically the current mount flow goes through:
-
WslCoreVm::AttachDiskadding a mutex -
WslCoreVm::AttachDiskLockHelddoing the actual attachment, which after some checks boils down to -
wsl::windows::common::hcs::AddPassThroughDisk, which constructs aModifySettingRequest<Attachment>(schema in https://learn.microsoft.com/en-us/virtualization/api/hcs/schemareference#attachmenttype) and callsModifyComputeSystem() -
WslCoreVm::MountDiskadding a mutex -
WslCoreVm::MountDiskLockHelddoing the actual mount
The current bottleneck is in the HCS step, which boils down to Hyper-V's inability to attach a single partition instead of a whole disk. And because this thing involves multiple Microsoft teams... it will probably be hard to get started.(See: Microsoft organization structure chart.)
Same as above. This is an important feature and it seems silly that it's not supported!