| Author |
Message |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Thu 30 Jul 2009, 15:22 Post subject:
Implementing kernel mode NFS file sharing on Puppy |
|
This is a simple!! guide to setting up NFS file sharing on puppy using the kernel mode drivers.
Tested on puppy 4.12, 4.12 retro, 2.12 and 2.02..no additional dependancies should be required.
It is a manual process that requires a little familiarity with the linux and puppy file system so not suitable as a pet package but perhaps in the future a simple gui setup could be made along the lines of the one for pcurlftpfs included with puppy.
There are 2 parts ...the kernel modules and the software to run NFS.
If you are running puppy 2.xx you already have the modules (assuming zdrv is present in some cases)...skip part 1.
Puppy 3 may have the modules, new puppies are going to include as before.
1) For puppy 4.xx download and extract the appropriate archive to '/'.(the 2.6.25.16 modules are now a pet )
Then run 'depmod' in a terminal to register the added modules.
note...the retro modules are from an earlier puppy but load and run ok if the modprobe -f option is used.
2) Download and extract to '/' the 'common' archive.
3) Decide what you wish to share and add to or edit /etc/exports
for example
| Code: | | /mnt/hda2 192.168.1.3(rw,no_root_squash,no_subtree_check,sync) |
will share /mnt/hda2 with read/write permissions..ie full root access..probably ok for a home network but for something more cautious read up on other options .
http://nfs.sourceforge.net/nfs-howto/ar01s03.html is a good clear resource.
note...files within the unionfs cannot be shared..at least not with puppie's present kernel but 'home' can..use /initrd/mnt/dev_save.
To add machines just add an entry with its ip , space inbetween.
To grant access you must add machines to /etc/hosts.allow. A simple entry could be
| Code: | | ALL: 192.168.1.3 , 192.168.1.4 |
comma spaced and carriage return at the end.
Don't forget to include the server machine if you wish to test as a client on it.
4) Open a terminal to load the modules and start the server....these commands can be added to /etc/rc.d/rc.local for automatic running at boot time.
For the server
For the client
If all ok you will see the modules by running 'lsmod'
Then ....
for the server (and client)
if only a client machine run
| Code: | | /etc/rc.d/rc.portmap |
You should see some startup messages with no errors.Check in htop or top for running services or run
| Code: | | rpcinfo -p localhost |
to give a list of services ...use machine ip for remote check.
5) Mount your shared files from the client using something like
| Code: | | mount-FULL -t nfs 192.168.1.2:/mnt/hda2 /root/shares |
in this case we are mounting the shared /mnt/hda2 to a folder 'shares' created previously in /root to a server at 192.168.1.2
note that the busybox mount cannot handle NFS
The above could be done at start up or in a script.
| Code: | | umount-FULL 192.168.1.2:/mnt/hda2 |
to unmount (or use rox)
You can set up an NFS server on windows
winnfsd
http://sourceforge.net/projects/winnfsd
freeware and simple...drawback is will only share ntfs drives as it relies on the owner/group info it comes with (took me a while to sus that one).
haneWIN
http://www.hanewin.net/nfs-e.htm
Very easy to setup with control panel applet..only had to add the share .runs as a service automatically...will share any partition type.
Drawback shareware...but from the documentation it will keep running after the 30 days so for home use....This appears to be the case.
For either mounting is similar..note that syntax for mounting say d:\ from 192.168.1.2 is 192.168.1.2:\d (no trailing slash and case matters) otherwise the same rules apply.
mike
edit----now have proper modules for the retro 2.6.21.7 kernel
 |
| Description |
Update...modules specifically compiled for the retro puppy thanks to Patriot...--force no longer needed
|

Download |
| Filename |
nfsd-k2.6.21.7-i486.pet |
| Filesize |
228.5 KB |
| Downloaded |
655 Time(s) |
| Description |
Common files for nfs .. install for any puppy
|

Download |
| Filename |
nfs_common.tar.gz |
| Filesize |
152.78 KB |
| Downloaded |
1065 Time(s) |
| Description |
Nfs kernel modules for standard puppy 4.xx...click to instal
|

