14

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.

7
  • What build of Windows 11 are you using exactly? Can you provide the output of wsl --list for everyone?
    – Ramhound
    Commented Oct 20, 2021 at 12:45
  • Edit your question instead of submitting a unformatted comment. Please also answer which build of Windows 11 you are using.
    – Ramhound
    Commented Oct 20, 2021 at 14:45
  • Sorry i edited my question.
    – Anthony_B
    Commented Oct 20, 2021 at 14:58
  • I would create a /etc/wsl.conf with the contents listed on this page. Can you confirm that C:\\Users\\Anthony\\bzImage is the correct path to the WSL kernel?
    – Ramhound
    Commented Oct 20, 2021 at 15:07
  • Thank you very much for your precious help, you solved my problem. Wrong kernel path was specified in my .wslconfig file... Have a nice day
    – Anthony_B
    Commented Oct 20, 2021 at 15:27

8 Answers 8

18

I got rid of it like this, by listing the distributions and picking the Ubuntu one (in my case called Ubuntu).

wsl -l -v
wsl --set-default Ubuntu
4
  • 1
    Did not resolve for me: i.imgur.com/H8WLGsa.png
    – dylanh724
    Commented Jul 10, 2022 at 6:41
  • 2
    +1 on this answer: I found setting the default distro e.g. wsl -s Ubuntu solved the issue I had. My default "distro" was : docker-desktop-data - that aint a distro!!! Ref and further credits: github.com/microsoft/WSL/issues/5923#issuecomment-1215454084 Commented Aug 15, 2022 at 17:38
  • What @therobyouknow commented works. But, you need to know which distro you have installed with wsl --list. Commented Aug 27, 2022 at 14:53
  • 1
    Run wsl --install -d Ubuntu to install Ubuntu and make it the default distro for WSL. Commented Sep 4, 2023 at 21:59
2

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

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.

The path to the WSL kernel is incorrect. It should be located within C:\WINDOWS\System32\lxss\tools\kernel

Source: An error occurred mounting one of your file systems. Please run 'dmesg' for more details. #5456

1

None of these answers helped me, but what did was reviewing (in Windows) what was being mounted:

Turns out, a partition that was supposed to be hidden was assigned a letter (that I did not have access to). I fixed this with Partition Wizard (vanilla Disk Mgmt didn't detect the letter) and voila! All was well.

Note that I did reinstall Ubuntu; not sure if that part was necessary.

0

I had the same error message using WSL2. "wsl An error occurred mounting one of your file systems. Please run 'dmesg' for more details" I also had a bit locked Hard Drive on E:\ that was not unlocked. To fix it, I removed the drive (USB cable), restarted WSL2, plugged the drive back in and restarted WSL2 again. This fixed it for me

0

I have an ext4 partition, which has a drive letter 'E' assigned to it but it is not accessible by windows. Removed the drive letter using Windows Disk Management and re-started the Windows 11 Terminal and the error is gone.

1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Sep 13, 2022 at 17:40
0

In my case, I had a Windows 11 - Linux dual boot.

Windows cannot read the ext4 partition (to which I had assigned the letter T:\) on which Linux was installed and somehow WSL2 could not mount the partition.

Removing the drive letter of the ext4 partition using Windows Disk Management did the trick.

-1

I too was having exactly same problem on my HP 8100 Elite Tower PC, Windows 11 build 22000.434. I didn't have any special windows configurations, no encrypted drives, nothing. Just 3 normal Ntfs partitions. Initial/Required by windows, 1gb System drive was hidden stripped of any drive letter. Also my motherboard doesn't have any special settings, nor does it offer to configure any Intel Hyper threading related capabilities.

As far as I think, my problem was resolved when I uninstalled this window component/feature from the control panel: Windows Hypervisor Platform. Even without a reboot, my Ubuntu installations (whatever version) started to work ok. [I'm afraid though, if reboot could pose any new problem!! I'll report if there was any new problem after a restart here]

Though I also uninstalled Hyper-V. You can find this complete answer with some screenshots, here: https://bathindahelper.com/t/ubuntu-linux-error-on-windows-11-or-win10/3613

-1

This error can occur if you have Bitlocker on any drive it is not unlocked. Unlocking the BitLocker will resolve the issue in that case.

1
  • 1
    You should carefully read the author’s entire question again. They already specified 2 years ago that disabling BitLocker protection didn’t solve their problem. It’s safe to say the problem wasn’t BitLocker.
    – Ramhound
    Commented Jun 2, 2023 at 4:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .