Information Technology Reference
In-Depth Information
Device Aliases
OpenBoot identifies system hardware using a full device pathname that rep-
resents the type of device and its location in the system. A device pathname
consists of system buses, addresses, and possibly driver names. The follow-
ing is an example of a full device name for a partition of a SCSI disk drive:
/sbus@1f,0/SUNW,fas@e,8800000/sd@3,0:a
For more details on device names, see Chapter 7, “Disk and File System
Administration.” Because device names are typically long, complex, and awk-
ward to enter, OpenBoot provides the capability to assign a short, easy-to-
remember-and-type name or device alias to a full device name.
Creating a Device Alias
A device alias can be created in two ways. The first method uses the devalias
command. Aliases created with this command are lost when the system is
rebooted. The second method uses the nvalias command. Aliases created
with this command are stored in nonvolatile memory and remain there until
removed by the use of other OpenBoot commands. These commands use the
same syntax.
For example, both of the following commands, entered at the OpenBoot ok
prompt, will assign the alias disk2 to the device named /sbus/esp/sd@2,0 ,
which is a SCSI disk:
ok devalias disk2 /sbus/esp/sd@2,0
ok nvalias disk2 /sbus/esp/sd@2,0
ok
Whenever the device name is required in the OpenBoot environment, the
alias can be used instead. When the nvalias command is entered, this com-
mand is actually stored in nonvolatile memory. This portion of memory is
treated as an OpenBoot parameter called the nvramrc parameter . The con-
tents of the nvramrc parameter are called the script . In addition to storing
user-defined commands, this parameter is used by device drivers to save
startup configuration variables, to patch device driver code, and to store bug
patches or other installation-specific device configuration information.
If the OpenBoot use-nvramrc parameter is set to true , the script is executed
during system boot. Any aliases defined in nvramrc using the nvalias com-
mand will be set, and then the aliases can be used in a later part of the script
or as the value of one or more other OpenBoot parameters.
Search WWH ::




Custom Search