Hello Frank> >Your initial idea was to mount a directory on your embedded system, which >is exported from your desktop PC. So of course you have to use the IP of >your desktop PC. Login to your embedded system with telnet, then use >something like > >mount -t nfs x:/opt/my_folder > >where "x" is the IP of your desktop PC, e.g. 192.168.1.42, not of your >embedded system and not your internet IP (which is not a local address,so>it don't start with 192.168). Make sure that /opt/my_folder and the IP of >your embedded system is in the /etc/exports file of your desktop PC. You >can read more about the format of the exports file in the NFS HOWTO. >I did as you hinted here in the forum and I did it in two steps as follows: 1.In the first step: In this I just edited the /etc/exports file and added the ip address of my client that is my embedded board and the path of the folder which I want to share as follows: /opt/my_folder 192.168.1.230(rw,sync,no_root_squash) and after saving it I logged in the embedded board via telnet and executed this command: # mount -t 192.168.1.230:/opt/my_folder and the command gets executed just giving the sign of pound next to it i.e. " # " which means that the terminal is ready to accept the next command . But where did it mount the filesystem as the path was not specified of the destination folder where it has to be mounted. So next time I commanded it having the destination folder as : # mount -t 192.168.1.230:/opt/my_folder /mnt/ where the /mnt/ folder is present on my embedded board , but it gives the following error: # mount -t 192.168.1.230:/opt/my_folder /mnt/ mount: cannot read /etc/fstab: No such file or directory ok did not get this point . So this was all my first step, now in the second step I did a little bit changes and than tried as follows: 2 . Second step of doing the same: I ran this command this time : # mount -t nfs -o nolock 192.168.1.230:/opt/my_folder /mnt/ and I get the same error previous error as follows: mount: RPC: Unable to receive; errno = Connection refused So with this it gave different error I am not able to get why it is so as I made all recommended changes. Ok one more thing I want to know is that is it possible to mount any filesystem through the NFS on my embedded board using the terminal of my embedded board by telnet. Thank you Piyush Pandey --------------------------------------- Posted through http://www.EmbeddedRelated.com
Accessing the embedded board via NFS
Started by ●February 6, 2011
Reply by ●February 7, 20112011-02-07
Reply by ●February 7, 20112011-02-07
piyushpandey wrote:> 1.In the first step: > > In this I just edited the /etc/exports file and added the ip address of my > client that is my embedded board and the path of the folder which I want to > share as follows: > > /opt/my_folder 192.168.1.230(rw,sync,no_root_squash)You have to restart the NFS service on your desktop Linux after editing /etc/exports.> So next time I commanded it having the destination folder as : > > # mount -t 192.168.1.230:/opt/my_folder /mnt/The command is wrong, you need to write this: mount -t nfs 192.168.1.230:/opt/my_folder /mnt But I guess it is wrong, because last time you wrote that 192.168.1.230 is the IP address of your embedded system. But you want to mount a directory of your desktop Linux onto your embedded system, so of course you have to provide the IP address of your desktop Linux.> I ran this command this time : > > # mount -t nfs -o nolock 192.168.1.230:/opt/my_folder /mnt/ > > and I get the same error previous error as follows: > > mount: RPC: Unable to receive; errno = Connection refusedOk, now the command was ok, but I don't think you need "-o nolock". Maybe next thing to do is to read the troubleshooting section of the NFS-HOWTO, after trying the right IP address :-) http://nfs.sourceforge.net/nfs-howto/> Ok one more thing I want to know is that is it possible to mount any > filesystem through the NFS on my embedded board using the terminal of my > embedded board by telnet.Yes, this is possible. -- Frank Buss, http://www.frank-buss.de piano and more: http://www.youtube.com/user/frankbuss
Reply by ●February 7, 20112011-02-07
Frank Buss wrote:> piyushpandey wrote: > >> 1.In the first step: >> >> In this I just edited the /etc/exports file and added the ip address of my >> client that is my embedded board and the path of the folder which I want to >> share as follows: >> >> /opt/my_folder 192.168.1.230(rw,sync,no_root_squash) > > You have to restart the NFS service on your desktop Linux after editing > /etc/exports. > >> So next time I commanded it having the destination folder as : >> >> # mount -t 192.168.1.230:/opt/my_folder /mnt/ > > The command is wrong, you need to write this: > > mount -t nfs 192.168.1.230:/opt/my_folder /mnt > > But I guess it is wrong, because last time you wrote that 192.168.1.230 is > the IP address of your embedded system. But you want to mount a directory > of your desktop Linux onto your embedded system, so of course you have to > provide the IP address of your desktop Linux. > >> I ran this command this time : >> >> # mount -t nfs -o nolock 192.168.1.230:/opt/my_folder /mnt/ >> >> and I get the same error previous error as follows: >> >> mount: RPC: Unable to receive; errno = Connection refused > > Ok, now the command was ok, but I don't think you need "-o nolock". Maybe > next thing to do is to read the troubleshooting section of the NFS-HOWTO, > after trying the right IP address :-) > > http://nfs.sourceforge.net/nfs-howto/ > >> Ok one more thing I want to know is that is it possible to mount any >> filesystem through the NFS on my embedded board using the terminal of my >> embedded board by telnet. > > Yes, this is possible. >I tend to use wireshark or tcpdump when debugging this type of thing, as it shows what's actually on the wire, but to repeat, you must use the server ip in the command line, not the client, if you are mounting from the client. ie, from the client: mount -t nfs server_ip_or_name:/directory client_path/directory If you use the server name, not ip address, then you also need en entry in the client /etc/hosts file as well... Regards, Chris
Reply by ●February 8, 20112011-02-08
Hey guys thanks to all finally I got success in executing the NFS command from my embedded board terminal and therefore now I can mount any directory on my embedded board of my Desktop system. But I want to know one thing Frank that when I execute this command: mount -t nfs 192.168.1.2:/opt/my_folder /mnt I didn't get any response , but when I execute this command : mount -t nfs -o nolock 192.168.1.2: /opt/my_folder /mnt I get successfully my folder mounted on the embedded board. So what is the reason for that. and this one for you chris : you told that you use wireshark or tcpdump , what are these things I mean are they different types of softwares to access NFS protocol or they are different type of protocol to access the embedded board from the Desktop. Well thanks once again guys......you were great helping hands to me. Thank you Piyush Pandey --------------------------------------- Posted through http://www.EmbeddedRelated.com
Reply by ●February 8, 20112011-02-08
piyushpandey wrote:> Hey guys thanks to all finally I got success in executing the NFS command > from my embedded board terminal and therefore now I can mount any directory > on my embedded board of my Desktop system. > > > But I want to know one thing Frank that when I execute this command: > > mount -t nfs 192.168.1.2:/opt/my_folder /mnt > > I didn't get any response , but when I execute this command : > > mount -t nfs -o nolock 192.168.1.2: /opt/my_folder /mnt > > > I get successfully my folder mounted on the embedded board. > > So what is the reason for that.ASssume the space bteween the jost name and path is intentional ?. That is wierd, though you could try: mount -t nfs -o nolock 192.168.1.2://opt/my_folder /mnt -----------------------------------^------------------- I think the nfs client I use on windows takes this syntax. Otherwise, haven't a clue, but nfs runs on a wide variety of unix, linux, windows and other systems. They all have odd corners in the implementation and some may only partially implement the protocol and command line syntax. Look at the man pages for the server and also the same for the flavour of linux running on your embedded board.> > > and this one for you chris : > > > you told that you use wireshark or tcpdump , what are these things I mean > are they different types of softwares to access NFS protocol or they are > different type of protocol to access the embedded board from the Desktop. >Wireshark is a free network diagnostic tool that runs on windows and iirc, os-x. You can selectively filter and trap any packets on the network and view contents. tcpdump runs on unix and was the diag tool many people used for decades before fancier stuff like wireshark. I think both use libpcap at the lower level, just that wireshark has a fancy gui interface and tcpdump is command line only. tcpdump is available for linux, but not part of the standard distribution, at least on suse, so you may need to go and find the package on the web. I keep an old p3 laptop just for network debugging, win2k bare bones install, wireshark, firefox and other utilities like netstumbler for wireless... Regards, Chris
Reply by ●February 8, 20112011-02-08
On 8.2.11 4:48 , ChrisQ wrote:> > Wireshark is a free network diagnostic tool that runs on windows and > iirc, os-x. You can selectively filter and trap any packets on the > network and view contents. tcpdump runs on unix and was the diag tool > many people used for decades before fancier stuff like wireshark. I > think both use libpcap at the lower level, just that wireshark has a > fancy gui interface and tcpdump is command line only. tcpdump is > available for linux, but not part of the standard distribution, at least > on suse, so you may need to go and find the package on the web.Wireshark runs natively on Linux, and on OS X using the X intermediate layer. -- Tauno Voipio tauno voipio (at) iki fi