HPlogo HP-UX Reference > I

ioinit(1M)

HP-UX 11i Version 2: December 2007 Update
» 

Technical documentation

 » Table of Contents

 » Index

NAME

ioinit — test and maintain consistency between the kernel I/O data structures and /etc/ioconfig

SYNOPSIS

/sbin/ioinit -i [-r]

/sbin/ioinit -c

/sbin/ioinit -f infile [-r]

DESCRIPTION

The ioinit command is invoked by the init process when the system is booted, based on the ioin entry in /etc/inittab:

ioin::sysinit:/sbin/ioinitrc > /dev/console 2>&1

where ioinitrc is a script to invoke ioinit with the -i and -r options. Given the -i option, ioinit checks consistency between the kernel I/O data structures (initialized with /stand/ioconfig, which is accessible for NFS-diskless support when the system boots up) and information read from /etc/ioconfig. If these are consistent, ioinit invokes insf to install special files for all new devices. If the kernel is inconsistent with /etc/ioconfig, ioinit updates /stand/ioconfig from /etc/ioconfig, and, if the -r option is given, reboots the system.

If /etc/ioconfig is corrupted or missing when the system reboots, ioinitrc brings the system up in single-user mode. The user should then restore /etc/ioconfig from backup or invoke the ioinit with the -c option to recreate /etc/ioconfig from the kernel.

If the -f option is given, ioinit reassigns instance numbers to existing devices within a given class based on infile. Reassignment takes effect when the system reboots. If ioinit finds no errors associated with the reassignment, and the -r option is given, the system is rebooted. (See the WARNINGS section.)

If the -c option is given, ioinit recreates /etc/ioconfig from the existing kernel I/O data structures.

Options

ioinit recognizes the following options:

-i

Invoke insf to install special files for new devices after checking consistency between the kernel and /etc/ioconfig.

-f infile

Use the file infile to reassign instance numbers to devices within a specified class. infile may have multiple entries, each to appear on a separate line, each field in the entry separated by 1 or more blanks. Entries should conform to the following format:

h/w_path class_name instance_#

ioinit preprocesses the contents of infile, looking for invalid entries, and prints out explanatory messages. An entry is considered to be invalid if the specified hardware path or class name does not already exist in the system, or if the specified instance number already exists for the given class. For ext_bus class of devices, specified instance numbers should not exceed 255.

-r

Reboot the system when it is required to correct the inconsistent state between the kernel and /etc/ioconfig, as used with the -i option. When used with the -f option, if there are no errors associated with the instance reassignment, -r reboots the system.

-c

Recreate /etc/ioconfig, if the file is corrupted or missing and cannot be restored from backup. If -c is invoked, any previous binding of hardware path to device class and instance number is lost.

RETURN VALUE

0

No errors occurred, although warnings might be issued.

1

ioinit encountered an error.

DIAGNOSTICS

Most of the diagnostic messages from ioinit are self-explanatory. Listed below are some messages deserving further clarification. Errors cause ioinit to halt immediately.

Errors

/etc/ioconfig is missing.

/etc/ioconfig is corrupted.

Either restore /etc/ioconfig from backup and then reboot, or recreate /etc/ioconfig using ioinit -c.

Permission to access /etc/ioconfig is denied.

Change permissions to /etc/ioconfig to allow access by ioinit.

ext_bus instance value exceeds one byte limit

Change specified instance number for ext_bus class of devices in infile. Note that the value of instance number should not exceed 255.

exec of insf failed.

ioinit completed successfully, but insf failed.

Instance number is already in kernel.

Instance number already exists for a given class. Use rmsf to remove the existing instance number, then retry.

Hardware path is not in the kernel.

The given hardware path is not in the kernel. Use ioscan -k to get the correct hardware path, then retry.

Device class name is not in the kernel.

The given class name is not in the kernel. Use ioscan -k to get the correct class name, then retry.

EXAMPLES

To reassign an instance number to a device and class (specified in infile) and reboot the system:

/sbin/ioinit -f infile -r

where infile contains the following:

56.52 scsi 2

56.52 is the h/w_path, scsi is the class_name, and 2 is the instance_#.

WARNINGS

Running rmsf or insf overwrites the effect of reassignment by ioinit before the system is rebooted.

AUTHOR

ioinit was developed by HP.

FILES

/stand/ioconfig

/etc/ioconfig