Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL automount failure #4101

Closed
eugenetaranov opened this issue Jun 12, 2019 · 66 comments
Closed

WSL automount failure #4101

eugenetaranov opened this issue Jun 12, 2019 · 66 comments

Comments

@eugenetaranov
Copy link

eugenetaranov commented Jun 12, 2019

  • Your Windows build number: (Type ver at a Windows Command Prompt)
    Version 10.0.18362.113

  • What you're doing and what's happening: (Copy&paste the full set of specific command-line steps necessary to reproduce the behavior, and their output. Include screen shots if that helps demonstrate the problem.)

Created /etc/wsl.conf with automount options:
cat /etc/wsl.conf [automount] enabled = true options = metadata

terminated wsl with wsl.exe --terminate ubuntu

After wsl/ubuntu is launched, windows volumes are not mounted at all:
mount rootfs on / type lxfs (rw,noatime) none on /dev type tmpfs (rw,noatime,mode=755) sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime) proc on /proc type proc (rw,nosuid,nodev,noexec,noatime) devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620) none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755) none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime) none on /run/shm type tmpfs (rw,nosuid,nodev,noatime) none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime) cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755) cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)

dmesg [ 0.010291] Microsoft 4.4.0-18362.1-Microsoft 4.4.35 [ 0.113173] <3>init: (1) ERROR: UtilCreateProcessAndWait:360: /bin/mount failed with status 0 [ 0.113181] 2000 [ 0.113492] <3>init: (1) ERROR: LogException:23: FS: Could not start file system server. Operation not permitted @.\plan9.cpp:33 (TranslatePath) [ 0.133961] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Program Files\WindowsApps\CanonicalGroupLimited.UbuntuonWindows_1804.2019.521.0_x64__79rhkp1fndgs [ 0.134017] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Windows\system3 [ 0.134081] init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Windows [ 0.134127] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Windows\System32\Wbe [ 0.134180] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0 [ 0.134227] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Windows\System32\OpenSSH [ 0.134288] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Program Files\Git\cm [ 0.134335] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Users\e\AppData\Local\Microsoft\WindowsApp [ 0.134382] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Users\e\AppData\Local\Programs\Microsoft VS Code\bi [ 0.134442] <3>init: (4) ERROR: UtilTranslatePathList:2154: Failed to translate C:\Users\e\AppData\Local\hyper\app-3.0.2\resources\bi

  • What's wrong / what should be happening instead:

Windows volumes should be auto mounted with metadata option.

Thank you.

@benhillis
Copy link
Member

Your wsl.conf should be multiple lines, like this:

[automount]
enabled = true
options = metadata

@eugenetaranov
Copy link
Author

@benhillis thanks for advise, it looks exactly as yours, it got broken after I submitted the issue

@eugenetaranov
Copy link
Author

however manual mount works just fine:

------------------------------------------------------------
~ » sudo mount -t drvfs C: /mnt/c -o metadata,uid=1000,gid=1000
------------------------------------------------------------
~ » mount                                                                                                                                                                  
rootfs on / type lxfs (rw,noatime)
none on /dev type tmpfs (rw,noatime,mode=755)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,gid=5,mode=620)
none on /run type tmpfs (rw,nosuid,noexec,noatime,mode=755)
none on /run/lock type tmpfs (rw,nosuid,nodev,noexec,noatime)
none on /run/shm type tmpfs (rw,nosuid,nodev,noatime)
none on /run/user type tmpfs (rw,nosuid,nodev,noexec,noatime,mode=755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
cgroup on /sys/fs/cgroup type tmpfs (rw,relatime,mode=755)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,relatime,devices)
C: on /mnt/c type drvfs (rw,relatime,uid=1000,gid=1000,metadata,case=off)

@mawillia
Copy link

I am seeing the same thing. My wsl.conf looks like this (trying to set the metadata arguments). I also am able to manually mount afterwards.