Download |
| Filename |
NFS-modules-k2.6.25.16.pet |
| Filesize |
226.5 KB |
| Downloaded |
796 Time(s) |
Last edited by mikeb on Wed 13 Jan 2010, 21:29; edited 1 time in total
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: Thu 30 Jul 2009, 16:10 Post subject:
|
|
Not suitable for woof then?
_________________ Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Thu 30 Jul 2009, 16:34 Post subject:
|
|
Ok here are some updates courtesy of Patriot :0
I have posted them separately as the start up scripts are only in my common package above so these could be added afterwards if the update is needed. As far as I know this has nfs 4 support which I believe can handle mixed types of filesystem shares amongst other this so may be useful to some
mike
| Description |
Common tools with nfs4 support
|

Download |
| Filename |
nfs-utils-1.2.1-i486.pet |
| Filesize |
188.45 KB |
| Downloaded |
676 Time(s) |
Last edited by mikeb on Wed 13 Jan 2010, 21:33; edited 1 time in total
|
|
Back to top
|
|
 |
DC

Joined: 30 Apr 2006 Posts: 337 Location: Maidenhead, England
|
Posted: Thu 30 Jul 2009, 17:50 Post subject:
|
|
Hi Mike,
Thanks very much, Works very well.
I tried it between two copies of Puppy 4.21
Alough it might be obvious that a mounted remote drive works the same as a local drive it still feels like applied magic
all normal fuctions seem to work i.e command prompt, pfind etc
And my next problem
I could not get it to run under SMP Puppy 4.20 as a client
Did you complie the nfs modules for 2.6.25.16 ?
If you did could I get a copies to try compling them for SMP.
Thanks again
DC
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Thu 30 Jul 2009, 19:42 Post subject:
|
|
Oh good.
No tempestuous did...thee efficient star.
Are the nfs modules definately not there ie can you modprobe nfs/nfsd ?
Otherwise whoever compiled that kernel would be the one to approach...I did try one of the smp versions recently and remember seeing the modules...
puppy-k26291smp-4.2.iso
(said he..cannot mount the sfs from here to double check )
mike
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Fri 31 Jul 2009, 07:39 Post subject:
|
|
Ok Beem I give in..where do I get woof from?
mike
|
|
Back to top
|
|
 |
Patriot

Joined: 15 Jan 2009 Posts: 734
|
Posted: Sat 12 Dec 2009, 23:30 Post subject:
|
|
Hmmm .....
I have a need for NFS server recently for whacking some old routers and your super simple guide here has helped save me a bunch of time .....
Anyway, I'm still on k2.6.21.7 mostly ... A whole bunch of modules are missing (not just the nfs ones. BTW, I just noticed there's an ext4 DEV module in there ... maybe I'll take a peek at it one of these days to see if ext4 can be backported) ... I was able to pinpoint all the required modules (based on your super simple guide here) and compile them quickly ... I've also done the latest nfs-utils-1.2.1 (Nov'09) which seems to have removed a few binaries ... Give me a holler if you'd like try these new ones .....
Thanks to your super simple guide here I could get the NFS server up and running in minimum time ..... though honestly, I'm more comfortable with samba shares ...
Rgds
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Sun 13 Dec 2009, 11:35 Post subject:
|
|
Oh kool.....well I do like the simplicity of NFS.
I just got the NFS client working from windows via microsofts own UNIX package. Although its huge you can selectively install just the client or client and server of which the core is a handful of small binaries...I could make a reduced set of just whats needed and reg files but MS might object . The control applet is larger and does not work if Internet Explorer is removed (but mshta is a major security hole anyway) but everything can be setup via the cmd console anyway.) It runs as a service and connected itself without any fiddling! I'm still trying to understand their authentication mechanism but can map a network drive anonymously read only which gives transparent explorer access and streaming media...something which ftp netdrive could not. Indeed again its simpler than samba and pretty much unknown to hackers and such.
Basically free file networking linux to linux to windows
I use internet/ipp printing for that side.
The modules for 2.6.21 where hijacked from puppy 2.17 and have to be loaded by -f. If you have a proper set would you mind uploading them here to complete the set. I believe newer puppies now include the full set again. And the updated utilities perhaps
I'm not sure what the rush is with ext4 since it has no significant benefits to normal systems for some time to come but hey...
Thanks for your input and glad my distructions worked
mike
|
|
Back to top
|
|
 |
DC

