WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Way to mount a partition from the disk the windows is installed.

Open reisraff opened this issue 3 years ago • 14 comments

I whish to mount a partition in where my current windows running is installed I have a dual boot windows and linux at the same disk, and I'd like to work in wsl mounting the ext4 partition.

Is that possible?

I think there is something related to the issue #5997

I read this article and the note says:

# Note

Administrator access is required to attach a disk to WSL 2.

The WSL 2 mount command does not support mounting a disk (or partitions that belong to the disk) that is currently in use.

wsl --mount always attaches the entire disk even if only a partition is requested.

You can't mount the Windows installation disk.

**You can't mount the windows installation disk... **

May is there a work arround ?

As you can see the partition 5 is where my linux is installed.

image

reisraff avatar Aug 26 '22 15:08 reisraff

same problem here... any other solution?

genghisun avatar Mar 16 '23 07:03 genghisun

Same here...

sansugranes avatar Apr 06 '23 13:04 sansugranes

Would love to know too...

rsmirnov90 avatar Apr 30 '23 05:04 rsmirnov90

Same here ...

comzine avatar Jul 08 '23 20:07 comzine

There's no workaround, it's hinted at in the line "wsl --mount always attaches the entire disk even if only a partition is requested.". The entire disk needs to be accessible even if you're only interested in only one partition.

thomond avatar Jul 15 '23 16:07 thomond

This needs to get fixed, currently this makes mounting partitions on systems with only one physical drive impossible, which means it's effectively impossible to access ext4 partitions from Windows on such machines.

OreoLamp avatar Dec 09 '23 22:12 OreoLamp

Oh wow, can't believe this isn't possible

itisluiz avatar Jan 11 '24 13:01 itisluiz

I hate that this isnt implemented yet... It would make it so easy for one too also maybe chroot into a existing linux partition on the same drive.

PointyToast avatar Feb 27 '24 15:02 PointyToast

I'm half and half thinking it's either malicious design or the windows devs just suck

TotoShampoin avatar May 18 '24 09:05 TotoShampoin

I'm half and half thinking it's either malicious design or the windows devs just suck

i belive it's the second one

thecaprisun avatar Jun 02 '24 17:06 thecaprisun

I've now read multiple times that it's bad and corrupts your data if two servers mount different partitions on the same disk, as well as I've read multiple times that it's safe if they're different filesystems. This question has three answers, two supporting it and one against it, and all three are downvoted and at -1.

The WSL subreddit mod stated that it's technically impossible for WSL to mount any partition on an already mounted drive. You might try installing a ext4 driver for Windows.

PinkSerenity avatar Jun 08 '24 16:06 PinkSerenity

@PinkSerenity what there is a ext4 driver for windows? Then there is no need for WSL at all

tribbloid avatar Jun 11 '24 23:06 tribbloid

@PinkSerenity what there is a ext4 driver for windows? Then there is no need for WSL at all

Kinda, yeah. It's an active driver, so it requires a service that runs in the background. You don't have to enable autostart though, so you can simply start it when you need it and select the file-system you want to mount. It will then be mounted and assigned a letter so it is accessible in the explorer. I don't know if autostart can automatically do that. Here: https://github.com/bobranten/Ext4Fsd

PinkSerenity avatar Jun 12 '24 10:06 PinkSerenity

That's really sucks. And VMWare can mount separate physical partitions inside VM. Why Hyper-V (which is under the hood of WSL) can't do the same?

You just map bunch of sectors that have said partition inside VM, that's it.

Mart-Bogdan avatar Jun 02 '25 17:06 Mart-Bogdan

Any updates or known workarounds?

ZzEeKkAa avatar Aug 14 '25 14:08 ZzEeKkAa