[automount]
enabled = true
options = "metadata,uid=1000,guid=1000"

@tuananh
Copy link

tuananh commented May 8, 2020

i got this issue on WSL 2 too

ERROR: UtilCreateProcessAndWait:655: /bin/mount failed with status 0x

insiders build 19624

@ryudice
Copy link

ryudice commented May 9, 2020

I'm getting the same on insiders build as well

@mrneo240
Copy link

+1 for me as well under alpine on lastest win10 insiders fast

@yelkarama
Copy link

+1 for me too (builds 19624 and 19628)

@yelkarama
Copy link

I see these errors in dmesg:
[ 0.480751] 9pnet_virtio: no channels available for device drvfs
[ 0.480919] init: (1) ERROR: UtilCreateProcessAndWait:655: /bin/mount failed with status 0x
[ 0.480921] 2000
[ 0.480924] init: (1) WARNING: Retrying mount
[ 0.582024] 9pnet_virtio: no channels available for device drvfs
[ 0.582169] init: (1) ERROR: UtilCreateProcessAndWait:655: /bin/mount failed with status 0x
[ 0.582171] 2000
[ 0.582174] init: (1) WARNING: Retrying mount
[ 0.683198] 9pnet_virtio: no channels available for device drvfs
[ 0.683335] init: (1) ERROR: UtilCreateProcessAndWait:655: /bin/mount failed with status 0x
[ 0.683337] 2000
[ 0.683340] init: (1) WARNING: Retrying mount
[ 0.784439] 9pnet_virtio: no channels available for device drvfs
[ 0.784581] init: (1) ERROR: UtilCreateProcessAndWait:655: /bin/mount failed with status 0x
[ 0.885625] 9pnet_virtio: no channels available for device drvfs
[ 0.886468] 9pnet_virtio: no channels available for device drvfs
[ 0.987671] 9pnet_virtio: no channels available for device drvfs
[ 1.089109] 9pnet_virtio: no channels available for device drvfs
[ 1.190361] 9pnet_virtio: no channels available for device drvfs
[ 1.291645] 9pnet_virtio: no channels available for device drvfs
[ 1.293035] 9pnet_virtio: no channels available for device drvfs
[ 1.371163] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1.394202] 9pnet_virtio: no channels available for device drvfs
[ 1.495491] 9pnet_virtio: no channels available for device drvfs
[ 1.596787] 9pnet_virtio: no channels available for device drvfs
[ 1.698027] 9pnet_virtio: no channels available for device drvfs

@benhillis
Copy link
Member

@SvenGroot has some recent fixes in this path that are on the way to Insider Fast.

@tuananh
Copy link

tuananh commented May 14, 2020 via email

@ryudice
Copy link

ryudice commented May 15, 2020

@SvenGroot has some recent fixes in this path that are on the way to Insider Fast.

thanks, any estimate on when this will go out? it broke the development envs of multiple devs, I know we shouldnt had been on the "fast" builds but this windows release is going out soon never expected to be breaking stuff.

@PJCAfonso
Copy link

+1. thx all, any ideas when this is solved. all my work is stopped because no distro is working now!

Any solution in between to work! we had also docker integrated with wsl 2. and after last windows update, not work any more!

@ghost
Copy link

ghost commented May 18, 2020

subbing

@AdamHebby
Copy link

Same here, my computer actually shuts down the first time whenever I turn it on from a cold boot, it restarts and comes back on immediately. The only thing I did was update Windows. When it comes back on, this is the only error I found (the one this issue is about) and several programs fail to initialize.

Not sure if it's related at all, still looking into it.

@glevy
Copy link

glevy commented May 27, 2020

I was able to resolve this by removing/renaming the config file at %USERPROFILE%.wslconfig , and shutting down wsl (wsl --shutdown) .
After starting it again Ubuntu was able to mount properly.

I found this workaround here:
https://github.com/microsoft/WSL2-Linux-Kernel/issues/91#issuecomment-632233488