Joined: 30 Apr 2006 Posts: 337 Location: Maidenhead, England
|
Posted: Fri 01 Jan 2010, 18:11 Post subject:
|
|
As requested for the above
these are howto's I wrote for myself to remind me when doing a new install.
this is for kernal 2.6.25.16. (puppy 4.2, 4.21 etc)
obviously change things to suit
First the server;
# install
NFS-modules-k2.6.25.16.pet
# then the command (to register modules)
depmod
# extract to /
nfs_common.tar.gz
# make a file
/etc/exports
# containing - /root (what's shared) 192.60.26.9(rw...) (client allowed share)
/root 192.60.26.9(rw,no_root_squash,no_subtree_check,sync)
# edit
/etc/host.allow
# adding (dont forget comma spaced and carriage return)
ALL: 192.60.26.9 , 192.60.26.10
# add these to /etc/rc.d/rc.local
modprobe nfsd
/etc/rc.d/rc.nfsd start
# to check if nfs is running
rpcinfo -p localhost
And the client;
# make a dir on client
/mnt/dc_server
# install
NFS-modules-k2.6.25.16.pet
# extract to /
nfs_common.tar.gz
# edit
/etc/host.allow
# adding (dont forget comma spaced and a carriage return)
ALL: 192.60.26.9 , 192.60.26.10
# add these to /etc/rc.d/rc.local
modprobe nfs
/etc/rc.d/rc.portmap start
# to check if nfs is running
rpcinfo -p localhost
# script in (this allows time for ip address to come up before mounting)
/root/startup/DCmount_nfs.sh
## poll interface eth0
while [ -z "`ifconfig | grep 'eth0'`" ]
do
sleep 3
done
mount-FULL -t nfs 192.60.26.10:/root /mnt/dc_server
Finally;
For later kernals (puppy 4.3, 4.31) just leave out the "NFS-modules-k2.6.25.16.pet" as the builds have the NFS modules enabled.
Hope it all makes sense
DC
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Fri 01 Jan 2010, 18:58 Post subject:
|
|
Thanks DC
well a step by step 'what I did from start to finish' is good...it's easy to focus on the nitty gritty and forget the 'not always obvious'.
| Quote: | | For later kernals (puppy 4.3, 4.31) just leave out the "NFS-modules-k2.6.25.16.pet" as the builds have the NFS modules enabled. |
puppy 4.00 to 4.21 were the ones lacking the full set as far as I know.
I read that the client can be done with only nfs in a more basic fashion but its not recommended for file safety reasons.
regards
mike
|
|
Back to top
|
|
 |
mrd
Joined: 27 Nov 2007 Posts: 125
|
Posted: Sat 09 Jan 2010, 02:25 Post subject:
|
|
Nothing ruins my evening more than stupid problems like this.
I'm trying to run MacPup Foxy 3 which is supposedly based on puppy 4.31.1 and booting from the live CD I can nfs mount my network share with no problems and nothing more than the standard puppy mount-Full -t nfs -o rw,nolock 10.10.55.201:/MRD_FILES /mnt
This will not work once the install is done in a lin n win config. Everything else works fine, but when I try to mount I get "mount: RPC: Program not registered"
I can load the nfs modules by hand and see them loaded with lsmod and I can add the nfs_common.tar files and still have the same results.
I've had a long week and really just want this to work. I also tried to copy the other random looking z098098098234.sfs file off of the iso in case that was needed, but no luck there either.
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Sat 09 Jan 2010, 09:19 Post subject:
|
|
So sunrpc loaded?
Pretty sure the nfs modules should get included with a full install...maybe a depmod needed but unlikely.
Is
/etc/rc.d/rc.portmap start
still being run?
I usually have this in /etc/rc.d/rc.local (this gets cleared with an install and client will not run without it.
Also check yer /etc/exports and other files in /etc still are still correct and present...again install uses a pristine /etc folder.
regards mike
|
|
Back to top
|
|
 |
mrd
Joined: 27 Nov 2007 Posts: 125
|
Posted: Sat 09 Jan 2010, 18:35 Post subject:
|
|
Something worked! But I'm not sure what because it seems like the /etc/files are the same as with the LiveCD...
Thanks for the help!
|
|
Back to top
|
|
 |
mikeb

Joined: 23 Nov 2006 Posts: 4378
|
Posted: Sat 09 Jan 2010, 20:47 Post subject:
|
|
I wonder...perhaps your shared folder was not mounted...takes a couple of goes for me
well anyway glad its working ok
mike
|
|
Back to top
|
|
 |
mhanifpriatama
Joined: 22 Jan 2011 Posts: 59
|
Posted: Mon 24 Jan 2011, 06:45 Post subject:
|
|
Is there someone who has managed to use nfs with Lucid puppy? It has different kernel.
|
|
Back to top
|
|
 |
|