HOW-TO mount a NFS share in Puppy

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
DreamsToGo
Posts: 118
Joined: Fri 27 Jan 2006, 08:28
Location: Castelnaudary, south France, World Capital of Cassoulet

HOW-TO mount a NFS share in Puppy

#1 Post by DreamsToGo »

Please note this applies to TeenPUP

It might apply to other Puppies - I haven't tested them.


Scenario; you have a linux based server on which there are files you want to be able to access from other linux machine on your network. You have set up the server to share the files. You have a Puppy Linux based client machine.

How do you set up Puppy to act as a client using the NFS file sharing protocol?

This how-to should help you.

First, you should know that NFS (Network File Service) was developed to share files in a linux based network, ie the server and client run linux of some flavour or another. It was not designed to share files on a mixed Windows/Linux network.

Second, you have set up the server to share the directory you want. If you use Ubuntu, it's easy, see the Ubuntu help for this.

Third, you should know that file systems are 'mounted' in Linux and that the 'mount' command does this.

Now Puppy is slightly different from now on,

- it has replaced the standard linux command set with one supplied by BusyBox. Busybox is smaller than the standard command set but has sacrificed some command functionality. One of the crippled commands delivered by Busybox is the 'mount' command; you can't use it to mount a NFS share.

- to over come this the Puppy developers have supplied a command called mount-FULL which is capable of mounting NFS shares.

There are two ways to mount a NFS share in Puppy,

- one off using the command mount-FULL from a command line or terminal window
- permanently so that the share is available at every boot automatically.

USING THE mount-FULL COMMAND

The 'mount-FULL' command looks like this for a nfs mount

mount-FULL -t nfs 192.168.0.1:/home/hilary/MyMusic /root/HBW

where

-t specifies the type of mount, in this case nfs
192.168.0.1:/the shared/directory on the server = the server IP and the directory to mount, something like /home/yourname/MyMusic
/root/HBW = the directory on the client that maps to the server. When mounted if you use roxx and point it to this directory you actually see the contents of the server and you can treat it as if it was on your local machine.

Please note that the directory on the client must exist before you issue the mount-FULL command.

Please note that if this directory contains local files, they will not be visible after the mount-FULL command has executed.

This command will mount the nfs share with the default options - see mount manual for more information on options.

MAKING THE SHARE AVAILABLE AT EVERY BOOT.

In a 'normal' linux distro, files systems are mounted at boot time when the kernel reads a file called /etc/fstab. Have a look at it but don't change anything in it on a Puppy install because Puppy does not use it to mount nfs shares.

Instead change your /etc/rc.d/rc.local file to add the mount-FULL command line as above. Puupy uses the rc.local file at boot time in order to customise the boot process. I use the following command in my rc.local file,

mount-FULL -t nfs -o ro,nolock 192.168.0.1:/home/hilary/MyMusic /root/HBW

where the parameters have exactly the same meaning as above. As you can see I have mounted my shared music directory on the Puppy client in order to listen to music while I work. I have included some options,

-o = the options parameter and ro = read only (I don't want the client to be able to change anything on the server), nolock = no file locking (speeds things up a bit).

I hope you find this how-to helpful. Let me know if it can be improved in any way.
Last edited by DreamsToGo on Thu 13 Mar 2008, 15:05, edited 1 time in total.
User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#2 Post by HairyWill »

Thanks Hilary
That seems like a very clear explanation. I'm almost tempted to setup an nfs server just to test it.
raffy
Posts: 4798
Joined: Wed 25 May 2005, 12:20
Location: Manila

willing

#3 Post by raffy »

And I will be a willing tester. :)
User avatar
john biles
Posts: 1458
Joined: Sun 17 Sep 2006, 14:05
Location: Australia
Contact:

#4 Post by john biles »

Hello DreamsToGo,
Well done, this will help alot of user!
Legacy OS 2017 has been released.
MrArne
Posts: 15
Joined: Tue 17 Jun 2008, 20:48
Location: Nacka, Sweden

#5 Post by MrArne »