@Dijir
Copy link

Dijir commented May 29, 2020

I have no .wslconfig on my %USERPROFILE% and still not work here.

@ryudice
Copy link

ryudice commented May 29, 2020

Is there any workaround while you get the fix out? I tried @glevy's suggestion but no luck.

@PavelSosin-320
Copy link

MS delivers driver dated the year 2006 for USB3 external SSD drive with capacity 2 Tb with Windows 10 release 2005 dev release. How do you suppose it can work? Who knows about USB 3 and 2Tb SSD storage that year?

@stevemk14ebr
Copy link

+1

@kroscek
Copy link

kroscek commented May 31, 2020

Same issue

@KayLeung
Copy link

KayLeung commented Jun 4, 2020

@SvenGroot has some recent fixes in this path that are on the way to Insider Fast.

@benhillis what's the exact version? I'm running on Fast already

@benhillis
Copy link
Member

19640

@KayLeung
Copy link

KayLeung commented Jun 4, 2020

@benhillis Thanks. I'm on build 19640.mn_release.200530-1731 and still doesn't work.

Is it a random issue or a known bug of particular builds?

@slippuu
Copy link

slippuu commented Jun 8, 2020

Can confirm issue is still persisting on Microsoft Windows [Version 10.0.19640.1]

@PavelSosin-320
Copy link

I have to re-integrate my Ubuntu 20.04 every day, maybe, after restart on build 19640.

@benhillis
Copy link
Member

@SvenGroot - Could you look into this more please?

@SvenGroot
Copy link
Member

SvenGroot commented Jun 9, 2020

There are two issues being mentioned in this thread. The OP's issue is in WSL1, and then @yelkarama mentioned a WSL2 issue that should be fixed in more recent builds.

Is anyone still seeing an issue with WSL2 in build 19640, and if so could they please post the output of dmesg?

For @eugenetaranov's original WSL1 issue, the only thing I can think of that might affect this is the formatting of wsl.conf. Make sure the file is using Unix line endings (LF), not Windows line endings (CRLF). If you're not sure, try recreating the file using a Linux editor (vi, emacs, nano, whatever you prefer).

If that does not help, can you verify that automounting works if you remove wsl.conf, and also collect detailed logs using step 8 here while reproducing the issue.

@KayLeung
Copy link

KayLeung commented Jun 9, 2020

  • I'm on WSL2 in 19640
  • no wsl.conf
  • can mount manaully
  • tried remove and re-install all wsl / ubuntu / VMP ...etc

I can't remember which build. I think it happened since it asks me to run wsl_update_x64.exe. (Acutally I'm already on WSL2 when windows asked.)

Suuuper long log but that repeated the same error for each drive:

[    4.453156] 9pnet_virtio: no channels available for device drvfs
[    4.453162] init: (1) WARNING: mount: waiting for virtio device...

..
[    4.893064] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

..

[    6.358402] 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/

Your comment making me try it on WSL1 and it works. So only WSL2 failed

@tracker1
Copy link

@SvenGroot Is the solution to turn UAC on? Is the lowest level sufficient? Right now I'm unable to get work done on my work computer.

@stevemk14ebr
Copy link

