LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This 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


Reply
  Search this Thread
Old 06-27-2022, 11:27 PM   #1
nekarose
LQ Newbie
 
Registered: Jun 2022
Posts: 5

Rep: Reputation: 0
Question 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.

Last edited by nekarose; 06-28-2022 at 02:05 AM.
 
Old 06-28-2022, 12:23 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
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
 
Old 06-28-2022, 12:47 AM   #3
nekarose
LQ Newbie
 
Registered: Jun 2022
Posts: 5

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by pan64 View Post
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?
 
Old 06-28-2022, 01:00 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

Rep: Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321Reputation: 7321
Quote:
Originally Posted by nekarose View Post
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 View Post
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).

You got some answer here: https://community.nxp.com/t5/Layersc...db/td-p/916365
and probably this is useful too: https://community.nxp.com/t5/i-MX-Pr...t/ta-p/1105526

Last edited by pan64; 06-28-2022 at 01:02 AM.
 
Old 06-28-2022, 01:33 AM   #5
nekarose
LQ Newbie
 
Registered: Jun 2022
Posts: 5

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by pan64 View Post
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).

You got some answer here: https://community.nxp.com/t5/Layersc...db/td-p/916365
and probably this is useful too: https://community.nxp.com/t5/i-MX-Pr...t/ta-p/1105526
"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)
 
Old 06-28-2022, 03:39 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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
 
Old 06-29-2022, 02:46 AM   #7
nekarose
LQ Newbie
 
Registered: Jun 2022
Posts: 5

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by ondoho View Post
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?
 
Old 06-29-2022, 02:55 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by nekarose View Post
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)?

FWIW, I set up mine thusly, more or less, with minor adaptations:
https://www.vultr.com/docs/setup-nfs-share-on-debian
https://wiki.archlinux.org/index.php/NFS
Both my systems run systemd, not sysvinit.
 
Old 06-29-2022, 03:28 AM   #9
rnturn
Senior Member
 
Registered: Jan 2003
Location: Illinois (SW Chicago 'burbs)
Distribution: openSUSE, Raspbian, Slackware. Previous: MacOS, Red Hat, Coherent, Consensys SVR4.2, Tru64, Solaris
Posts: 2,803

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by nekarose View Post
"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?
 
Old 07-01-2022, 12:50 AM   #10
nekarose
LQ Newbie
 
Registered: Jun 2022
Posts: 5

Original Poster
Rep: Reputation: 0
Question

Quote:
Originally Posted by rnturn View Post
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?
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.
 
Old 07-01-2022, 01:28 AM   #11
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by nekarose View Post
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.

Can you not install any software?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Timesys and NXP partner on BSP maintenance service for embedded Linux LXer Syndicated Linux News 0 06-01-2020 09:15 PM
to check the lsdk version on which the hostapd for EAP SIM and EAP AKA support d.vivek_88@yahoo.co.in Linux - Software 1 03-19-2014 09:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration