![]() |
Mrconfig File Syntax |
|||||||
|
The mrconfig file is a text file that specifies what happens on each client machine during a roboinst installation. Special keywords are used to specify how the disks are partitioned, what software is installed, and any custom shell commands to have execute. This page describes the syntax of the mrconfig file. A set of examples is provided for you to copy and modify. |
The ordering of lines is only significant among lines that have the same initial keyword. For example all lines that begin with the keyword inst are assumed to contain input lines for the inst program, and this input is passed to inst in the same order it appears in the mrconfig file.
Keyword | Arguments | |
|
||
version | number | Versioning information in case new keywords are added in the future. If this keyword is omitted, version 1 is assumed. The RoboInst software will terminate with an error if it encounters an mrconfig file with a higher version number. |
loghost | hostname or ip addresses | The host(s) to which syslog messages will be forwarded, in addition to being logged on the client. |
partition | device size type name mount-options mkfs-options |
Specify partitions to create and filesystems to mount (see Partitioning below). |
setenv | variable value | Set the named variable in the RoboInst environment. The variable is also exported to subcommands such as those executed in the preinst, postinst, etc. phases of the installation. |
onerror | action | The onerror keyword controls the behavior of inst in response to an error, such as incompatible product selections, disk space shortages, etc. If set to ignore, the default, then inst continues past errors without stopping (errors are still reported in /root/var/inst/INSTLOG and in the SYSLOG). If set to wait, inst will stop and wait in interactive mode whenever an error occurs. |
partition | device size type name options | Specify partitions to create and filesystems to mount (see Partitioning below). |
disksetup | This keyword is required when repartitioning of the root disk drive is requested, and the drive is in a pre-6.5 format, that is, when swap is not located just after the volume header at the physical beginning of the drive. The presence of this keyword will cause the swap partition to be relocated to the beginning of the drive, when the installation session is initiated from multi-user mode using roboinst. Note: if the installation is initiated from the PROM command monitor, the disksetup keyword will be ignored. You must also specify disksetup=true on the boot command line when initiating roboinst from the PROM command monitor (see prom(1M)). See Partitioning below. | |
init | /bin/sh command | This keyword is used to specify shell commands to be executed during the init phase. |
fx | /bin/sh command | This keyword is used to specify shell commands to be executed during the fx phase. |
mkfs | /bin/sh command | This keyword is used to specify shell commands to be executed during the mkfs phase. |
preinst | /bin/sh command | This keyword is used to specify shell commands to be executed during the preinst phase. |
inst | inst command | Inst command to be executed. Multiple inst keywords may be specified. Commands are collected in the order they appear in the mrconfig file, copied into a temporary file, and then fed to inst with the command: inst -r /root -c tempfile |
nokernel |
The presence of this keyword causes the autoconfig(1M)
phase
to be skipped, so that a new UNIX kernel will not be automatically
generated. If you use this keyword, you must manually build the UNIX kernel
from your own scripts, if necessary.
Normally, a new kernel named /root/unix.install is generated
by the autoconfig(1M)
command.
If it builds successfully, it is renamed to /root/unix before
the system is booted to multi-user mode, something like this:
if echo y | chroot /root \ /etc/init.d/autoconfig -o -N then mv /root/unix.install /root/unix fi |
|
postinst | /bin/sh command | This keyword is used to specify shell commands to be executed during the postinst phase. |
if ... elsif ... else ... endif |
expr expr ![]() |
The conditional syntax
is similar to the if syntax in /bin/sh.
The first expr is executed as a /bin/sh statement,
and if it returns a zero exit
status, the statements up to the next else, elsif or
endif are evaluated.
Otherwise, the next expr is executed,
if its value is zero, the statements up to the next else/elsif/endif
are evaluted, and so on. If all the expressions exit non-zero, the
statements following the final else (if present) are evaluated. NOTE: the elseif keyword is only supported by RoboInst version 1.1 are later. This version of RoboInst is included in the IRIX 6.5.2m release (versions 8/12/98 and later). As in /bin/sh, the elsif and else clause(s) are optional. Multiple elsif clauses are allowed. Nesting of if statements is permitted. Conditional statements are useful for performing different disk partitioning, or software installation instructions, based on cpu-type, or graphics type, for example: if [ $SGI_CPUBOARD = IP30 ]; then init echo This is an Octane elsif [ $SGI_CPUBOARD = IP22 ] init echo This is an Indy else init echo This is neither an O2 nor an Indy. endifNOTE: any trailing "; then" is stripped from if and elsif expressions before they are evaluated. A complete list of pre-defined variables is presented below. |
partition dks0d1s0 standard root / partition systemdisk standard root /And to create a standard option disk mounted at /d2:
partition dks0d2s0 standard option /d2The complete partition syntax is:
partition device size type name mount-options ; mkfs-options ; |
NOTE: in order for repartitioning of the system disk to work properly, the disksetup keyword (described above) must appear in the mrconfig file, or the disksetup=true argument should be specified on the boot command line when initiating RoboInst from the PROM command monitor (see prom(1M)).
device is one of: | |||
systemdisk | ![]() |
||
a device name | referring to a disk device in the /dev/rdsk directory, for example dks0d1s0. See dks(7M) for a full description of device names. | ||
size is one of: |
|||
existing | keep the same size. | ||
standard | use a standard layout for the entire disk. Type root or option must also be specified - see below. When standard is used, it applies to the entire disk (the partition component in the device name is irrelevant), and there must be no other partition statements for that disk. | ||
all | the entire disk. | ||
start:size | start is an integer that specifies
the exact start address of the partition, in 512-byte blocks.
Alternatively, start can be followspart# where
# is the partition-number which this partition is
to immediately follow on the same disk. Note: the volume
header is partition 8, so normally the first usable partition
would use followspart8.
size is an integer that specifies the size of the partition in 512-byte blocks, or the word remainder to use the entire remainder of disk after making all of its other partitions. Note: partitions are processed in the order they appear in the file, so remainder should be used only in the last partition statement for a particular disk. |
||
type is one of: |
|||
root | only valid when standard is specified (see above). A standard root disk is created, containing a swap partition (what size?) and a root partition of maximum size containing an XFS filesystem. | ||
option | only valid when standard is specified (see above). A standard option disk is created, consisting of a single partition of maximum size, containing an XFS filesystem. | ||
xfs xfs/blocksize |
an XFS filesystem is created with the specified blocksize and mkfs-options, and mounted at the directory name with the specified mount-options. The blocksize must be an integer multiple of 512 and cannot exceed 65536. If omitted, a blocksize of 4096 is assumed. | ||
efs | an EFS filesystem is created, and mounted at the directory name with the specified options. Caution: EFS filesystems will not be supported in future IRIX releases. Use XFS filesystems in nearly all situations. | ||
swap | a swap partition of the specified size is created. | ||
preserve | any existing filesystem is preserved, and no new one is created. | ||
name is ignored when type is swap. For other partition types, its value can be: |
|||
pathname | indicating a local directory where the filesystem is to be mounted. | ||
nomount | If nomount is specified, the filesystem is not mounted. | ||
mount-options are: |
|||
mount-options | This field is optional. Any options specified are to be passed to the -o option of the mount(1M) command as a single argument. Multiple options should be comma-separated with no spaces. If you want to specify mkfs options (see below) and no mount options, use a single hyphen character (-) for the mount-options. | ||
mkfs-options are: |
|||
mkfs-options | ![]() partition dks0d1s0 standard root / - -d unwritten=0 |
SGI_CAPACITY=4197405 SGI_CAP_dks0d1vol=4197405 SGI_CAP_dks0d2vol=2070235
Consider the job of partitioning a set of Indy, O2/R5K and O2/R10K clients. The O2/R10K machines normally have the root drive at dks0d2s0, but on the other we would like to use dks0d1s0 for the root drive. This can be handled with a single mrconfig file as follows:
# The following "disksetup" keyword applies to all machines disksetup if [ "$SGI_CPUBOARD" = IP32 -a "$SGI_CPUARCH" = R10000 ] then # On O2/R10K machines use drive 2 init echo This is an O2/R10K partition dks0d2s0 standard root / else # On my other machines put root on drive 1 init echo The machine type is $SGI_MACHINE partition dks0d1s0 standard root / endif