How to run NFS Server On Embedded Linux(LSDK, NXP LS1046)
Linux - Embedded & Single-board computerThis forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to run NFS Server On Embedded Linux(LSDK, NXP LS1046)
Hi, experts.
I am conducting Linux port up out custom LS1046a board. and I have two reference board LS1046ARDB, LS1045AFRWY. I'm using NXP LSDK tiny linux based on Yocto. So Root file systme was made by busybox. but they doesn't support NFS Server on that I think.
I have included following ALL item in the kernel.
[*] NFS server support[*] NFS server support for NFS version 3
... so on
but After booting up, I can't find /etc/exprots file, /etc/init.d/nfsstart or other NFS related command and scrips(nfs-server or nfs-kernel-services).
Also, I didn't find any NFS command in BusyBox.
as fas as I know, Busybox doesn't support nfs-kernel-server or something like that.
How to progress next step for running NFS server. I checked to mount NFSD, I think it's ok. (mount -t nfsd nfsd /proc/fs/nfsd). Plz help me.
compiling kernel with nfs support will not create files like /etc/exports, you need to do that manually. You need to install nfs server, use something like this: https://variwiki.com/index.php?title...Setup_TFTP/NFS
compiling kernel with nfs support will not create files like /etc/exports, you need to do that manually. You need to install nfs server, use something like this: https://variwiki.com/index.php?title...Setup_TFTP/NFS
Thank you for your answer.
I already have created /etc/exports. but it didn't work.
and I want to install nfs server the way that site said you mentioned. but My linux doesn't support apt-get command. because that is embedded linux(base on yocto) and using busybox for Root file system.
So I really want to know how to install NFS server using busybox or something.
Should I make NFS command or scripts (such as nfs-kernel-service)?
Is there the other way to run NFS server? don't use scripts?
I already have created /etc/exports. but it didn't work.
I don't really understand. How should it work at all. What does "it didn't work" really mean?
Quote:
Originally Posted by nekarose
and I want to install nfs server the way that site said you mentioned. but My linux doesn't support apt-get command. because that is embedded linux(base on yocto) and using busybox for Root file system.
So I really want to know how to install NFS server using busybox or something.
Should I make NFS command or scripts (such as nfs-kernel-service)?
Is there the other way to run NFS server? don't use scripts?
I have no idea because I don't really know what do you have and how can you install anything on it. Probably others can help you with it. But in general there are two ways:
1. use and official repository and package management tool to install it (you need to check if that is available for you)
2. make it for yourself (=download source code and compile/build it). In that case you need to know how can you do that (or how can you cross-compile it).
I don't really understand. How should it work at all. What does "it didn't work" really mean?
I have no idea because I don't really know what do you have and how can you install anything on it. Probably others can help you with it. But in general there are two ways:
1. use and official repository and package management tool to install it (you need to check if that is available for you)
2. make it for yourself (=download source code and compile/build it). In that case you need to know how can you do that (or how can you cross-compile it).
"it didn't work' mean that NFS server doesn't work.
I already refered these two site. but I could not figure out what I want to know.
as you said, I think I might have to make it myself (NFS server for ARM). but it is hard to me. Honestly, I dont know where I can get a NFS server source code for ARM64.
There might be easier way to run NFS server than I build source code myself.
In conclustion. What I did
1> included NFS component in kerenl (CONFIG_NFSD, so on)
2> created /etc/exports file manually.
3> can not find any service refered to NFS (service --status-all)
4> verifyed NFSD status is OK (mount -t nfsd nfsd /proc/fs/nfsd)
I'd like to see your exports file, and messages you get when starting the service(s) with a verbose switch.
Also what you see client-side.
What init system does your install use?
Try
Code:
ps -1
which will probably return sth like /sbin/init.
Now show us
Code:
ls -l /sbin/init
I use busybox init system. I made /etc/exports file manually.
Only one line in it,
/test *(rw,no_root_squash,async)
I tried "ls -l /sbin/init" and returned "/sbin/init -> /sbin/init.sysvinit"
and I can't service related to nfs-kernel-server and nfs-common.
What should I gonnad do?
I tried "ls -l /sbin/init" and returned "/sbin/init -> /sbin/init.sysvinit"
use sysvinit tools (like the service command you already used) to start/stop the services in question, and see what sort of log/error/general output you get from that.
Repeat the same from your client.
Show us.
Please use CODE tags for full command output (incl. the command itself) and code (see my signature).
I can help you but I'm not going to walk you through it. Please do web searches and read documentation.
Have you checked NFS documentation if you can use *, which is rather insecure (anyone can mount)?
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803
Rep:
Quote:
Originally Posted by nekarose
"it didn't work' mean that NFS server doesn't work.
I already refered these two site. but I could not figure out what I want to know.
as you said, I think I might have to make it myself (NFS server for ARM). but it is hard to me. Honestly, I dont know where I can get a NFS server source code for ARM64.
There might be easier way to run NFS server than I build source code myself.
In conclustion. What I did
1> included NFS component in kerenl (CONFIG_NFSD, so on)
2> created /etc/exports file manually.
3> can not find any service refered to NFS (service --status-all)
4> verifyed NFSD status is OK (mount -t nfsd nfsd /proc/fs/nfsd)
What is returned when issuing:
Code:
$ showmount -e
on the system that is supposed to be providing the NFS service? You should see something like:
Code:
Export list for your-server-name:
local-mount-pt-1 allowed-host1,allowed-host2
local-mount-pt-2 allowed-host1,allowed-host2,allowed-host-3
.
.
.
etc.
Those values come from your /etc/exports file (minus any NFS options: 'ro', 'rw', etc.)
Without seeing your /etc/exports file, it's hard to tell what's going on. It could be due to a syntax error in that file. Can you post it?
on the system that is supposed to be providing the NFS service? You should see something like:
Code:
Export list for your-server-name:
local-mount-pt-1 allowed-host1,allowed-host2
local-mount-pt-2 allowed-host1,allowed-host2,allowed-host-3
.
.
.
etc.
Those values come from your /etc/exports file (minus any NFS options: 'ro', 'rw', etc.)
Without seeing your /etc/exports file, it's hard to tell what's going on. It could be due to a syntax error in that file. Can you post it?
My Root file system doen't support "showmount" command because That is based on Busybox.
And /etc/exprots file says below.
/test *(rw,no_root_squash,async)
Technically, All I want to know is run NFS Server on Embedded Linux base on Busybox.
this enviroment doen't support general command that is used in Ubuntu, Fedora so on.
this enviroment doen't support general command that is used in Ubuntu, Fedora so on.
According to your own output it appears to be running sysvinit init system, which used to be the default on many distros, and still is on some.
Please re-read my previous post.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.