Skip to content
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

Unable to mount a drive under wsl : An error occurred mounting one of your file systems #7572

Closed
1 task
Anthony-Biget opened this issue Oct 19, 2021 · 2 comments

Comments

@Anthony-Biget
Copy link

Anthony-Biget commented Oct 19, 2021

Version

OS Name: Microsoft Windows 11 Professionnel
OS Version: 10.0.22000 N/A Build 22000

WSL Version

  • [*] WSL 2
  • WSL 1

Kernel Version

5.10.60.1

Distro Version

Ubuntu

Other Software

No response

Repro Steps

The problems appeared after Windows 10 to Windows 11 migration. Before I had no problem with Ubuntu / Docker or Virtual Box images.

Actual Behavior

Wsl do not mount correctly Windows C drive.

Diagnostic Logs

Anuj-02 and me have the same issue #7565 after updating windows 10 to windows 11, but I have not found the solution yet.

I tried to previously uncheck the following functionalities in windows :

  • Hyper-V
  • Virtual machine Platform
  • Windows hypervisor plateform

I rebooted for updated my PC.
I installed wsl functionnalities and an Ubuntu distribution via Windows PowerShell commands:

PS C:\WINDOWS\system32> wsl --install -d Ubuntu
Installing: Virtual Machine Platform
Virtual Machine Platform has been installed.
Installing: Windows Subsystem for Linux
Windows Subsystem for Linux has been installed.
Downloading: WSL Kernel
Installing: WSL Kernel
WSL Kernel has been installed.
Downloading: GUI App Support
Installing: GUI App Support
GUI App Support has been installed.
Downloading: Ubuntu
The requested operation is successful. Changes will not be effective until the system is rebooted.
PS C:\WINDOWS\system32>

After rebooting, the installation of Ubuntu continued automatically:

Installing, this may take a few minutes...
An error occurred mounting one of your file systems. Please run 'dmesg' for more details.
An error occurred mounting one of your file systems. Please run 'dmesg' for more details.
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username:
...

An extract of the alert / error message extracted from dmesg command:

[    0.144506] Spectre V2 : Spectre mitigation: LFENCE not serializing, switching to generic retpoline
...
[    2.415856] PCI: Fatal: No config space access function found
...
[    2.482199] hv_utils: cannot register PTP clock: 0
...
[    2.727920] FS-Cache: Duplicate cookie detected
[    2.727922] FS-Cache: O-cookie c=00000000cb6e3e64 [p=00000000409df2b5 fl=222 nc=0 na=1]
[    2.727922] FS-Cache: O-cookie d=000000006c7c1c35 n=00000000f766632e
[    2.727923] FS-Cache: O-key=[10] '34323934393337353534'
[    2.727925] FS-Cache: N-cookie c=00000000230327ad [p=00000000409df2b5 fl=2 nc=0 na=1]
[    2.727925] FS-Cache: N-cookie d=000000006c7c1c35 n=0000000090d5ba24
[    2.727925] FS-Cache: N-key=[10] '34323934393337353534'
[    2.866581] 9pnet: Could not find request transport: virtio
[    2.866586] init: (1) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/c (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=0;gid=0;symlinkroot=/mnt/
[    2.866587] ) failed: 22
[    2.925884] 9pnet: Could not find request transport: virtio
[    2.925889] init: (1) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/c (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=0;gid=0;symlinkroot=/mnt/
[    2.925890] ) failed: 22

I also tried to update and restart the wsl service via command line :

wsl --update
wsl --shutdown

(Kernel version: 5.10.60.1)

I also tried to restart the service LxssManager via the command:

Restart-Service -Name "LxssManager"

I have no wsl.conf file in my Ubuntu distribution (/etc/wsl.conf)
My .wslconfig file contains the following lines:

[wsl2]
kernel=C:\\Users\\Anthony\\bzImage
swap=0
localhostForwarding=true

When I try to mount the C drive directly in shell, i have the same issue

anthony@DESKTOP-3QEBOGJ:~$ sudo mount -t drvfs C: /mnt/c
[sudo] password for anthony:
<3>init: (32) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/c (cache=mmap,rw,msize=262144,trans=virtio,aname=drvfs;path=C:;symlinkroot=/mnt/) failed: 22
mount: Invalid argument

All manipulations I tried did not solve my problem. As my drive was initially crypted with Bitlocker service, il tried to put the encryption off. This did not change the issue.

Anybody have an idea to solve this problem ?
Thank you by advance.

Originally posted by @Anthony-Biget in #7565 (comment)

@Anthony-Biget
Copy link
Author

Problem fixed : The kernel path in the .wslconfig file was wrong.

The path to the WSL kernel is located within C:\WINDOWS\System32\lxss\tools\kernel

@pmdpaula
Copy link

pmdpaula commented Nov 5, 2021

Problem fixed : The kernel path in the .wslconfig file was wrong.

The path to the WSL kernel is located within C:\WINDOWS\System32\lxss\tools\kernel

It works for me too.
I've tried too meny things.

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants