Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Why my NFS not work

Altera_Forum
Honored Contributor II
1,183 Views

I creat a Nios II Linux application project and want to run it in cyclone1c20 borad through NFS.  

I use command mount -t nfs 192.168.0.7:/mnt/nfs /mnt/nfs -n 192.168.0.7 is my Linux host IP .But my NFS not work rightly . The information tell me time out ,why?
0 Kudos
9 Replies
Altera_Forum
Honored Contributor II
427 Views

You have to make sure you have allowed access to your nfs directory on the host machine by specifying it in /etc/exports. 

 

Normally you export a different directory other than /mnt/nfs. 

 

If you want to export /home/user from your host machine and your nios2 IP address is "w.x.y.z", then try the following in etc exports. 

 

/home/user w.x.y.z(rw,no_root_squash) 

 

 

You then might have to restart the nfs server on your host machine. 

 

On the nios2, try using the following line in your /etc/rc script, or manually type it in after logging in. 

 

/bin/mount -t nfs 192.168.0.7:/home/user /mnt/nfs -n -o nolock & 

 

 

Hopefully this helps.
0 Kudos
Altera_Forum
Honored Contributor II
427 Views

I do it as you tell me ,but my NFS still not work ,why? 

The Nios information as follows:# nfs warning :mount version older than Kernel# NFS: NFSv3 not supported# mount:PRC:Time out
0 Kudos
Altera_Forum
Honored Contributor II
427 Views

Hi su-30mk, 

 

> The Nios information as follows: 

># nfs warning :mount version older than Kernel 

># NFS: NFSv3 not supported 

># mount:PRC:Time out 

 

This looks like portmap is not running. Make sure you 

have RPC and the portmapper started prior to running 

the mount. 

 

Regards, 

--Scott 

 

BTW: if you need to do simple NFS testing (file download), you 

can use the u-boot boot monitor.
0 Kudos
Altera_Forum
Honored Contributor II
427 Views

You said portmap is not running.What can i do?Can you give me some example and tell me how let portmap runing,thank you very much.

0 Kudos
Altera_Forum
Honored Contributor II
427 Views

also make sure NFS is enabled in your kernel configuration.

0 Kudos
Altera_Forum
Honored Contributor II
427 Views

Hi su-30mk, 

 

> an you give me some example and tell me how let portmap runing 

 

You can simply enter the command: 

 

$ portmap 

 

I haven't used NFS with the Nios-II uClinux yet. I'm assuming that it 

is indeed available with the other network apps (it should be if the 

nfs server is available). 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
427 Views

Yes i do it ,but system not support portmap

0 Kudos
Altera_Forum
Honored Contributor II
427 Views

> but system not support portmap 

 

You can try building portmap using the sources from uClinux.org. 

 

Regards, 

--Scott
0 Kudos
Altera_Forum
Honored Contributor II
427 Views

I have a related problem. I have a uKit board with a Cyclone running uClinux. 

 

I am using the configuration stated in the first reply: 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

/bin/mount -t nfs 192.168.0.7:/home/user /mnt/nfs -n -o nolock &[/b] 

--- Quote End ---  

 

 

When I run this, I get the warning: 

 

<div class='quotetop'>QUOTE </div> 

--- Quote Start ---  

# nfs warning :mount version older than Kernel[/b] 

--- Quote End ---  

 

 

I am able to browse through the mounted directory to a point, but if I try to copy "cp" anything from the /mnt/nfs over to my ramdisk at /tmp, then it hangs with no error messages. This also occurs if I try to run something directly from the nfs mounted directory. 

 

My kernel that is on my host machine is older, it is a 2.4.20 kernel. I&#39;m guessing that is why I get the warning. However, should this really be a problem? 

 

I am hoping that I can use nfs to speed up my development cycle, but so far it hasn&#39;t worked out for me. 

 

Does anyone have any ideas on why it would be unstable?
0 Kudos
Reply