Configures devices and optionally installs device software by running the programs specified in the Configuration Rules object class.
cfgmgr [ -f | -s | -p Phase ] [ -i Device ] [ -l Name ] [ -v ]
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.
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 |
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
cfgmgr -l scsi0
cfgmgr -i /usr/sys/inst.images
/usr/sbin/cfgmgr | Specifies the command file. |
/usr/include/sys/cfgdb.h | Contains numeric representations for fields in the Configuration Rules object class. |
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.