microsoft / microsoft/WSL

Allow specifying DrvFS entries in wslconfig

Open
#12,850 4 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

**Is your feature request related to a problem? Please describe.**

Since WSL2 cannot access information needed to mount folder-only volumes, I would like the ability to provide a list of these volumes without having to go inside the distro and updating the /etc/fstab

**Describe the solution you'd like**

In wslconfig

```
[drvfs]
automountdrives=boolean # if true,and default, it will automount drive letter mounts like before
mount.pdir.source=C:\p # pdir represents a key to link the source and target together
mount.pdir.target=p # note this is RELATIVE to the mount prefix of the distro, so we shouldn't put /mnt or /mnt/host
mount.cdrive.source=C:\ # This is an example of a drive mount if automountdrives is false and the user wants to explicitly list
mount.cdrive.target=c
```

Note I don't know how to create associative arrays or lists in wslconfig so please adapt the example to allow for list of pairs

**Describe alternatives you've considered**
None yet, but it prevents having to work around by adding a drive letter.

**Additional context**

https://github.com/microsoft/WSL/issues/5356
https://github.com/microsoft/WSL/issues/12848

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how wslconfig currently represents settings and the behavior described in issues #5356 and #12848. The work is done when wslconfig supports explicit DrvFS source/target entries and the automountdrives behavior described in this request.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.