-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows drives are automatically mounted when logging into a running WSL distro through another privilege level PowerShell in Windows Terminal, even [automount.enabled]=false
is in /etc/wsl.conf
.
#12443
Comments
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
[automount.enabled]=false
is in /etc/wsl.conf
.[automount.enabled]=false
is in /etc/wsl.conf
.
Logs are required for review from WSL teamIf this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. How to collect WSL logsDownload and execute collect-wsl-logs.ps1 in an administrative powershell prompt:
The script will output the path of the log file once done. If this is a networking issue, please use collect-networking-logs.ps1, following the instructions here Once completed please upload the output files to this Github issue. Click here for more info on logging View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Closed similar issues:
|
Diagnostic information
|
[automount.enabled]=false
is in /etc/wsl.conf
.[automount.enabled]=false
is in /etc/wsl.conf
.
[automount.enabled]=false
is in /etc/wsl.conf
.[automount.enabled]=false
is in /etc/wsl.conf
.
View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
Diagnostic information
|
1 similar comment
View similar issuesPlease view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! Open similar issues:
Closed similar issues:
Diagnostic information
|
Windows Version
Microsoft Windows [Version 10.0.26100.2605]
WSL Version
2.3.26.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.167.4-1
Distro Version
Ubuntu 24.04
Other Software
No about other apps.
Repro Steps
1.Prepare
The following steps are my normal configs to make WSL2 only automatically mount Windows drive
C:
with DrvFs and not mount any other Windows drives./etc/wsl.conf
, as:/etc/fstab
as :# UNCONFIGURED FSTAB FOR BASE SYSTEM C: /mnt/c drvfs defaults 0 0
wsl --shutdown
This will automatically mount Windows drive
C:
to/mnt/c
with DrvFs.Put another way, the above settings make the Ubuntu-24.04 distro only mount Windows drive
C:
to/mnt/c
when starting, and do not involve other Windows drives.2.Test
2.1 Start
Ubuntu-24.04
within a general Windows privilege and check the mounting configurationUbuntu-24.04
is not runningdf -h
to show the mounted Windows drivesC:
mounted, which is expected.2.2 check the mounting configuration within an Admin Windows privilege.
shutdown
the previous Ubuntu-24.04!df -h
to show the mounted Windows drivesC:
, but alsoD:\
,E:\
,F:\
andT:\
are mounted. This is not the expectation since[automount] enabled=false
have been sed in/etc/wsl.conf
.Expected Behavior
As the above configuration.
/etc/wsl.conf
is as:/etc/fstab
is as :# UNCONFIGURED FSTAB FOR BASE SYSTEM C: /mnt/c drvfs defaults 0 0
It is expected that, whatever method to start and login into the
Ubuntu-24.04
distro, only Windows driveC:
should be mounted to/mnt/c
while other Windows drives are not involved.Actual Behavior
If start and login into the
Ubuntu-24.04
through a PowerShell within a normal Windows privilege, it is indeed the case that only Windows driveC:
is mounted to/mnt/c
, and other Windows drives are not.But, if retain the running
Ubuntu-24.04
, and login into it through a PowerShell within an Admin Windows privilege, the other Windows drives, such asD:\
,E:\
, andF:\
are mounted as well. This is out of the expectation, as the[automount] enabled=false
is in/etc/wsl.conf
.Some conclusions form additional ablation tests
I've done further tests and found that:
shutdown
the WSL2.Ubuntu-24.04
distro, and retain it.Ubuntu-24.04
distro, it will auto-mount all Windows drives, even[automount] enabled=false
is in the/etc/wsl.conf
.Diagnostic Logs
WslLogs-2025-01-07_19-27-51.zip
The text was updated successfully, but these errors were encountered: