Changes related to system configuration include the dynamically loaded kernel and kernel layout, the config and boot commands, and the /etc/system file.
Unlike previous SunOS releases, the kernel is now dynamically configured. The kernel now consists of a small static core and many dynamically loadable kernel modules. Drivers, file systems, STREAMS modules, and other modules are loaded automatically as needed, either at boot time or at runtime. When these modules are no longer in use, they may be unloaded. Modules are kept in memory until that memory is needed. modinfo(1M) provides information about the modules currently loaded on a system.
The modload(1M) and modunload(1M) commands are still available in this release but they perform differently. They have more limited usage and are no longer sufficient to correctly install a loadable driver onto the system. modunload now includes the capability to unload all unloadable (and not busy) modules. Use modunload as follows.
# modunload -i 0 |
The contents of the kernel, which were formerly in a single file, /vmunix, are now contained in modules in a directory hierarchy. By default, the directory hierarchy is/platform/'uname -i'/kernel, /kernel, and /usr/kernel.
The directory search path for modules can be set by the moddir
variable in the /etc/system file (see the system(4) man page). Typically, /platform/'uname -i'/kernel/unix is the first portion of the kernel to be loaded (see the kernel(1M) man page).
In the SunOS release 4.x software, the config command was used to generate system configuration files that enabled /vmunix to be relinked from object files. The need for this command has been removed by the following Solaris 2.6 features:
Loadable modules
The /etc/system file (see the system(4) man page)
Device tree information from the OpenBoot PROM (OBP)
The driver.conf files in /kernel/drv and /usr/kernel/drv
System configuration information is now set in the /etc/system file. This file also modifies the kernel's treatment of loadable modules. The file contains commands of the form:
set parameter=value
For example, in the SunOS release 4.x software, MAXUSERS
was set using config(8). In the Solaris 2.6 operating environment, it is set in the /etc/system file with the following line:
set maxusers = number |
Commands that affect loadable modules are of the form:
set module:variable=value
Changes made to the /etc/system file only take effect when you reboot your system (see the system(4) man pages).
In this release, the following boot programs are available:
inetboot - To boot from across the network
When booting from a disk, the PROM assumes that the primary boot block resides in blocks 1 - 15 of the local disk. Use installboot(1M) to create the boot block:
# installboot /usr/platform/'uname -i'/lib/fs/ufs/bootblk \ /dev/rdsk/c0t3d0s0 |
The system firmware loads the primary bootstrap (the boot block) program into memory and runs it. The boot block is a UFS file system reader. It loads the secondary boot program (/platform/'uname -i'/ufsboot) into memory.
ufsboot loads kernel/unix, then /kernel/unix uses ufsboot to load modules from the kernel directory hierarchy until it is able to mount the root file system.
During these operations, the boot block and ufsboot use the drivers provided by the firmware; neither ufsboot nor the boot block contains any driver code. The ufsboot code does not have to change to incorporate a new SBus card with a new disk type since ufsboot uses the SBus card PROM driver.
When booting over the network, the boot program performs as it did for a diskless boot in the SunOS release 4.x software. However, the boot program is now called inetboot and the client vfstab file entries are different. See System Administration Guide for information on diskless booting.
Table 18-1 summarizes the differences in the boot sequence between the SunOS release 4.x and the Solaris 2.6 operating environment.
Table 18-1 Summary of Boot Differences
SunOS release 4.x |
Solaris 2.6 |
Description |
---|---|---|
bootblk |
Loads ufsboot from disk |
|
ufsboot |
Loads unix from disk |
|
unix |
Bootable kernel image |
|
inetboot |
Mounts and copies unix from network |
|
/etc/rcS |
Mounts /usr and checks file systems |
|
/etc/rc2, /etc/rc3, /etc/rc2.d, /etc/rc3.d |
System configuration scripts |
|
modload, /etc/system, add_drv, rem_drv |
Customizes system kernel; loads, adds, and removes modules as needed |
|
PROM monitor, single user, multiuser |
Run states 0 - 6, and S |