Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ roboinst_config(1M) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ABI(5)

autoconfig(1M)

dks(7M)

fx(1M)

hinv(1)

hostname(1)

inst(1M)

mount(1M)

nvram(1M)

prom(1M)

roboinst(1M)

sh(1)



roboinstconfig(1M)                                        roboinstconfig(1M)



NAME
     roboinst_config, mrconfig - configure automatic installation server
     directory

SYNOPSIS
     roboinstconfig [ -nxy ] [ -c configdir ]

DESCRIPTION
     roboinst_config is run on the configuration server system to check and
     index the contents of an roboinst configuration directory (configdir).
     The mrconfig file is parsed for errors, other scripts, if any, are
     checked, and a table of contents is built.  Any custom configuration
     directories (for specific hardware or network addresses) beneath the
     configuration directory are also checked and included in the table of
     contents.

     roboinst_config first reads the mrconfig file.  The mrconfig file must be
     present in the configuration directory.

     The mrconfig file controls the RoboInst automatic installation session.
     Each line in the mrconfig file is a statement which specifies actions to
     occur at each phase of the automatic installation.  Each statement is
     comprised of a keyword and its arguments.

     The ordering of lines is only significant among lines that have the same
     keyword.  For example, all lines that begin with the inst keyword are
     assumed to contain input lines for inst(1M), and this input is passed to
     inst in the same order it appears in the mrconfig file.

     Blank lines and lines beginning with # are ignored.

     This is the order in which events happen in an automatic installation
     process in the miniroot:

          1.   system restarted to the miniroot
          2.   configuration directory downloaded and mrconfig file
               preprocessed
          3.   init keyword commands executed
          4.   disks partitioned as per partition keywords
          5.   fx keyword commands executed
          6.   filesystems created as per partition keywords
          7.   mkfs keyword commands executed
          8.   filesystems mounted
          9.   preinst keyword commands executed
          10.  inst keyword commands executed
          11.  build new kernel, unless the nokernel keyword is specified
          12.  postinst keyword commands executed
          13.  restart system to multi-user mode

     In a live automatic installation the order of events is as follows:





                                                                        Page 1





roboinstconfig(1M)                                        roboinstconfig(1M)



          1.   configuration directory downloaded and mrconfig file
               preprocessed
          2.   init keyword commands executed
          3.   preinst keyword commands executed
          4.   inst keyword commands executed
          5.   postinst keyword commands executed

     The syntax of the mrconfig keywords is detailed below:

     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 a mrconfig file with a higher version number.

     loghost IP address(es)
                The IP address(es) of the host(s) to which syslog messages
                will be forwarded, in addition to being logged on the client.

     setenv variable value
                Set the named RoboInst environment variable.  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 without stopping if an error is detected
                (errors are still reported in /root/var/inst/INSTLOG and in
                the SYSLOG).  If set to wait, inst will stop and wait for a
                response from the user (interactive mode) whenever an error
                occurs.

     partition device size type name options
                Specify partitions to create and filesystems to mount (see
                Partitioning section below).

     disksetup  This keyword is required when repartitioning of the root disk
                drive is requested, and the drive is either uninitialized (has
                no volume header) or 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.  Specifying 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(1M).  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 section
                below.




                                                                        Page 2





roboinstconfig(1M)                                        roboinstconfig(1M)



     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 command file, and
                inst is invoked with the -c argument.

     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
                restarted 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 /bin/sh command
     ...
     elsif /bin/sh command
     ...
     else
     ...
     endif      The conditional syntax is similar to the if syntax in sh(1).
                The first command is executed and if it exits with a status of
                zero, then all lines up to the next else, elsif or endif



                                                                        Page 3





roboinstconfig(1M)                                        roboinstconfig(1M)



                statement are evaluated.  Otherwise, the next command is
                executed and if its exit status is zero, all lines up to the
                next else, elsif or endif statement are evaluated, and so on.
                If all the commands exit non-zero, lines following the final
                else (if present) are evaluated.

                As in /bin/sh, the elsif and else clauses are optional.
                Multiple elsif clauses are allowed. Nesting of if statements
                is permitted.  Any trailing ; then is stripped from if and
                elsif statements before the command is executed.


                Conditional statements are useful for performing different
                disk partitioning, or software installation instructions,
                depending on CPU or graphics type, for example:


                    if [ $SGI_CPUBOARD = IP30 ]; then
                       init echo This is an Octane
                    elsif [ $SGI_CPUBOARD = IP22 ]; then
                        init echo This is an Indy
                    else
                        init echo Neither an Octane nor an Indy
                    endif

   Environment Variables
     RoboInst exports environment variables to commands and subcommands
     executed during the automatic installation.  Some variables can have
     multiple values.  In that case the values are separated by whitespace.
     The pre-defined variables and values are as follows:


          SGICPUBOARD    The value of CPUBOARD as per the inst(1M) admin
                          hardware command.

          SGICPUARCH
          SGIABI         SGICPUARCH is set to the value of CPUARCH as per
                          the inst(1M) admin hardware command, specifically,
                          the processor type.  The value of the CPUARCH ABI(5)
                          type is available in the SGIABI variable.  For
                          example, if inst reports both CPUARCH=R4000 and
                          CPUARCH=MIPS2, then the variable SGICPUARCH is set
                          to R4000, and SGIABI is set to MIPS2.

          SGIGFXBOARD    The value of GFXBOARD as per the inst(1M) admin
                          hardware command.

          SGISUBGR       The value of SUBGR as per the inst(1M) admin
                          hardware command.






                                                                        Page 4





roboinstconfig(1M)                                        roboinstconfig(1M)



          SGIMODE        The value of MODE as per the inst(1M) admin hardware
                          command.

          SGIMACHINE     The value of MACHINE as per the inst(1M) admin
                          hardware command.

          SGIIPADDR      The network IP address of the system, as stored in
                          the nvram(1M) netaddr variable.

          SGICAPACITY
          SGICAPdks#d#vol
                          SGICAPACITY is set to the capacity of the root disk
                          drive, in 512-byte blocks.  The variables
                          SGICAPdks#d#vol are also set to correspond to the
                          capacity of specific SCSI disk drives attached to
                          the system.  For example, if you have a 2 GB system
                          disk (dks0d1vol) and a 1 GB option disk (dks0d2vol)
                          then the following variables would be set:
                              SGICAPACITY=4197405
                              SGICAPdks0d1vol=4197405
                              SGICAPdks0d2vol=2070235

          SGIROOT        Set to the pathname of the directory where the
                          actual system root directory (when the system is
                          booted normally) is mounted.  If the installation is
                          being performed in the miniroot SGIROOT is set to
                          /root; in a live installation (roboinst -L),
                          SGIROOT is normally set to /.

          SGISYSTEMPART  The device name of the swap partition that the
                          miniroot is loaded onto.  For example, dks0d1s0.  In
                          live mode (-L) this is the partition where the
                          directory / is mounted.

          SGISYSTEMDISK  This is the same as SGI_SYSTEMPART, without the
                          final partition number.  For example, dks0d1.

          SGICUSTOM      Set to the pathname of the directory to which your
                          mrconfig file, and any other custom files, are
                          copied during the automatic installation process.
                          In a miniroot installation, this is usually /custom;
                          in a live installation, SGICUSTOM is set to the
                          name of a temporary directory, such as
                          /tmp/d.roboinst.NNNNN (where NNNNN is a unique
                          number).

          SGIHOSTNAME    Set to the hostname(1) of the client machine, or a
                          NULL string if the hostname has not been set.

          SGISYSID       Set to the system identifier comprised of 12
                          hexadecimal characters, for example,
                          08:00:69:07:73:80.



                                                                        Page 5





roboinstconfig(1M)                                        roboinstconfig(1M)



          SGIMEMSIZE     Set to the amount of memory on the system in
                          megabytes (MB), as reported by hinv(1).

          SGIBOOTSERVER
          SGIBOOTDIR     SGIBOOTSERVER is set to the name of the machine
                          from which the miniroot was booted.  SGIBOOTDIR is
                          set to the name of the directory containing that
                          miniroot.

          SGICONFIGSERVER
          SGICONFIGDIR   SGICONFIGSERVER is set to the name of the machine
                          from which your custom files (mrconfig, .index,
                          etc.) were copied.  SGICONFIGDIR is set to the name
                          of the directory containing those files.

   Partitioning
     Use the partition keyword to specify disk partitioning, filesystems and
     mount points.  The syntax for this keyword is:

         partition device size type name mount-options ; mkfs-options ;

     The device, size, and type arguments are used as input to the fx -s
     command to perform disk partitioning.  Partitions are laid out in the
     order specified, unless a start position is given.  The name and mount-
     options (if any) are used as input to the mount(1M) command.  The mkfs-
     options (if any) are used as input to the mkfs_xfs(1M) command.

     For example to create a standard system disk layout one might use:

         partition dks0d1s0 standard root /

     or

         partition systemdisk standard root /

     And to create a standard option disk mounted at /d2:

         partition dks0d2s0 standard option /d2

     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(1M) from the PROM command monitor.

     The partition arguments are as follows.

     device is one of:


          systemdisk      a shorthand notation for partition 0 of the disk on
                          which the miniroot is currently loaded (the current
                          system disk). If this keyword is immediately



                                                                        Page 6





roboinstconfig(1M)                                        roboinstconfig(1M)



                          followed by a number (eg. systemdisk1) it refers to
                          a specific partition on the system disk.

          device name     The name of 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).  For most partitioning tasks, either
                          standard root or standard option should be specified
                          as the first partition statement for the given disk.
                          If customizations are desired, additional partition
                          statements for that disk may also be specified.

          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 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, consisting of a
                          swap partition 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.






                                                                        Page 7





roboinstconfig(1M)                                        roboinstconfig(1M)



          xfs
          xfs /blocksize  An XFS filesystem is created with the specified
                          blocksize, and mounted at the directory name with
                          the specified 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        A local directory where the filesystem is to be
                          mounted.

          nomount         If nomount is specified, the filesystem is not
                          mounted.

     options are:

          options         See mount(1M) for legal options.  This field is
                          optional.  Any options specified are to be passed
                          along to the mount -o command as a single argument.
                          Multiple options should be comma separated with no
                          spaces.

   Example
     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 using the systemdisk keyword
     as follows:

              # The following "disksetup" keyword applies to all machines
              disksetup
              partition systemdisk standard root /


     The same task could also be accomplished using explicit disk device names
     with:






                                                                        Page 8





roboinstconfig(1M)                                        roboinstconfig(1M)



              # 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

     For more examples, install the optional subsystem roboinst.sw.examples
     using inst(1M) or Software Manager(1M).

OPTIONS
     The roboinst_config command accepts the following options:

     -c configdir
                Specify an alternate roboinst configuration directory.  If no
                alternate configuration directory is specified, it is assumed
                to be the current directory.

     -n         Do not write the table of contents.

     -y         Always write the table of contents, even if it already exists.

     -x         Do not write file size and checksum information to the table
                of contents.  This option may be useful while debugging the
                mrconfig file and other scripts in the configuration
                directory.  However, if the table of contents does not contain
                file size and checksum information then it will not be
                possible to detect file transfer errors during the automatic
                installation process.

FILES
     configdir/.index    Table of contents for the specified configuration
                         directory.
     /usr/share/src/RoboInst/*
                         RoboInst examples.

SEE ALSO
     ABI(5), autoconfig(1M), dks(7M), fx(1M), hinv(1), hostname(1), inst(1M),
     mount(1M), nvram(1M), prom(1M), roboinst(1M), sh(1) and the online book
     IRIX Admin: Software Installation and Licensing.





                                                                        Page 9



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026