The first thing to do before mounting the root file system over NFS is to build a root file system for your target if you have not done so already.
Change to the directory where you build system images and make root:
$ cd build_dir $ make root |
If the root directory that is built under build_dir cannot be exported through NFS, you must move or copy it to a directory you can export:
$ cp -R build_dir/root exportable_dir |
Next, you must export the directory so that it is readable by the ChorusOS target system. On a host workstation running the Solaris operating environment, you can export the directory by adding a line to /etc/dfs/dfstab, similar to the following:
share -F nfs -o ro -d "target root dir" /export/ChorusOS/root
In order for the directory to be shared, you must then restart the NFS server on the host workstation:
$ su Password: root password for host # /etc/init.d/nfs.server start |
You can then verify that the directory is indeed available:
$ showmount -e host /export/ChorusOS/root (everyone) |
After you have verified that the target system root directory has been exported correctly on the host workstation, you may prepare a system image that mounts the directory during system initialization.
Make sure that the mount command is built into the ADMIN
system actor by setting the ADMIN_MOUNT
feature to true:
$ configurator -c conf/ChorusOS.xml -set ADMIN_MOUNT=true |
Make sure that the ChorusOS system can act as an NFS
client by setting the NFS_CLIENT
feature to true and the IOM
buffer tunables to appropriately
large values:
$ configurator -c conf/ChorusOS.xml -set NFS_CLIENT=true $ configurator -c conf/ChorusOS.xml -set iom.nbuf=8 |
Add the necessary commands to configure the network interface and mount the directory to the system initialization script, sysadm.ini(4CC), located in build_dir/conf/sysadm.ini:
# # Set umask to 0 during system configuration. # umask 0 # # Prepare Ethernet and loopback interfaces so that you can access the # host workstation (129.157.197.144) where the root file system is # located. Target system IP address here is 129.157.197.88. # # Note that you do not have to use Ethernet as your network interface, # but Ethernet is simple to set up, so we have used it here to avoid # cluttering the example. # mkdev ifeth 0 mkdev lo 0 ifconfig ifeth0 129.157.197.88 netmask 0xffffff00 broadcast 129.157.197.255 ifconfig lo0 127.0.0.1 up # # Reset umask to default. # umask 22 # # During system initialization, the target mounts a pseudo / file # system, but you can mount a new root over the old one. So, mount the # root file system through NFS. # mount 129.157.197.144:/export/target/build/root / # # Display mount status to the console. # mount
Place the new system image where it can be downloaded onto the target and reboot the ChorusOS system. If you are using TFTP to download onto a PC target for example, then you might do so as follows:
$ cp chorus.bmon /tftpboot $ rsh target reboot |
After the system reboots, the mount information should appear on the console. You could also run one of the actors located under the root file system to verify that everything is functioning correctly:
$ rsh target arun /bin/ls /bin started aid = 22 arp.r domainname.r ls.r pax.r tclsh.r chorusNSinet.r fsck.r mkdir.r pppstart.r touch.r chorusNSsite.r fsck_dos.r mkfifo.r profctl.r umount.r chorusStat.r ftp.r mknod.r profex.r uname.r cp.r hostname.r mount.r rdbc.r ypbind.r cs.r ifconfig.r mv.r rm.r ypcat.r date.r inetNSdns.r netstat.r rmdir.r ypmatch.r dd.r inetNShost.r newfs.r route.r ypwhich.r df.r inetNSien116.r newfs_dos.r shutdown.r disklabel.r inetNSnis.r nfsstat.r sysctl.r |