Hi,
Just a little while ago, I searched for this thread and stumbled over a tip from HairyWill regarding Pnethhood, which was really plug-and-play. I have got this to work in Puppy 4.00, but only when running the command from rxvt, the line added in /etc/rc.d/rc.local seem to need a time-out or something, what do I know...? This is my command line:
# mount-FULL -t nfs -o rw,nolock 192.168.1.200:/shares/mss-hdd/Public /mnt/public
As mentioned, the command works really well used in the terminal. I'm a bit NFS romantic, so it would be nice if it was possible to get it working...

Cheers

Ola
Puppy 4.10 Dingo - no sugar added - but maybe a little piece of fat-free...?
User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#6 Post by HairyWill »

The network setup is run in the background. You cannot guarantee that networking is up when rc.local starts.

One solution would be to block in rc.local and wait for the network.

Another solution might be to put a script to do the mount into /root/Startup. Anything in this directory that is executable will get run after X starts. Quite often this allows enough time for the networking to start though it is not guaranteed.

You could combine the two ideas and make the script in /root/Startup wait for networking.

caveat:I'm not sure that the /root/Startup stuff applies to TeenPup.
MrArne
Posts: 15
Joined: Tue 17 Jun 2008, 20:48
Location: Nacka, Sweden

#7 Post by MrArne »

Hi,
Thanks a lot for the tip! The command I mentioned above in combination with 'sleep 15' set on the line before in a text file makes it go perfect. Although the pnethood alternative that we discussed in another thread is very attractive (and ideal if running from CD without pup_save file), I prefer this one on my frugal install since I get it automated on boot. Think how easy things are when knowing how to do...! :D

Cheers
Ola
Puppy 4.10 Dingo - no sugar added - but maybe a little piece of fat-free...?
User avatar
dinky
Posts: 699
Joined: Sat 19 Jan 2008, 23:39

#8 Post by dinky »

Thanks for the great tutorial! Have set up My Ubuntu box as the server, and am trying to network my puppy laptop to it...

Here is my command:

Code: Select all

mount-FULL -t nfs 192.168.0.4:/home/curious/Documents /root/Desktop/share
I'm getting this error message:

Code: Select all

mount: unknown filesystem type 'nfs'
Any idea what I'm doing wrong? I'm running eeetiger, which is based on Puppy 3.01. Cheers!
~dinky
User avatar
dinky
Posts: 699
Joined: Sat 19 Jan 2008, 23:39

#9 Post by dinky »

bump
newbie314
Posts: 127
Joined: Tue 19 Aug 2008, 05:35

#10 Post by newbie314 »

I have my script for mounting an XP drive do a while do loop to check that the IP of my computer is up. I use static so I know the valid address. I originally did a wait for 10sec, but I wanted to do the event driven case not the delay case (kind of an old rule in programming class).
HairyWill wrote:The network setup is run in the background. You cannot guarantee that networking is up when rc.local starts.

One solution would be to block in rc.local and wait for the network.

Another solution might be to put a script to do the mount into /root/Startup. Anything in this directory that is executable will get run after X starts. Quite often this allows enough time for the networking to start though it is not guaranteed.

You could combine the two ideas and make the script in /root/Startup wait for networking.

caveat:I'm not sure that the /root/Startup stuff applies to TeenPup.
MrArne
Posts: 15
Joined: Tue 17 Jun 2008, 20:48
Location: Nacka, Sweden

#11 Post by MrArne »

Hi,
I find dinky's problem described above very odd - I uninstalled my Dingo that got the successful mount script described above, so I couldn't check it out, but now when I again installed Dingo on another machine (frugal and pupsave file), I get the same error message although I just repeated the command above (after adding /mnt/public in the file structure). I just don't get what I did to get it working last time...