[    1.564244] pci ac58:00:00.0: [1af4:1049] type 00 class 0x010000
[    1.568043] pci ac58:00:00.0: reg 0x10: [mem 0xc00004000-0xc00004fff 64bit]
[    1.569376] pci ac58:00:00.0: reg 0x18: [mem 0xc00005000-0xc00005fff 64bit]
[    1.570465] pci ac58:00:00.0: reg 0x20: [mem 0xc00006000-0xc00006fff 64bit]
[    1.576844] pci ac58:00:00.0: BAR 0: assigned [mem 0xc00004000-0xc00004fff 64bit]
[    1.577611] pci ac58:00:00.0: BAR 2: assigned [mem 0xc00005000-0xc00005fff 64bit]
[    1.578312] pci ac58:00:00.0: BAR 4: assigned [mem 0xc00006000-0xc00006fff 64bit]
[    1.672223] hv_pci 4699792f-6446-4293-a603-13b2f051991a: PCI VMBus probing: Using version 0x10002
[    1.673687] hv_pci 4699792f-6446-4293-a603-13b2f051991a: PCI host bridge to bus a603:00
[    1.673689] pci_bus a603:00: root bus resource [mem 0xc00008000-0xc0000afff window]
[    1.674373] pci a603:00:00.0: [1af4:1049] type 00 class 0x010000
[    1.676094] pci a603:00:00.0: reg 0x10: [mem 0xc00008000-0xc00008fff 64bit]
[    1.676963] pci a603:00:00.0: reg 0x18: [mem 0xc00009000-0xc00009fff 64bit]
[    1.677778] pci a603:00:00.0: reg 0x20: [mem 0xc0000a000-0xc0000afff 64bit]
[    1.682781] pci a603:00:00.0: BAR 0: assigned [mem 0xc00008000-0xc00008fff 64bit]
[    1.683417] pci a603:00:00.0: BAR 2: assigned [mem 0xc00009000-0xc00009fff 64bit]
[    1.684050] pci a603:00:00.0: BAR 4: assigned [mem 0xc0000a000-0xc0000afff 64bit]
[    1.711985] init: (1) ERROR: MountPlan9WithRetry:282: mount drvfs on /mnt/d (cache=mmap,noatime,msize=262144,trans=virtio,aname=drvfs;path=D:\;uid=1000;gid=1000;symlinkroot=/mnt/
[    1.711987] ) failed: 13

Win10 20161.1000 #5456 #5254

@brianqian
Copy link

Happening to me on [Version 10.0.20175.1000]. WSL 2 18.04

dmesg.log > https://pastebin.com/X6d8pbky

@PavelSosin-320
Copy link

I had the same when I tried to use a device that is not supported by Windows. The device itself is 100% functional because when I connected it directly to my router running media server it started to work out-of-the-box.
It looks like Windows has a general problem with supporting very high volume / fast SSD disks:
2 Tbyte +, USB 3.1 connection.

@KayLeung
Copy link

everybody,

Try to turn ON/OFF UAC and run into Super Admin. I don't why but my Windows back to normal now (and UAC off, everything back to normal as before)

@PavelSosin-320
Copy link

I tried many things including device manager, storage manager, etc. Most of Windows utilities hang when trying to manage large disks.
On the other hand, Linux 64 must be able to use disks up to 2 Tb, try CentOS 7 from MS Store. It is a RHEL 7 clone and applies Official Filesystem size limits
Unfortunately, my SDD is in use.

@KayLeung
Copy link

KayLeung commented Jul 29, 2020

@PavelSosin-320

I believed you're a different problem than WSL?

To check your drive format. It should be FAT32 / exFAT / NTFS for windows. FAT32/exFAT is better for cross-platform

** backup it before actions.
** ensure you understand what's going on before converting the drive format. Otherwise, you will lose all data.

@brianqian
Copy link

Tried toggling UAC on both normal and super admin accounts, doesn't change anything.

@KayLeung
Copy link

@brianqian

