Welcome to the TrainLab Information
- Last Revised: 07/09/2019
- Author: Wes Jones wesley.jones@uni.edu
This helptext is written to provide SOME (not all) background. Please check with the professor for the class for RELIABLE information. This details some of the system administration related notes for this lab.
About
The TrainLab is located in Wright Hall Rm. 120. It is a study of Real Time Systems using ADA. Configurations built using MaRTE OS.
Status
These statuses are updated automatically from server commands, listed in the Services section below.
Service | Status |
---|---|
tftpd-hpa: | active |
listening: | 0.0.0.0:69 |
Components
- 134.161.160.9, control computer. Network boot to
student.cs.uni.edu:/srv/tftp/trainlab
(see Services for more information). - Workstations surrounding lab, with ADA and compilers built in. Students can log in using Active Directory authentication.
- Trains. It's what you're really here for.
- GitLab, configuration files stored here, distributed to the control system
via
scp
to student.cs.uni.edu
Files
The TFTP server runs out of /srv/tftp/trainlab
which is located on
student.cs.uni.edu (134.161.122.67)
. To upload a file to this directory
students can perform something like the following from a shell:
(bash)
$ scp uploadfile.txt student.cs.uni.edu:/srv/tftp/trainlab/projects/[group]
When you add a folder you will need to make sure it has a menu link. See
/pxelinux.cfg/default
for this. Within the folder you will need a
TrainLab.cfg
to call a menu and list similar options for all the programs.
You should see examples like scotsman
in the trainlab
directory.
Make sure student files are stored in /projects/
. It's not like anything will
break, but it's a good way to keep stuff straight.
Services
TFTP services must be offered by tftpd-hpa
. This service allows PXE Linux
to load and launch programs. For some reaons there were inconsistencies with
the preloaded deamonized tftpd in xinet. You can verify the services are
started using systemctl status tftpd-hpa.service
. The listening port can be
verified using netstat -lunp | grep 69
.
The config for the HPA TFTP server is located in /etc/defaults/tftp
. Right
now it's settings are:
(bash)
# /etc/default/tftpd-hpa
TFTP_USERNAME="root"
TFTP_DIRECTORY="/srv/tftp/trainlab"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"
Networking
Much of the work is done through DHCP. Should you want to change settings (say a new pxelinux.0 file or something), let IT - NIS know as they are the ones who run the DHCP services for all of UNI. The current settings are:
- Settings are changed under BootP menu.
- Next Server: 134.161.122.67
- Filename: pxelinux.0
Permissions
The TFTP location seems to require some specific permissions, although I
haven't found a lot of details online as to what causes that. So through trial
and error I can preset some of the "best practices" I have found (should I call
them best practices when you simply have to do it this way for it to work?).
Generally I would recommend that files that don't run any programs be set to
the owner (author) and have a permission set of 0644(-rw-r--r--) or 0664(-rw-rw-r--). The group should be
acquired from the parent directory, but if not, it should be class name, such
as cs-4740-01-fall
. A program should have executable permissions, 0755(-rwxr-xr-x).
When creating group folders you will need to assign a setgid so that they pull the correct group for new files created. This is done with something like 2775 or whatever variation you want to set up. Here's what a directory might look like:
(bash)
ls -latr scotsman/
total 5560
-rw-rw-r-- 1 adberns cs-4740-01-fall 993552 Sep 23 2009 martetest
-rwxr-xr-x 1 adberns cs-4740-01-fall 1881303 Feb 8 2011 scotsman1.7
-rwxrw-r-x 1 adberns cs-4740-01-fall 1089877 May 16 2014 handtest
-rwxr-xr-x 1 adberns cs-4740-01-fall 1707641 Sep 7 13:49 mprogram
-rw-rw-r-- 1 adberns cs-4740-01-fall 593 Sep 7 14:48 TrainLab.cfg
drwxr-xr-x 6 adberns computer-science-l 4096 Sep 10 10:44 ..
drwsrwsr-x 2 adberns cs-4740-01-fall 4096 Sep 10 10:47 .
Notice the .
directory has the setgid's in them so that all new files created
will be owned by cs-4740-01-fall
.
All files should for groups should be placed in /projects/[group]/
PXELINUX
The current pxelinux.0 is pulled from syslinux-6.02. It depends on a few
components, found in the root folder of the TFTP server. They should be owned
by nobody:root
so that the server can provide them.
The mboot.c32
file appears to be customized...so don't lose it.