Le problème est apparu après la migration de Windows 10 vers Windows 11. Avant, je n’avais aucun problème avec les images Ubuntu / Docker ou Virtual Box.
Version de Windows :
Windows 11 Version 21H2 (OS Build 22000.258)
Comportement actuel :
WSL 2 ne monte pas correctement le lecteur C de Windows.
Journaux de diagnostic :
J’ai essayé de décocher précédemment les fonctionnalités suivantes dans Windows :
-
Hyper-V
-
Virtual Machine Platform
-
Windows Hypervisor Platform
J’ai redémarré pour mettre à jour mon PC.
J’ai installé les fonctionnalités WSL et une distribution Ubuntu via les commandes Windows PowerShell :
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>
Après le redémarrage, l’installation d’Ubuntu a continué automatiquement :
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:
...
Un extrait du message d’alerte / d’erreur extrait de la commande dmesg :
[ 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
J’ai aussi essayé de mettre à jour et de redémarrer le service WSL via la ligne de commande :
wsl --update
wsl --shutdown
(Version du noyau : 5.10.60.1)
J’ai aussi essayé de redémarrer le service LxssManager via la commande :
Restart-Service -Name "LxssManager"
Je n’ai pas de fichier wsl.conf dans ma distribution Ubuntu (/etc/wsl.conf)
Mon fichier .wslconfig contient les lignes suivantes :
[wsl2]
kernel=C:\\Users\\Anthony\\bzImage
swap=0
localhostForwarding=true
Quand j’essaie de monter le lecteur C directement dans le shell, j’ai le même problème
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
J’ai utilisé Ubuntu, mais le problème est le même avec Docker qui retourne une erreur ou avec une image chargée dans Oracle Virtual Box.
wsl --list
Windows Subsystem for Linux Distributions:
Ubuntu-20.04 (Default)
Ubuntu
Toutes les manipulations que j’ai essayées n’ont pas résolu mon problème. Comme mon disque était initialement chiffré avec le service Bitlocker, j’ai essayé de désactiver le chiffrement. Cela n’a pas changé le problème.
Quelqu’un a-t-il une idée pour résoudre ce problème ?
Merci d’avance.
Source : Super User