The problem appeared after Windows 10 to Windows 11 migration. Before I had no problem with Ubuntu / Docker or Virtual Box images.
Windows Version:
Windows 11 Version 21H2 (OS Build 22000.258)
Actual Behavior:
Wsl-2 do not mount correctly Windows C drive.
Diagnostic Logs:
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
I used Ubuntu, but the problem is the same with docker wich return an error or with an image loaded in Oracle Virtual Box.
wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
Ubuntu
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.
wsl --list
for everyone?/etc/wsl.conf
with the contents listed on this page. Can you confirm thatC:\\Users\\Anthony\\bzImage
is the correct path to the WSL kernel?