BUT: in my research I found a thread about similar issues
http://www.murga-linux.com/puppy/viewtopic.php?t=27989
and after analyzing this I went to my bootmanager and added the kernel module 'nfs' to the list of modules to start. This didn't solve the problem, but an icon called 'File-sharing' suddenly showed up in the home folder... when clicking on this, a little network scanner similar to pnethood showed up, scanned my network, found the share and I logged into it and got it mounted - and it is still there after reboot too... Very nice tool, but the question remains; why doesn't the mount-FULL command work any longer? Very strange indeed... I somewhat wonder if I am watched by some sort of Update Manager... :wink:
Puppy 4.10 Dingo - no sugar added - but maybe a little piece of fat-free...?
User avatar
dinky
Posts: 699
Joined: Sat 19 Jan 2008, 23:39

#12 Post by dinky »

Echo above post... would also like to sort out the mount-FULL command, but more interested in getting the share going. Sould someone help me? Using Puppy 4 I found the same thing... once nfs was loaded, lovely little tool available as dscribed above. I think I'm having problems networking my Ubuntu server... have set up everything as above, and as described here: http://ubuntuforums.org/showthread.php?t=249889

Using this command:

Code: Select all

mount-FULL -t nfs 192.168.0.4:/home/curious/Documents /root/Desktop/share
Gives me this back:

Code: Select all

mount: RPC: Program not registered
So that didn't work. I think the above gui tool would have, but unfortunately I think my Ubuntu server isn't configured correctly, I can't see my share at all. Thanks.
Can someone please give me a hand? Thanks
~dinky
MrArne
Posts: 15
Joined: Tue 17 Jun 2008, 20:48
Location: Nacka, Sweden

#13 Post by MrArne »

Good evening,
I suddenly felt a little bit curious, so when I made a major file copy over my LAN I got the idea to run top in a terminal, to see whats going on... and our dear new explored widget is indeed a sort of ftp application, see attached screen dump crop...! And what more is, I discovered the icon "File-sharing" in the root folder of a Fat-free Puppy install on another machine here at home, and on that machine I haven't probed the nfs module... so this app has nothing to do with the nfs function really.

Dinky, I googled on your error message, and there is a lot of threads and conversations about it, as for instance:
http://ubuntuforums.org/showthread.php?t=78100
and here is a question I adressed when trying to get my NFS share going on a little NAS (the little one I suddenly can't reach now from Puppy, but an ubuntu client can...)
http://www.openmss.org/forum/viewtopic.php?f=2&t=684

Another thing that might help you (I believe you have a specific problem on the server side); have you analyzed the responses in the ubuntuforum thread you linked to? I saw someone who raised an issue about userid-s etc, and that could also be something to check. I will keep on exploring my situation here and so we can see if we make any success...?

regards
Ola
Attachments
top_curlftps.png
(13.31 KiB) Downloaded 1129 times
Puppy 4.10 Dingo - no sugar added - but maybe a little piece of fat-free...?
Stormson5150
Posts: 40
Joined: Fri 06 Feb 2009, 16:00

Really remote...

#14 Post by Stormson5150 »

Very helpfull info all, thank you...

But does anyone know if this can be used to mount external addresses that are username/password protected?

I've got one of those online storage places (getting into the whole cloud thing), and would like to mount sub.domain.com to /mnt/nfs/1... thing is, NFS wont ask for UN/PW on its own, It just returns "permission denied", and if I try username:password@sub.domain.com it returns "can't locate server" or something along those lines...And to make it worse all the info I can find online seems to be conflicted as to weather or not NFS is even ABLE to do this...

As an aside, I would LIKE to use NFS for its speed, but if that is imposable what about WebDav? I can't seem to find any info about that for puppy either?

Thanx for any help you guys can give me :)
jagp
Posts: 3
Joined: Mon 15 Mar 2010, 13:27

Can't copy inside an a NFS share

#15 Post by jagp »

I am using Puppy Linux and was able to mount a NFS drive in order to access a snapserver (its operationg system is Linux) that is also shared by a number of machines (including windows based ones).

Everything is working fine - including reading and writing of files using my Puppy Linux terminal - except fot the fact that I cannot copy (or write with another name) any file located in the snapserver.

It may have something to do with permissions, but I am not familiar enough with Linux to setup the right option to enable copy.

Can anyone help me?
Post Reply