Mounting File System from WSL location via NFS into Angstom Linux dev kit

sthomas8537 1 Reputation point
2021-04-19T02:08:00.893+00:00

I am running Windows 10 Enterprise, version 1909, build 18363.1500. I am also running WSL with Ubuntu 20.04.1 LTS.

In my set-up I have a Windows machine as described above and an embedded development board running Angstrom Linux (v2017.06). I am trying to load a root filesystem via NFS from the Windows machine (NFS server) to the development board running Angstrom (NFS client). I have mapped a drive (R:) in Windows to the WSL Linux path (\wsl$\Ubuntu). I then have an NFS server (WinNFSd) running in Windows pointing to path (R:\home\nfs\rootfs\rootfs). In the terminal of the development board (Angstrom), I use the following command to mount the location and get the file system.

'''
setenv nfsboot "setenv bootargs earlycon console=ttyS0,115200n8 root=/dev/nfs rootfstype=nfs
nfsroot=${serverip}:/R/home/nfs/rootfs/rootfs,nfsvers=3,nolock rw rootdelay=15
ip=${ipaddr}:${serverip}:${gatewayip}:255.255.255.0:hostname:eth0; booti ${loadaddr} - ${fdt_addr}"
'''

When the Angstrom kernel starts, the NFS server (running in Windows) is mounted and some files are verified. I'm using WinNFSd as the server on the Windows 10 machine. This is an output from the NFS server.

'''

Portmap daemon started
NFS daemon started
Mount daemon started
Local IP = 172.17.16.214
Type 'help' to see help

PORTMAP GETPORT 100005 1058
MOUNT NULL
MOUNT MNT R:\home\nfs\rootfs\rootfs from 172.17.16.79
PORTMAP GETPORT 100003 2049
NFS NULL OK
NFS FSINFO R:\home\nfs\rootfs\rootfs OK
NFS NOIMPNFS GETATTR R:\home\nfs\rootfs\rootfs OK
NFS FSINFO R:\home\nfs\rootfs\rootfs OK
NFS ACCESS R:\home\nfs\rootfs\rootfs OK
NFS LOOKUP R:\home\nfs\rootfs\rootfs\dev OK
NFS LOOKUPR:\home\nfs\rootfs\rootfs\sbin OK
NFS ACCESS R:\home\nfs\rootfs\rootfs\sbin OK
NFS LOOKUPR:\home\nfs\rootfs\rootfs\sbin\init OK
NFS ACCESSR:\home\nfs\rootfs\rootfs\sbin\init OK
NFS LOOKUPR:\home\nfs\rootfs\rootfs\etc OK
NFS ACCESSR:\home\nfs\rootfs\rootfs\etc OK
NFS LOOKUPR:\home\nfs\rootfs\rootfs\etc\init NOENT
NFS LOOKUPR:\home\nfs\rootfs\rootfs\bin OK
NFS ACCESS R:\home\nfs\rootfs\rootfs\bin OK
NFS LOOKUPR:\home\nfs\rootfs\rootfs\bin\init NOENT
NFS LOOKUPR:\home\nfs\rootfs\rootfs\bin\sh OK
NFS ACCESSR:\home\nfs\rootfs\rootfs\bin\sh OK
'''

However, in the embedded project (Angstrom) I then get a kernel panic that says the sbin/init and the bin/sh files can't be executed due to error 13.

'''
[ 2.408632]Waiting 15 sec before mounting root device...
[ 17.460112] VFS:Mounted root (nfs filesystem) on device 0:15.
[ 17.469007]devtmpfs: mounted
[ 17.472546]Freeing unused kernel memory: 1216K
[ 17.483119]Starting init: /sbin/init exists but couldn't execute it (error -13)
[ 17.511450]Starting init: /bin/sh exists but couldn't execute it (error -13)
[ 17.518567]Kernel panic - not syncing: No working init found. Try passing init= option to kernel.
See LinuxDocumentation/admin-guide/init.rst for guidance.
'''

The init file looks to be a link so I tried bypassing it by adding the kernel command init=/lib/systemd/systemd but this also fails with the same error for systemd. Error 13 says it's a permissions failure but I'm not sure why I get it. I checked the file permissions in Ubuntu for these two files and all users have full permissions.

Could this error be because of the mapping the drive (R:) through Windows?
If so, how do I fix it?

I tried loading the NFS server in WSL which seems to have worked, however, when I start it I get the following error: * Not starting NFS kernel daemon: no support in current kernel.

I am a Linux newbie and am running out of ideas. Would anybody have any ideas on what could be going wrong?

Thanks for your help!

ST

Community Center Not monitored
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2021-04-19T07:15:21.057+00:00

    Hi,

    WSL is currently not supported in the Q&A forums, the supported products are listed over here: https://learn.microsoft.com/en-us/answers/products (more to be added later on).

    For WSL issues, you can have this asked in following link:

    https://github.com/Microsoft/WSL/issues

    WSL doc issues, you can ask in following link:

    https://github.com/MicrosoftDocs/WSL/issues

    Best Regards,
    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.