Personal tools
You are here: Home Exp Spec Info musr CAMP_boot_linux.html

CAMP_boot_linux.html

by admin last modified Apr 17, 2007 01:06 PM

How to set up a CAMP board to boot from linux


How to set up a CAMP MVME board (booting from linux)


Note

As an example, the "development"  MUSR  beamline "dev" is used throughout.  "dasdevpc"  is the linux host and "devvw" in the VxWorks host. Substitute your own host names (and ip addresses) where necessary.

Summary

The camp MVME board needs to access the directories /camp and /campnode on the linux host. The disk containing these directories must exported to the camp MVME board.

Linux host side

Create accounts on linux host

On dasdevpc, the main camp area is /home/musrdaq/musr/camp. It is assumed that the camp area is already set up, and the latest versions of the camp files downloaded from CVS. Therefore, the /camp directory below will have been created by the "cvs checkout" command.

To run camp, the VxWorks host needs to nfsmount the following  CVS directories (e.g. on dasdevpc):

/home/musrdarc/musr/camp        as /camp      (read only)
/home/musrdarc/musr/camp/devvw  as /campnode  (read/write)
              [ substitute the name of your VxWorks cpu for "devvw"].
NOTE - these directories will now be referred to as "/camp" and "/campnode" respectively.

Also the following nfsmounted directories are useful but not essential (since camp loads copies of the software from the ram disk):

/home/musrdaq/musr/vw                   as /vw   (read only) is useful for testing       
/home/musrdaq/musr/vw                   as /tools (read only) is needed for rshell commands to work.
Create the following (non-CVS)  directories on your linux host if they don't already exist:
/campnode/cfg   e.g. /home/musrdarc/musr/camp/devvw/cfg
/campnode/log   e.g. /home/musrdarc/musr/camp/devvw/log
              [ substitute the name of your VxWorks cpu for "devvw"].
Click here for information on the contents of the camp directories.
 

Copy across node-specific files

Copy  files from the /campnode directories from a similar setup on another machine so that users don't have to reload all their instruments.
This example uses midm9b as the linux host and m9bvw as the camp host:

On midm9b, logon as musrdaq.
cd /home/musrdaq/musr/camp
ls m9bvw

Create m9bvw  and m9bvw/cfg directories if they do not exist.

Copy the files from dasdevpc to midm9b using scp :
On midm9b:
cd  /home1/musrdaq/camp/m9bvw/cfg
scp musrdaq@dasdevpc:/home/musrdaq/musr/camp/m9bvw/cfg/\* .
 

Permission to nfsmount & rshell access

Follow instructions in add export permissions to nfs mount the appropriate directories under linux, and to allow rshell access (necessary so that the password need not be given as a bootup parameter).

Security

Security could also prevent the disk from being mounted. Check /etc/hosts.allow on the exporting machine. It should allow access to specific machines or to all of triumf machines.
portmap: 142.90.0.0/255.255.0.0
rpc.mountd: 142.90.0.0/255.255.0.0, 127.0.0.1

CAMP VxWorks host side

It is assumed that the full set of object modules needed for the camp server etc. are already present on the ram disk.  If not, install them.

VxWorks startup file

Use a startup file such as stcamp_lx.dev as a template. Change the vxWorks and linux host names as appropriate.

Set the boothost to dasdevpc (for convenience - the camp board actually uses the ram disk to boot), and define dasdevpc with hostAdd:

 
boothost = "dasdevpc" 
hostAdd "dasdevpc.triumf.ca","142.90.106.82"
and define the nfsAuth... to be the user ID and group ID that owns the files on the UNIX side. To find out the uid and gid for the user can use linux command:
>id username
  
#  Set NFS username/authorization 
nfsAuthUnixSet "isdaq01", 569, 569, 0
                 host     uid  gid
Next mount the camp directories as "/camp" and "/campnode" e.g.
#  Mount directories required by CAMP
nfsMount "boothost", "/home/musrdaq/musr/camp", "/camp"
nfsMount "boothost", "/home/musrdaq/musr/camp/devvw", "/campnode"
and other useful directories "/vw" and "/tools":
nfsMount boothost, "/home/musrdaq/musr/vw", "/vw"
nfsMount boothost, "/home/musrdaq/musr/vw", "/tools"

To try a new startup script

  • Load startup script by hand
Make sure boot-up parameter "startup script" is blank (see below) and enter the startup script by hand for testing,
 i.e.
 -> <  /home/musrdaq/musr/vw/stcamp_lx.dev
since if the startup script can not be loaded for some reason, it can cause the vxWorks node to go into limbo. To recover, the startup script filename in ram must be overwritten.
  • Test startup file before copying it to ram disk
To try a new startup file , at first do not copy it to the ram disk. Boot from area nfsMounted as "/vw" until the file is debugged.
 i.e.
 -> <  /home/musrdaq/musr/vw/stcamp_lx.dev
since a bad startup script can cause the vxWorks node to go into limbo.

bootup parameters

Click here to obtain typical bootup parameters for all DAQ boards.

Example bootup parameters for devvw are shown below:

boot device          : ei 
processor number     : 0 
host name            : dasdevpc 
file name            : 
inet on ethernet (e) : 142.90.106.103 
inet on backplane (b): 
host inet (h)        : 142.90.106.82 
gateway inet (g)     : 
user (u)             : musrdaq 
ftp password (pw) (blank = use rsh):
flags (f)            : 0x8 
target name (tn)     : devvw 
startup script (s)   : 
other (o)            :
Add the startup script later (see above).
 

.rhosts

A file named ~musrdaq/.rhosts containing the line
devvw musrdaq
is needed to allow the MVME162  rshell access to the host at bootup.

(This may not in fact be necessary since the MVME board actually boots from RAM)
 
 

problems

  • failure to load startup file :

  •  

     

    Check the path and filename are correct. Try giving the password as a bootup parameter. If this works, check that you have correctly allowed rshell access.
     

  • cannot access files on /camp or /campnode :

  •  

     

    Check success of nfsmounts, i.e.

    ->nfsDevShow
    If devices are not mounted, check the nfs exports (see above). If /camp and /campnode are mounted, you should be able to write a file to /campnode/cfg, and read files from /camp/dat, e.g.
    -> ll  "/camp/dat"                 directory
    -> copy  "/camp/dat/camp.ini"      type camp.ini
    -> copy  "/ram/stcamp.dev", "/campnode/cfg/tmp.tmp"  copy a file
    ->  ll "/campnode/cfg"           check it's there
    -> rm "/campnode/cfg/tmp.tmp"    delete it
    If nfsAuthUnixSet is not set to be the owner of the files in /campnode, you will not be able to write. As a test, set permissions on these directories to be world writeable
    [musrdaq@dasdevpc]     $ cd ~musrdaq/musr/camp/devvw
    [musrdaq@dasdevpc camp]$ ls -ld cfg
    drwxrwxr-x   2 musrdaq  musrdaq      1024 Jan 31 13:05 cfg/
    [musrdaq@dasdevpc camp]$ chmod a+w cfg
    [musrdaq@dasdevpc camp]$ chmod a+w log
    [musrdaq@dasdevpc camp]$ ls -ld cfg
    drwxrwxrwx   3 musrdaq  musrdaq      1024 Jan 31 14:20 cfg/
    Use "chmod o-w" to replace the correct permissions after problem is fixed.
Document Actions