[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1

cfgmgr Command

Purpose

Configures devices and optionally installs device software by running the programs specified in the Configuration Rules object class.

Syntax

cfgmgr [ -f | -s | -p Phase ] [ -i Device ] [ -l Name ] [ -v ]

Description

The cfgmgr command configures devices and optionally installs device software into the system. The devices to be configured are controlled by the Configuration Rules object class, which is part of the Device Configuration database. Each configuration rule specifies three items:

During system boot, the cfgmgr command configures all the devices that are necessary to use the system. System boot is a two-step process. The first step is called phase 1, and it begins when the kernel is brought into the system and the boot file system is initialized. During this phase, the cfgmgr command is invoked, specifying this as phase 1 by using the -f flag. The cfgmgr command executes all of the phase 1 configuration rules, which results in the base devices being configured. After this, phase 2 execution begins, and the cfgmgr command is called with the -s flag.

The cfgmgr command recognizes three phases of configuration rules:

Normally, the cfgmgr command executes all the rules for the phase specified during invocation (for example, phase 1 rules for the -f flag). However, if the -l flag is used, the cfgmgr command configures only the named device and its children.

If the cfgmgr command is invoked without a phase option (for example, without the -f,-s, or -p flags), then the command executes the phase 2 rules. The only way to run the phase 3 rules is with the -p flag.

The configuration rules for each phase are ordered based on the values specified in the seq field. This field is an integer that specifies the priority in which to execute this rule, relative to the other rules for this phase. The higher the number specified by the seq field, the lower the priority; for example, a value of 1 specified in the seq field is executed before a rule with a value of 10. There is one exception: a seq field value of 0 implies a "don't care" condition, and any seq field value of 0 is executed last. Therefore, a seq field value of 1 is the highest priority (first to execute).

If there are any devices detected that have no device software installed when configuring devices, the cfgmgr command returns a warning message with the name or a list of possible names for the device package that must be installed. If the specific name of the device package is determined, it is displayed as the only package name, on a line below the warning message. If the specific name cannot be determined, a colon-separated list of possible package names is displayed on a single line. A package name or list of possible package names is displayed for each of the devices, if more than one device is detected without its device software.

The system displays the following warning message when devices without their device software are detected:

cfgmgr: 0514-621 WARNING: The following  device packages are
        required for device support but are not currently 
        installed.
devices.pci.22100020
devices.pci.14101800
devices.pci.scsi:devices.pci.00100300:devices.pci.NCR.53C825

In this example, two devices were found whose software is missing, and the cfgmgr command displayed the names of the device packages that must be installed. A third device whose software is missing was also found, but in this case, the cfgmr command displays several possible device package names.

When more than one possible package name is identified for a device, typically only one of the names will actually correspond to a device package on the install medium. This is the package to install. However, in some cases, more than one of the names will correspond to actual device packages on the install medium. In this case, the first package name in the list for which there is an actual device package on the install medium is the package that must be installed. If the cfgmgr command is used with the -i flag, then the correct packages will be installed.

If you invoke the cfgmgr command with the -i flag, the command attempts to install device software automatically for each new detected device. The Device variable of the -i flag specifies where to find the installation medium. The installation medium can be a hardware device (such as a tape or diskette drive), a directory that contains installation images, or the installation image file itself.

Attention: To protect the Configuration database, the cfgmgr command is not interruptible. Stopping this command before execution is complete could result in a corrupted database.

Flags

-f Specifies that the cfgmgr command executes the phase 1 configuration rules. This flag is not valid at run time (after system start).
-i Device Specifies the location of the installation medium.
-l Name Specifies the named device to configure along with its children.
-p Phase Specifies that the cfgmgr command executes the specified phase.
-s Specifies that the cfgmgr command executes the phase 2 configuration rules.
-v Specifies verbose output. The cfgmgr command writes information about what it is doing to standard output.

Configuration Rules

phase Specifies whether this rule belongs to phase 1 , phase 2 , or phase 3 (second boot phase for service mode).
seq S pecifies as an integer, the relative priority of this rule .
rule A string containing the full path name of a program to execute (can also contain any flags, but they must follow the program name, as this whole string is executed as if it were typed in on the command line).

Security

Access Control: Only the root user and members of the system group should have execute (x) access to this command.

Auditing Event:

Event Information
DEV_Configure Device name

Examples

The following examples are based on the configuration rules containing the following information:

phase   seq        rule

  1     1        /usr/lib/methods/defsys
  1     10       /usr/lib/methods/deflvm
  2     1        /usr/lib/methods/defsys
  2     5        /usr/lib/methods/ptynode
  2     10       /usr/lib/methods/startlft
  2     15       /usr/lib/methods/starttty
  3     1        /usr/lib/methods/defsys
  3     5        /usr/lib/methods/ptynode
  3     10       /usr/lib/methods/startlft
  3     15       /usr/lib/methods/starttty
  1. When the cfgmgr command is invoked with the -f flag, the command gets all of the configuration rules with phase = 1 and executes them in the following order:
  2. When the cfgmgr command is run with the -s flag, the command gets all of the configuration rules with phase = 2 and executes them in the following order:
  3. When the cfgmgr command is run with the -p 3 flag, the command gets all of the configuration rules with phase = 3 and executes them in the following order:
  4. If the cfgmgr command is run without a flag, the command functions the same as when used with the -s flag.
  5. To configure detected devices attached to the SCSI0 adapter, enter:

    cfgmgr -l scsi0
  6. To install device software automatically during configuration (with the software contained in a directory), enter:

    cfgmgr -i /usr/sys/inst.images

Files

/usr/sbin/cfgmgr Specifies the command file.
/usr/include/sys/cfgdb.h Contains numeric representations for fields in the Configuration Rules object class.

Related Information

The chdev command, lsattr command, lsdev command, mkdev command, rmdev command.

Device Overview for System Management in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices describes adding, changing, moving, and removing devices.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]