WSL icon indicating copy to clipboard operation
WSL copied to clipboard

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

Open cerebrate opened this issue 6 years ago • 41 comments

NOTE: This does not appear to be a dupe of #4101 at first sight, given the different errors appearing in dmesg output, hence why I am reporting it as a separate issue.

Environment

Windows build number: 20150
Your Distribution version: Debian bullseye
Whether the issue is on WSL 2 and/or WSL 1: WSL 2

Steps to reproduce

Error occurs when a WSL session is started (i.e. wsl.exe is executed) even if WSL is already running in the background, with the message An error occurred mounting one of your file systems. Please run 'dmesg' for more details. being displayed.

On examining the output of dmesg, the following errors are seen:

...
[   33.894977] 9pnet: Could not find request transport: virtio
[   33.895098] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/c (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=1000;gid=1000;metadata;umask=022;fmask=022;symlinkroot=/mnt/
[   33.895103] ) failed: 22
...

and the automatic drvfs mount of /mnt/c is missing. The same errors are repeated if an immediate attempt to mount the drive manually is made, but if one is made after several minutes, it succeeds without logging additional errors.

Expected behavior

/mnt/c is automatically mounted without error.

cerebrate avatar Jun 21 '20 05:06 cerebrate

Confirm are you on kernel 4.19.121.

therealkenc avatar Jun 21 '20 10:06 therealkenc

Ah. No, 4.19.84. I'll update that now.

cerebrate avatar Jun 21 '20 17:06 cerebrate

I suspect you are using a private kernel? That is going to open you up to issues like this in the future. If there are config options you'd like to see in the supported kernel just let us know.

benhillis avatar Jun 21 '20 18:06 benhillis

@benhillis I try to be proactive in making sure that my kernel is up to date with microsoft/WSL2-Linux-Kernel (and check that first when I have an issue) for situations just like this one. It just never occurred to me that I should be checking against branches other than master, too. My bad.

Anyway, this issue goes away once I merge in the changes from linux-msft-wsl-4.19.y to take me to 4.19.121, so I'll go ahead and close this now.

cerebrate avatar Jun 21 '20 18:06 cerebrate

Quick question: how exactly did you merge in the changes? I'm on 4.19.84 with the same issue and wanted to go up to 121.

parthagarwal avatar Jun 21 '20 18:06 parthagarwal

I keep a fork of the WLS2-Linux-Kernel repo to hold my own .config file and a couple of kernel patches I needed to apply, so I just did a pull request from microsoft/WSL2-Linux-Kernel:linux-msft-wsl-4.19.y against that, and did the usual git merge stuff.

cerebrate avatar Jun 21 '20 18:06 cerebrate

I see, is it it possible to get the latest release without pulling the source code? Should wsl_update_x64.msi also be able to update to 121, or does the latest kernel have to be built locally? After running the msi I'm still at version 84.

parthagarwal avatar Jun 21 '20 18:06 parthagarwal

@benhillis On the config options I'd like to see in the supported kernel - well, I have a fair few of those, even once I eliminate the ones which are too idiosyncratic. Should I post them here as feature-requests-by-topic-group (which might be about a dozen, all told), or is there a different preferable way I should let you know?

cerebrate avatar Jun 21 '20 18:06 cerebrate

It all operated properly with the former Windows version in WSL2 environment. Steps to reproduce the error: Upgraded Windows to the latest 20150 release. After the upgrade has finished attempted to start the working WSL2 (error message kernel needs an update) Inspected the folder c:\windows\system32\lxss\tools and found that the kernel was missing (after the Windows upgrade) Copied c:\temp\kernel (backup of 4.19.121-microsoft-standard) to c:\windows\system32\lxss\tools Upon startup of the WSL2 the network shares were broken. Not sure how to fix this permanently.

 9pnet: Could not find request transport: virtio
[    2.329472] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/a (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=A:\;uid=1000;gid=1000;symlinkroot=/mnt/
[    2.329474] ) failed: 22
[    2.339407] 9pnet: Could not find request transport: virtio
[    2.343754] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/b (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=B:\;uid=1000;gid=1000;symlinkroot=/mnt/
[    2.343757] ) failed: 22
[    2.357270] 9pnet: Could not find request transport: virtio
[    2.360232] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/c (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=C:\;uid=1000;gid=1000;symlinkroot=/mnt/
[    2.360234] ) failed: 22
[    2.370613] 9pnet: Could not find request transport: virtio
[    2.373791] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/f (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=F:\;uid=1000;gid=1000;symlinkroot=/mnt/
[    2.373793] ) failed: 22
[    2.383461] 9pnet: Could not find request transport: virtio
[    2.386423] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/g (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=G:\;uid=1000;gid=1000;symlinkroot=/mnt/
[    2.386425] ) failed: 22
[    2.396367] 9pnet: Could not find request transport: virtio
[    2.399508] 9pnet: Could not find request transport: virtio
[    2.402571] 9pnet: Could not find request transport: virtio
[    2.407044] 9pnet: Could not find request transport: virtio
[    2.411443] 9pnet: Could not find request transport: virtio
[    2.415845] 9pnet: Could not find request transport: virtio
[    2.421394] 9pnet: Could not find request transport: virtio
[    2.425590] 9pnet: Could not find request transport: virtio
[    2.430046] 9pnet: Could not find request transport: virtio
sudo lspci -nn -vvvv -tt 
-+-[ba98:00]---00.0  Microsoft Corporation Device [1414:008e]
 +-[ab56:00]---00.0  Red Hat, Inc. Virtio filesystem [1af4:1049]
 \-[0000:00]-

startergo avatar Jun 23 '20 04:06 startergo

I ran into this issue when running the latest Insider release of Windows. My Windows drives weren't mounting in Ubuntu.

I'm going to leave my experience with the issue for anyone who isn't able to mount using:

mount -t drvfs 'C:' /mnt/c

If you have a custom kernel, you need to ensure that you enable:

CONFIG_NET_9P_VIRTIO=y

If this isn't enabled, your mounts will not work (as per the opening issue).

The easiest way to recompile your kernel is to adjust the .config file; and find:

#CONFIG_NET_9P_VIRTIO=y and un-comment it.

Once you have, make the new kernel (this should be quick if you compiled one before):

make -j 8

Load any kernel modules:

sudo make modules_install

You'll need to copy the kernel to your C:\Users<username> folder via Winsows

Access all your WSL files in Windows via: \wsl$ -- then navigate to your kernel build folder:

eg. /home/user/WSL-XXXXXX/arch/x86/boot/

Copy the: bzImage to your Desktop, rename it, and then move your new kernel to your user folder.

Define the new kernel image in your C:\Users<username>.wslconfig

Shutdown wsl via Powershell:

wsl --shutdown

Finally, start wsl:

wsl

marc5000 avatar Nov 05 '20 17:11 marc5000

Screenshot (2) This is what had been happening when it try to launch my Kali Linux

Nxongo avatar Dec 21 '20 21:12 Nxongo

I have not installed any distro

PS C:\WINDOWS\system32> wsl --list --all --verbose
  NAME                   STATE           VERSION
* docker-desktop-data    Stopped         2
  docker-desktop         Stopped         2

and this is wsl --status result :

PS C:\WINDOWS\system32> wsl --status
Default Distribution: docker-desktop-data
Default Version: 2

Windows Subsystem for Linux was last updated on 5/18/2021
WSL automatic updates are on.

Kernel version: 5.10.16

when I run wsl command I get the same error. Is that because I have not installed any distro? What the result of wsl command should be if we didn't install any distro?

UPDATE :

I installed Alpine and the error stays still

parsalotfy avatar May 18 '21 17:05 parsalotfy

You can update the kernel by typing wsl --update as an admin (in windows command line). It fixed my problem

alex-pex avatar Jul 01 '21 01:07 alex-pex

@Pechayland got this issue also and he is using kernel version 5.10.43 under WSL 2. https://bugs.launchpad.net/ubuntuwsl/+bug/1939235

BurnutsGaming avatar Aug 08 '21 12:08 BurnutsGaming

Same issue as well image

bioinfonerd avatar Aug 19 '21 13:08 bioinfonerd

Same issue as well image

Same problem here out of nowhere. Shut down the system yesterday (didn't install any updates) and today I was greeted with the error above. Running the latest Windows 11 Beta release Version 10.0.22000 Build 22000

grmlin avatar Aug 25 '21 07:08 grmlin

same 555

Same problem here. Plus tons of errors with "dmesg".

samurusov avatar Aug 29 '21 21:08 samurusov

I has this issue arise similarly to how @grmlin reports. WSL and docker desktop working fine then;

After theupdate (on the 28 afaik), Hyper-v seemed to be not installed from a Windows Feature perspective. I renabled it via the "Turn Windows Features on or off" ui.

Following this i got;

$ wsl --list
Windows Subsystem for Linux Distributions:
docker-desktop  (Default)
docker-desktop-data

So I added a new distro via the store and set it as the default, and it started fine.

I didn't need anything on the old wsl install, so my impact was minimal. I didn't look for a way to restore the old instace however. but this got me back up and running.

NeilCross avatar Aug 30 '21 02:08 NeilCross

Update: problem went away after installing the latest update Version 10.0.22000 Build 22000 of the Windows 11 Beta!

Edit: installed KB5005191 yesterday

grmlin avatar Aug 30 '21 07:08 grmlin