Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

wsl2 mounting nfs mount.nfs: No such device

Writer Sebastian Wright

When trying to mount a NFS server in WSL2 on Windows 10 (Linux version 4.4.0-19041-Microsoft ()), Ubuntu 20.04, I get:

mount.nfs: No such device

The server being specified is reachable and other Linux clients are able to mount that same path. There does not seem to be a tutorial I can find to see if I am missing some steps.

1 Answer

Glad you specified the kernel information! That kernel says that your instance is WSL1, not WSL2.

uname -a

WSL1: Linux Revel 4.4.0-19041-Microsoft #488-Microsoft Mon Sep 01 13:43:00 PST 2020 x86_64 x86_64 x86_64 GNU/Linux

WSL2: Linux Revel 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

My guess is that you may have installed WSL2, but didn't convert your existing WSL1 instance to WSL2. Converting your instance to WSL2 should fix the issue.

Assuming that you do actually have WSL2 installed, then you can do this through either ...

  • wsl --set-version <Distro> 2

  • Or, clone the WSL1 instance with wsl --export <distroName> <filename.tgz> and then import that back in as WSL2 with wsl --import <newDistroName> <DirectoryWhereYouWantIt> <filenameYouCreatedFromExport.tgz> --version 2. More details in the first part of my answer to another question here.

  • Or a "middle ground" approach between the two. Back up the existing instance with wsl --export, test it with a wsl --import, convert the original with wsl --set-version, and then delete the one you don't need with wsl --unregister.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy