WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Mounting of Network share fails ERROR: UtilCreateProcessAndWait:489: /bin/mount failed with status 0x2000

Open aebian opened this issue 6 years ago • 5 comments

Environment

Windows build number: Win32NT, 10.0.19041.0 Microsoft Windows NT 10.0.19041.0
Your Distribution version: Debian 10
Whether the issue is on WSL 2 and/or WSL 1: WSL2 --> Linux version 4.19.128-microsoft-standard (oe-user@oe-host) (gcc version 8.2.0 (GCC)) #1 SMP Tue Jun 23 12:58:10 UTC 2020

Steps to reproduce

Either try to directly mount the share via

sudo mount -t drvfs '\\10.0.0.22\Whiskey' /mnt/gd

Or mount the share with a entry /etc/fstab

# <file system>             <dir>          <type> <options>                                                   <dump>  <pass>
\\10.0.0.22\Whiskey  /mnt/gd  drvfs  credentials=/etc/.credmore,file_mode=0640,dir_mode=0750 0       0

Share is also accessible without credentials, however for rw access credentials are required.

WSL logs: https://aka.ms/AA9yxuc

Expected behavior

image Mounting of a Network share via WSL2 Linux Debian should work. It does not seem to work. Share is available and accessible on Windows devices across the network.

Tested this with different Windows devices. I tested this with my Desktop and Laptop both running the exact same Windows and WSL2 and Debian version.

Actual behavior

image

No matter if done via /etc/fstab or via command the error above is printed.

Do you have an idea what's causing this? Google was not really helpful in finding a solution that works.

aebian avatar Oct 14 '20 20:10 aebian

If you are on WSL2, you might be able to push forward by mounting directly with cifs. Something like:

$ sudo apt install cifs-utils
$ sudo mount -t cifs //10.0.0.22/Whiskey /mnt/gd -o user=yourusername,uid=1000,gid=1000

[Sometimes it is necessary to tweak -o vers= depending on what is on the other side.]

therealkenc avatar Oct 14 '20 22:10 therealkenc

Thanks for the tip, it seems to work with the CIFS share, thanks!

aebian avatar Oct 15 '20 19:10 aebian

Thanks for the follow-up, happy you are unblocked. Your OP ask is still legit if you want to hold it open. There is a similar (but not-quite dupe) open #5302 (message). It is pretty academic on WSL2 though. Doing an indirect to Windows SMB through WSL's 9p doesn't make a whole lot of sense. Your call. Won't turn down a closed issue.

therealkenc avatar Oct 15 '20 21:10 therealkenc

Well I got a solution, a direct drvfs call is not really required if cifs is working fine :D So my issue is solved ^^

aebian avatar Oct 15 '20 21:10 aebian

use cifs is ok but how to config on fstab

fangyucun avatar Jul 22 '24 09:07 fangyucun