WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: NFS , one more time  (Read 8910 times)

Offline A Guy

  • Newbie
  • *
  • Posts: 25
NFS , one more time
« on: July 26, 2019, 07:27:39 AM »
So I am searching through stuff on NFS, but much of it is old, or relates to tinycore.
I am working with dCore x86_64.
What I have found on dcore was some mention between using some "native nfs" in busybox vs loading the debian nfs-client package.

I have have a dcore pxe boot, in which I would like to add the very minimal for nfs client activity.

Can I unpack and insert the .tcz stuff into the core.gz file?
Tony M.
Embedded Software and BIOS Engineer

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: NFS , one more time
« Reply #1 on: July 26, 2019, 06:55:24 PM »
Hi Tony.  I have used Busybox mount to acces NFS shares that are on another dCore-bionic machine.  My desktop client does not have nfs-common or nfs-kernel-server installed as packages.  On the server side with dCore-bionic, I did:

Code: [Select]
sce-import nfs-kernel-server
sce-import filesystems-4.14.10-tinycore

Substitute the filesystems-4.14.10-tinycore with whatever version that is required.  Then, the below is my /etc/exports file on the dCore-bionic server to share /usr/bin as a test.

Code: [Select]
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
/usr/bin     192.168.0.*(fsid=0,rw,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#

This is of course if the network is 192.168.0.*. 

On the server if dCore, the following commands start the NFS server:

Code: [Select]
/etc/init.d/rpcbind start
/etc/init.d/nfs-kernel-server start

Then I do not import anything on the client, there are no NFS related packages on it, just Busybox. Then I do the below:

Code: [Select]
sudo sh
mkdir /tmp/1
busybox mount -o nolock 192.168.0.7:/usr/bin/ /tmp/1

That is, if the server's address is 192.168.0.7, of course. 

The mount package from Debian/Ubuntu is in dCore base for boot performance reasons, hence the need to specify

Code: [Select]
busybox mount

on the command line. 

Or one can append "/bb" to the front of their PATH.

If you want to mount an NFS share as a user and not root, enter the below in /etc/fstab to do the above as a user:

Code: [Select]
192.168.0.7:/usr/bin /tmp/1 nfs rw,noauto,user 0 0

Then use the command:

Code: [Select]
busybox mount -o nolock /tmp/1


Let me know how Busybox works with NFS mounts.
« Last Edit: July 26, 2019, 08:31:33 PM by Jason W »

Offline A Guy

  • Newbie
  • *
  • Posts: 25
Re: NFS , one more time
« Reply #2 on: July 29, 2019, 05:25:48 AM »
aaahh...thats the piece I was missing, having to specify busybox for it's mount option as opposed to the one in that path.

$ busybox mount -o nolock server localpath

I already had the nfs (a large NAS) , I just needed an easy way to link to it.

Now I need to look at what problems may occur from having locking disabled, but I got almost all the pieces.

Thanks
Tony M.
Embedded Software and BIOS Engineer

Offline A Guy

  • Newbie
  • *
  • Posts: 25
Re: NFS , one more time
« Reply #3 on: July 29, 2019, 05:36:28 AM »
How do we submit changes to the Wiki? Nothing in the FAQ here.
http://wiki.tinycorelinux.net/dcore:server_applications

This page could use a one page explanation for using the busybox nfs client . Just a little more flesh

Obviously another section including the nfs server as well.

Tony M.
Embedded Software and BIOS Engineer

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11178
Re: NFS , one more time
« Reply #4 on: July 29, 2019, 06:22:42 AM »
Hi A Guy
How do we submit changes to the Wiki? ...
The  username  and  password  you use to login to this forum will allow you to login to the Wiki to make changes.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: NFS , one more time
« Reply #5 on: July 30, 2019, 01:55:11 PM »
I created a README for using NFS on dCore.  View it with the below in x86 or x86_64 dCore ports, either

Code: [Select]
readme.sh

and then choose nfs.  Or the following command:

Code: [Select]
readme.sh nfs

But a wiki entry would be great. 

http://tinycorelinux.net/dCore/x86_64/README/README-nfs.txt

Offline A Guy

  • Newbie
  • *
  • Posts: 25
Re: NFS , one more time
« Reply #6 on: July 31, 2019, 01:42:31 PM »
I created a NFS Client Wiki entry already.
Tony M.
Embedded Software and BIOS Engineer

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: NFS , one more time
« Reply #7 on: July 31, 2019, 02:55:05 PM »
Thank you Tony, I didn't see it before my last post.