Device Autoconfiguration

Autoconfiguration offers many advantages over the manual configuration method used in earlier versions of UNIX, in which device drivers were manually added to the kernel, the kernel was recompiled, and the system had to be restarted. Now, with autoconfiguration, the administrator simply connects the new device to the system and performs a reconfiguration startup.

Exercise 11.1 Performing a Reconfiguration Startup

1.
Create the /reconfigure file with the following command:

touch /reconfigure 

The /reconfigure file causes the Solaris software to check for the presence of any newly installed devices the next time you turn on or start up your system.

2.
Shut down the system using the shutdown procedure described in Chapter 9, “System Startup and Shutdown.”

If you need to connect the device, turn off power to the system and all peripherals after Solaris has been properly shut down.

After the new device is connected, restore power to the peripherals first and then to the system.Verify that the peripheral device has been added by attempting to access it.

Note

The file named /reconfigure automatically gets removed during the bootup process.


An optional method of performing a reconfiguration startup is to interrupt the start process and type boot -r at the OpenBoot prompt.

Note

As root, you can also issue the reboot --- -r command from the UNIX shell. The -- -r passes the –r to the boot command.


I prefer the first method described because the system administrator can instruct the system to perform the reconfiguration startup at any time by creating the /reconfigure file. Now, at the next restart, whether the administrator is there or not, the system performs the reconfiguration startup. This could happen at 3 a.m. if you like.

During a reconfiguration restart, a device hierarchy is created in the /devices directory to represent the devices connected to the system. The kernel uses this to associate drivers with their appropriate devices. Also, any kernel parameter changes that were made to the /etc/system file are parsed by the kernel at this time.

Autoconfiguration offers the following benefits:

  • Main memory is used more efficiently because modules are loaded as needed.

  • There is no need to reconfigure the kernel if new devices are added to the system. When you add devices such as disks or tape drives, except for USB devices and hot-pluggable disks, the system needs to be shut down before you connect the hardware so that no damage is done to the electrical components.

  • Drivers can be loaded and tested without having to rebuild the kernel and restart the system.

Occasionally, you might install a new device for which Solaris does not have a supporting device driver. Always check with the manufacturer to make sure any device you plan to add to your system has a supported device driver. If a driver is not included with the standard Solaris release, the manufacturer should provide the software needed for the device to be properly installed, maintained, and administered.

Third-party device drivers are installed as software packages using the pkgadd command. At a minimum, this software includes a device driver and its associated configuration (.CONF) file. The .CONF files reside in the / kernel/drv directories. Table 11.2 describes the contents of the subdirectories located in the /kernel directory.

Table 11.2. The /kernel Directory
Directory Description
drv Contains loadable device drivers and pseudo device drivers
exec Contains modules used to run different types of executable files or shell scripts
fs Contains file system modules such as ufs, nfs, proc, and so on
misc Contains miscellaneous system-related modules such as swapgeneric and ipc
sched Contains OS schedulers
strmod Contains System V STREAMS loadable modules
sys Contains loadable system calls such as system semaphore and system accounting operations

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset