WSL: An error occurred mounting one of your file systems. Please run 'dmesg' for more details.
Version
22000.258
WSL Version
- WSL 2
- WSL 1
Kernel Version
5.4.72
Distro Version
Ubuntu 20.04
Other Software
No response
Repro Steps
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:
[ 13.598350] init: (1) ERROR: MountPlan9WithRetry:285: mount drvfs on /mnt/d (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=D:\;uid=1000;gid=1000;symlinkroot=/mnt/ [ 13.598353] ) failed: 13 [ 13.600717] 9pnet_virtio: no channels available for device drvfs
and the automatic drvfs mount of /mnt/ 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.
NOTE : I think one of my drives is locked with bitlocker so getting this error.
Expected Behavior
automatically mounted as user without error.
Actual Behavior
mounted as root with error “An error occurred mounting one of your file systems. Please run ‘dmesg’ for more details.”
Diagnostic Logs
No response
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 22 (4 by maintainers)
okay found it. I had the docker WSL distribution set as default. Changed it to Ubuntu and it worked.
I had the same issue with wsl2 startup. In my case, it was the Windows 11 ESP drive that was causing the error. The solution was easy because I had no desire to mount this drive anyway:
$ mount | grep drvfsdrvfs on /mnt/c type 9p (rw,relatime,dirsync,aname=drvfs;path=C:;symlinkroot=/mnt/,mmap,access=client,msize=262144,trans=virtio)[automount] enabled = falsewsl --shutdownI get this error for 2 drives that have bitlocker enabled and I have not unlocked. I basically have separate windows installs on my machine and don’t want to unlock those drives for isolation/security purposes.
I don’t have any idea how the WSL drive mounting works but I would say that the windows side of the mounting should only enumerate bitlocker drives that are already unlocked.
Had the same issue as @Anuj-02 It was because I had a locked Bitlocker drive, with an assigned drive letter.
As soon as I removed the drive letter using Disk Management, then
wsl --shutdown& open againwsl, the error no longer appears.Also started to get this. For me, it’s the same reason as @jonstelly: I recently added a new partition, always locked, for security purposes, only to be unlocked on demand by me, and locked straight after doing specific work there.
@craigloewen-msft Is it maybe an idea to add support in the
.wslconfigto be able to exclude drives from beingDrvFs’ed?Would like to add that if you had any additional drives that are meant to be hidden but for some reason weren’t, then follow this answer on superuser.SE to hide that particular drive, thereby preventing Ubuntu from trying to mount.
Command used (elevated Windows terminal):
I was able to remedy the
dmesgbug for my computer by doing the above.This issue has been automatically closed since it has not had any activity for the past year. If you’re still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
Guys my problem was that it was trying to mount on my backup drive (HD). Since I didn’t have anything stored there, I simply deleted the volume and leave only my primary drive allocated (SDD) and the error stopped. Why does it tried to mount on my secondary drive I don’t know.
I don’t have any partitions encrypted with BitLocker, but since I upgraded to Windows 11, this error appear to me.