User Tools

Site Tools


vmware.png nfs.png tftp.png subversion.png eclipse.png logo.png tutorial.png

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:general_information:nfs [2015/08/17 17:12]
127.0.0.1 external edit
en:general_information:nfs [2018/03/22 17:57] (current)
liedmann reworked
Line 1: Line 1:
 +~~NOTOC~~
 ====== NFS server ====== ====== NFS server ======
-===== Used version ​===== +===== Tested with the following operating systems ​===== 
-  * Ubuntu 10.04 x86 in vmware player +  * Ubuntu 10.04 x86 in VMware Player 
-  * Ubuntu 12.04 x86 in vmware player+  * Ubuntu 12.04 x86 in VMware Player 
 +  * Ubuntu 14.04 x86_64 in VMware Player 
 +  * Ubuntu 16.04 x86_64 in VMware Player
 ===== Installation ===== ===== Installation =====
 +\\
 <code bash> <code bash>
 user@ubuntu:​~$ sudo apt-get install nfs-kernel-server user@ubuntu:​~$ sudo apt-get install nfs-kernel-server
 +</​code>​
 +\\
 +----
 +===== Example Configuration for NFS boot =====
 +\\
 +Create a directory on the host root filesystem.
 +<code bash>
 +user@ubuntu:​~$ sudo mkdir /nfs
 +user@ubuntu:​~$ sudo chmod 777 /nfs
 </​code>​ </​code>​
  
-===== Configuration ===== +Extract the content of root.tgz to your nfs directory.\\ 
-To access rootfs via NFS the following line must be added to the file ''/​etc/​exports''​.+root.tgz is located in: 
 +  * BSP download archive provided by TQ-Systems e.g. (TQMxx.BSP.SW.BIN.xxxx.tgz\TQMxx.BSP.SW.BIN.xxxx.tar\root.tgz) 
 +  * After building ​the BSP sources with PTXdist e.g. (../​TQMxx-BSP-REV.xxxx/​platform-MBxx/​images/​root.tgz) 
 +<code bash> 
 +user@ubuntu:​~$ cd /nfs 
 +user@ubuntu:​~$ sudo tar -xvf ~/​workspace/​TQMaxx-BSP-REV.xxxx/​platform-MBaxx/​images/​root.tgz 
 +</​code>​ 
 + 
 +Next step is to configure ​the ''/​etc/​exports'' ​file. 
 +Create an entry that contains the path to your nfs folder created above. 
 <​code>​ <​code>​
-<Rootfs ​path on host system>       <​permitted IPs>/<​subnet>​(<​comma separated options>​)+<path/​to/​your/​nfs/​directory>       <​permitted IPs>/<​subnet>​(<​comma separated options>​)
 </​code>​ </​code>​
-For example+ 
 +++++For example|
 <​code>​ <​code>​
-/opt/​eldk-4.2/​ppc_4xx ​              192.168.0.0/​255.255.0.0(rw,​no_root_squash,​async,​no_subtree_check)+/nfs             192.168.0.0/​255.255.0.0(rw,​no_root_squash,​async,​no_subtree_check)
 </​code>​ </​code>​
- +++++ 
-This path must match the variable ''​rootpath'' ​of the U-Boot ​on the target. This variable is added to the boot parameter ''​nfsroot='' ​and defines the source for the NFS rootfs.+<WRAP round important>​ 
 +This path must match the U-Boot environment ​variable ''​rootpath''​ on the target and defines the source for the NFS rootfs. 
 +</​WRAP>​
  
 <WRAP round info> <WRAP round info>
-After this file was changed ​the NFS server ​should ​be restarted:+After the /​etc/​exports ​file was modified ​the NFS server ​need to be restarted:
 <code bash> <code bash>
 user@ubuntu:​~$ sudo service nfs-kernel-server restart user@ubuntu:​~$ sudo service nfs-kernel-server restart
 </​code>​ </​code>​
 </​WRAP>​ </​WRAP>​
 +----
 ===== Test the configuration ===== ===== Test the configuration =====
-With the command ''​showmount''​ you can see the exported directories ​if the NFS client programs (''​sudo apt-get install nfs-common''​) are installed on the system.+\\ 
 +With the command ''​showmount''​ you can see the exported directories.
 <code bash> <code bash>
-user@ubuntu:​~$ showmount -e 192.168.0.5 +user@ubuntu:​~$ showmount -e localhost 
-Export list for 192.168.0.5+Export list for localhost
-/opt/​eldk/​ppc_6xx ​192.168.0.0/​255.255.0.0+/nfs 192.168.0.0/​255.255.0.0
 </​code>​ </​code>​
  
 +=====Related Links=====
 +\\
 +  * [[en:​tftp|How to setup a TFTP Server on your Host Computer]]
 +  * [[en:​general_information:​tutorial:​nfs_boot|Using NFS boot]]
 ===== Troubleshooting ===== ===== Troubleshooting =====
 +\\
 If the root file system cannot be mounted via NFS the log file of the NFS server should be checked. In Ubuntu the log is written to the file ''/​var/​log/​syslog''​. If the root file system cannot be mounted via NFS the log file of the NFS server should be checked. In Ubuntu the log is written to the file ''/​var/​log/​syslog''​.
  
Line 45: Line 77:
  
 In this case the server rejects the connection because the host does not match the one in the file ''/​etc/​exports''​. In this case the server rejects the connection because the host does not match the one in the file ''/​etc/​exports''​.
-===== Configuration firewall / host system (NAT) ===== +
-NFS uses port TCP 2049. The configuration of Windows-XP as host system is descibed here: [[vm]].+
  
 ===== Sources ===== ===== Sources =====
-  ​http://wiki.ubuntuusers.de/NFS+\\ 
 +  ​https://help.ubuntu.com/community/​SettingUpNFSHowTo
   * [[http://​www.denx.de/​wiki/​view/​DULG/​SystemSetup#​Section_4.8.|http://​www.denx.de/​wiki/​view/​DULG/​SystemSetup#​Section_4.8.]]   * [[http://​www.denx.de/​wiki/​view/​DULG/​SystemSetup#​Section_4.8.|http://​www.denx.de/​wiki/​view/​DULG/​SystemSetup#​Section_4.8.]]
   * http://​www.centos.org/​docs/​5/​html/​Deployment_Guide-en-US/​ch-nfs.html   * http://​www.centos.org/​docs/​5/​html/​Deployment_Guide-en-US/​ch-nfs.html
-  * http://​de.linwiki.org/​wiki/​Linuxfibel_-_Netzwerk_Server_-_NFS_Server 
- 

en/general_information/nfs.txt · Last modified: 2018/03/22 17:57 by liedmann


Disclaimer

TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.


Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki