Set up a Network File System between IGEP Board and IGEP Virtual Machine

From IGEP - ISEE Wiki

Jump to: navigation, search


Network File System (NFS) is a Distributed file system protocol originally developed by Sun Microsystems in 1984, allowing a user on a client Computer to access files over a network in a manner similar to how local storage is accessed. NFS, like many other protocols, builds on the Open Network Computing Remote Procedure Call (ONC RPC) system. The Network File System is an open standard defined in RFCs, allowing anyone to implement the protocol. More information here.

In IGEP Boards, NFS protocol can be used to mount a whole rootfs partition located in a remote disk like Virtual Machine, this method can be useful for:

  • Your remote rootfs will not be limited by flash or MicroSD storage.
  • You can transfer binaries without using remote connections.
  • You can test other rootfs only editing igep.ini configuration file.

Work under NFS environment has its limitation too:

  • Remote system is a bit slower than a Micro SD or Flash system
  • IGEP X-loader and Kernel will be hosted in Micro SD or Flash

Nfs1 filesystem.png Nfs2 filesystem.png

Click to enlarge image


There are some requisites to follow this guide:

Set up NFS at VM

Download and extract IGEP root filesystem

ISEE mantains two rootfs builded with Yocto tools (IGEP firmware and Qt demo), so this How-to we use these two distros :

  • IGEP firmware: default software shipped in all IGEP Boards. It comes with some documentation and tools, so you need to uncompress again to extract rootfs
tar jxf igep_firmware-yocto-*.tar.bz2
cd igep_firmware-yocto-*
sudo mkdir /srv/{your_rootfs_dir}
sudo tar jxf demo-image-sato-igep00x0.tar.bz2 -C /srv/{your_rootfs_dir} 
  • Qt demo: demo filesystem with Qt libraries and examples
sudo mkdir /srv/{your_rootfs_dir}
sudo tar jxf qt4e-demo-image-igep00x0.tar.bz2 -C /srv/{your_rootfs_dir}

Configure NFS Server

  • Install nfs-kernel-server:
sudo apt-get install nfs-kernel-server 
  • Make directory exports.d:
sudo mkdir /etc/exports.d 

Edit /etc/exports file, add the following line and save the changes:

/srv/{your_rootfs_dir} *(rw,sync,no_subtree_check,no_root_squash)

Export NFS file system:

sudo exportfs -a

NOTE: You can have as many rootfs as you want

Set up NFS at IGEP Board

MicroSD boot

Configure igep.ini file located at boot partition:

  • Comment MMC boot:
;  --- Configure MMC boot ---
;root=/dev/mmcblk0p2 rw rootwait
  • Add NFS configuration:
;  --- Configure NFS boot ---

Save changes, plug MicroSD card and power up your IGEP.

Flash boot

Boot IGEP with a MicroSD card without NFS support.

mkdir /tmp/temp
mount -t jffs2 /dev/mtdblock1 /tmp/temp 

Now, mtdblock1 partition is mounted at /tmp/temp directory. Modify igep.ini located in: /tmp/temp/igep.ini

  • Comment JFFS2 FS boot:
;  --- Configure JFFS2 FS boot ---
  • Add NFS configuration:
;  --- Configure NFS boot ---

Save changes, power down IGEP, unplug MicroSD card and power up your board.