SDI-104 Operator's Manual
Version 2008

[Search Manual] [Table of Contents] [FAQ] [Go to Previous] [Go to Next]


Appendix B

Customizing an SDI

The SDI has an embedded Linux operating system resident on a read-only CompactFlash disk (CFD) installed on its motherboard. Atop this base operating system are installable packages, including the ingestor software, optional servers, and default as-shipped network configuration information.

The SDI normally operates from a ramdisk, using its hard disk primarily for data storage. System customization, therefore, is not as simple as changing configuration files on the filesystem and rebooting. There are three ways of changing the operation of the system:

1. Include a /data/opt/etc/rc.local script on the hard disk (HDD).
This script is included if available during the running of the /opt/etc/rc.SDI104 boot script during initial system startup. The rc.local script includes override settings for the following:

See below for an example rc.local script.

2. Rewrite the CFD content using the installation "key".
The installation key is a USB device provided which includes an operating system and scripts to rewrite the CFD. This provides turnkey installation, upgrade and restoration capability.

3. Author an additional package and place it on the hard disk in the /packages/ directory.
Packages are started and stopped using the UNIX "runlevel" conventions, such that runlevel 3 is a maintenance mode while runlevel 4 is operational mode.

Packages are elementary .tar.gz files (created using command "tar zcvf") and will be unpacked by the SDI boot scripts into the root filesystem. Packages are loaded at runlevel 3; after all packages are loaded from the CFD and the HDD, the system proceeds to runlevel 4. It is preferable that data and executable files be created in /data/opt/ subdirectories, and that softlinks be made into the root file system. For instance, a startup script can be placed in /data/opt/package-name/bin/ and softlinked to /etc/rc.d/S##packagename/. Packages should include files and not directories. The load order for SDI runlevel 4 (in /etc/rc4.d/) is:

  1. S00sib : load and test SSEC Ingest Board driver
  2. S05hdd : mount hard disk and link to /data/ for data buffering
  3. S19sdi : set up default settings, read rc.local, create configuration files and setup network
  4. S30inge : start-up data ingest software
  5. S40adde : start up McIDAS ADDE server

 

Example rc.local script

#!/bin/sh 
# 
# SDI-104 startup override script
#
# The boot sequence for an SDI-104 includes
#
# /etc/bootlocal.sh 
#   This script addresses system-specific settings such as mount points, device
#   drivers for the ingest hardware, package loading and base filesystem organization.
#   It creates an /opt/etc/env.SDI104 with hardware enviornment variables
#   and launches the system into runlevel 4.
# /opt/etc/rc.SDI104
#   This script is the default start sequence, run as an init script at runlevel 4.
#   It sets up environment variables, checks for an parses in $HDD/etc/rc.local, 
#   and then continues on to start the default ingestor.
#  
# Lines with two hashes (##) at the beginning can be uncommented in order to over-ride
# default CompactFlash configuration. 


# Environment variables which are available from /opt/etc/env.SDI104
# 
# HDD: mount point for hard disk, which is assumed mounted read-write at this point
#      A subdirectory $HDD/data is softlinked to /data at this point.
# ETH: primary ethernet interface, typically "eth0" or "eth1"
# CFD: mount point for compact flash, which is not mounted (not recommended for use)

. /opt/etc/env.SDI104 # Load environment variables from env.SDI104 

#####################################
# Default ingestor to invoke - this determines the /opt/___/bin/ingecntl script to run 

## INGESTOR=gvar

#####################################
# Network address and routing
# Note: If changing network settings, ALL 3 fields must be updated.

##ADDRESS=192.168.1.10
##NETMASK=255.255.255.0
##GATEWAY=192.168.1.1

#####################################
# rebuild resolv.conf for this site

## cat >/etc/resolv.conf << EOF
## domain local
## search local
## nameserver 192.168.1.1
## EOF

#####################################
# Other site-specific initialization
# For instance, mounting an NFS share and replacing the /data softlink. 

## rm /data
## mkdir /mnt/nfs
## mount -t nfs 192.168.1.4:/data /mnt/nfs -o rsize=32768,wsize=32768
## ln -s /mnt/nfs /data

#####################################
# Upon completion of this script, rc.SDI104 resumes
# and starts the default ingestor.

 


[Search Manual] [Table of Contents] [FAQ] [Go to Previous] [Go to Next]