MVME_boot_linux.html
by
admin
—
last modified
Apr 05, 2013 05:07 PM
Note
"dasdevpc" and "devvw" are used as examples for the linux and VxWorks hosts respectively. 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 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/musrdarc/musr/camp. It is assumed that the camp area is already
set up.
To run camp, the VxWorks host needs to nfsmount
the following 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"].
/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 directories on your linux host if they don't 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"].Check the contents of the camp directories, or copy across the files if necessary.
Permission to nfsmount & rshell access
Follow instructions in to add export permissions to nfs mount the appropriate directories under linux, and to allow rshell access (not needed for CAMP nodes which boot from ram disk). Allow rshell when booting from the host so that the password need not be given as a bootup parameter.rshell on Linux
Linux SL6 may need rshell to be installed.ls /etc/xinetd.d rpm -q rsh-server yum install rsh-server ls /etc/xinetd.d/rsh emacs /etc/xinetd.d/rsh service xinetd reload
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
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 your host e.g. dasdevpc (for convenience - the camp board actually uses the ram disk to boot), and define with hostAdd:
boothost = "dasdevpc.triumf.ca" hostAdd "dasdevpc.triumf.ca","142.90.106.82"Note that boothost and hostAdd must match. If one is "dasdevpc" and the other "dasdevpc.triumf.ca" it will not work. 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" e.g.
>id musrdaq uid=569(musrdaq) gid=100(users) groups=100(users)Note that the gid and uid at one point used to be the set the same as shown in the following examples. On the CAMP node # Set NFS username/authorization nfsAuthUnixSet boothost, 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
bootup parameters with no startup script
Example bootup parameters for testing are shown: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) :Then enter the startup script BY HAND for testing as described below, since if the startup script on the ramdisk 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 on host in "/vw" BEFORE copying it to ram disk
-> boothost = "dasdevpc.triumf.ca" -> hostAdd "dasdevpc.triumf.ca","142.90.106.82" -> nfsMount boothost, "/home/musrdaq/musr/vw", "/vw" -> < /home/musrdaq/musr/vw/stcamp_lx.dev
- Copy file to ram disk and TEST BY HAND
copy "/vw/stcamp_lx.dev","/ram/stcamplx.dev"Note filename on ramdisk is different due to ramdisk restrictions. Reboot node and test by typing in the startup command,
-> < /ram/stcamplx.devIf this is successful, add the startup script to the bootup parameters.
.rhosts
The username listed as boot-up parameter "user" should appear in the file "/tools/.rhosts". This is needed if rshell commands are to be sent to the vxWorks node. For example, the standard musr software sends an enquiry from the host computer after reboot to check where the vxWorks node is booting from.problems
- failure to load startup file
- cannot access files on /camp or /campnode
->nfsDevShowIf 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 itIf 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 later.