Sad :(

Someone shared an auto-mount script on Reddit
https://www.reddit.com/r/bashonubuntuonwindows/comments/huiq8y/a_script_to_automount_all_storage_devices_in_wsl/
I haven't tried myself but it looks safe to use temporarily.

@PavelSosin-320
Copy link

I see the drive format of my SSD connected to my WiFi router as NFS via the router's configuration UI. It is the factory formatting of my SSD.
Indeed, this is partially not a WSL issue but Using external USB drive question has been asked already. There are no restrictions that are expected from the Linux side: NFS mount
These devices are dirty cheap - 25$ /Tib overall and insanely fast - USB 3.1. The modern "gaming laptops" come with a very small but fast internal drive. Their storage has to be upgraded soon after purchasing.

@PavelSosin-320
Copy link

I agree that it is not a WSL bug because the max size of the distro file system is published - 256 Gb. But this is a critical function gap - the user shall be able to use external disks of any size. The problem is:

  1. Windows Disk manager Windows disk manager shall be able to create a single file partition of max size 256 Gb regardless of the total disk size and disk technology.
  2. WSL shall be able to use this single file partition for Linux distro file system in the style of block device like Oracle did it 30 years ago.

@brianqian
Copy link

brianqian commented Jul 29, 2020

@KayLeung I can't mount manually and that script doesn't do anything for me unfortunately.

edit: Managed to fix it by reinstalling this update https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel and shutting down/restarting wsl.

@bbulkow
Copy link

bbulkow commented Aug 5, 2020

UPDATE: a full system restart with 20175 solved the problem.

Getting the dmesg failure under U18 after a recent update:
[ 0.018751] Microsoft 4.4.0-20175.1000-Microsoft 4.4.35
[ 0.303534] <3>init: (1) ERROR: UtilCreateProcessAndWait:652: /bin/mount failed with status 0
[ 0.303557] 2000

WSL1.

However my windows mount is properly mounted in every way I can see. No /etc/wsl.conf file, I was wondering if I had an old smb mount around somewhere, but I don't have an fstab. I was experimenting with mounting samba servers through WSL but I don't think it was on this machine / WSL instance. It would be nice if the error message said which /bin/mount entry, or is that always the root?

@ghostvar
Copy link

i am with 20190 still have same problem,

but you can use this command for a while :
mount -t drvfs C: /mnt/c -o metadata

@robsonbmartins
Copy link

I had the same problem as everyone else.
The problem started due to the removal of the UAC that I made via registration (REGEDIT).
From then on WSL stopped assembling the units.

@traceherrell
Copy link

after upgrading to Microsoft Windows [Version 10.0.20201.1000] WSL2 failed to mount on startup.

wsl --update
from elevated account fixed it for me

@ted-marozzi
Copy link

after upgrading to Microsoft Windows [Version 10.0.20201.1000] WSL2 failed to mount on startup.

wsl --update
from elevated account fixed it for me

Thank you, I am on Version 2004 (OS Build 20241.1000) same issue.

I ran powershell as admin

wsl --update
wsl --shutdown
wsl

then I restarted my pc and wsl mounted correctly on start up.

@lursyy
Copy link

lursyy commented Feb 4, 2021

My wsl version doesn't have the --update command yet, but wsl --shutdown fixed it in my case

@Marietto2008
Copy link

I have the same problem. how can I fix this ?

2021-04-23_18-05-42
2021-04-23_18-07-47

this is my .wslconfig file :

[wsl2]
nestedVirtualization=true
debugConsole=true
pageReporting=true
kernelCommandLine=intel_iommu=on iommu=pt kvm.ignore_msrs=1 kvm-intel.nested=1 kvm-intel.ept=1 kvm-intel.emulate_invalid_guest_state=0 kvm-intel.enable_shadow_vmcs=1 kvm-intel.enable_apicv=1

@donalhunt
Copy link

@ted-marozzi wrote:

I ran powershell as admin

wsl --update
wsl --shutdown
wsl

Verified that this worked for me...

In my case I didn't need the elevated powershell (probably due to the way I installed WSL).

@fstarred
Copy link

fstarred commented Jan 12, 2023

I solved by:

  • Remove the Window Subsystem for Linux (both the one and the update) from installed apps of Windows
  • Download manually a wsl version (check this)

@n0rbertt
Copy link

n0rbertt commented Feb 7, 2023

@ted-marozzi wrote:

I ran powershell as admin

wsl --update
wsl --shutdown
wsl

Verified that this worked for me...

In my case I didn't need the elevated powershell (probably due to the way I installed WSL).

This fixed it for me, TYVM!

Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests