How to NFS mount the IP-STB software
In order to speed up development, KreaTV provides the possibility
to let most of the boot image reside on a NFS mounted external disk
instead of inside the IP-STB. To use this feature you need the following
components:
- A rootdisk with the STB file system
- The correct DHCP options setup on the DHCP server
- A kernel image with NFS mount support
- A development STB
DHCP options
The DHCP options necessary for NFS mount is described in the
DHCP options section.
Boot image with NFS mount support
Create an NFS kernel and a rootdisk as described in the Boot image building section.
- Unpack the rootdisk in a suitable directory for the NFS server. It is
important that the permissions are preserved on the rootdisk. Ensure this by
unpacking it with
tar xzpf <rootdisk file name>.
Note that it unpacks into a directory called rootdisk.
- Make sure your NFS server is setup to share your rootdisk at the location
where you unpacked it. The
/etc/exports file is used for this
purpose. As an example, to share /my/nfs/exports/rootdisk, add
the following line to the file:
/my/nfs/exports/rootdisk *(rw,no_root_squash,no_subtree_check,sync,insecure,fsid=0)
This will share the rootdisk with read and write permissions among other
things. You will need to restart your NFS server for the changes to take
effect. On later Fedora distributions, running
sudo systemctl restart nfs.service works. On older Fedoras, run
sudo service nfs restart instead.
- Update your DHCP server to provide the address to the NFS server.
-
Update your DHCP server to provide the path to the root disk. The complete
path should be stated. In this example it would be
/my/nfs/exports/rootdisk/.
-
To pass NFS mount options just add the needed options together with the path
separated with a comma character.
- rsize - size of read packets
- wsize - size of write packets
- nfsvers - specifies which NFS version to be used
- tcp - use TCP as protocol instead of default UDP
Example:
/my/nfs/exports/rootdisk/,rsize=4096,wsize=8192,nfsvers=3,tcp
- If your nfs server uses nfs-version 4 (Fedora 18 and 19 use
nfs-version 4 by default), you should change the nfs server setting by
adding the following content in /etc/sysconfig/nfs (So that it can
support nfs-versions 2 and 3).
RPCNFSDARGS="--nfs-version 2,3"
- If eth0 is not the network interface that communicates with the STB
(for example, eth1 has the same netmask as the STB), then you should also
enable the interface that you use in your firewall setting by using
firewall configuration utilities or using the following command line:
firewall-cmd --zone=trusted --add-interface=eth1
- Make sure the STB downloads and starts the bootimage (kernel)
with NFS support.
- The kernel will mount the root file system via NFS and continue
booting as normal.