Wednesday, December 19, 2007

Solaris 9 Installation

In this chapter, you will
Learn how to perform preinstallation planning

Estimate disk space requirements for installation

Perform a Web Start Wizard installation

Configure a Solaris system for first time operation

Solaris 9 provides more installation methods than ever before. These include the Web Start Wizard, JumpStart, suninstall, and Live Upgrade. The Web Start Wizard is the easiest method used to install Solaris 9: it uses a Java-based front end that presents a series of configuration choices. For those who prefer a command-line installation, the suninstall program is also available. This is particularly useful for installing servers that are attached to a simple terminal on the console port, using tip, rather than a high-resolution monitor. Large organizations are more likely to create a JumpStart configuration to install a standard operating environment (SOE) on all Solaris 9 systems. Using JumpStart ensures that all systems have an identical installation base, making it easy to manage patches and maintain production systems. Live Upgrade is a new innovation, which minimizes the downtime of production servers: a new boot environment is constructed while the server is still operating under its existing operating environment release. Once the second boot environment has been installed, the system is quickly rebooted into the new operating environment, and the previous version is uninstalled in the background.

Preinstallation Planning
The basic process of installing Solaris remains the same, regardless of the installation method selected. A number of planning tasks must be performed prior to installation. These tasks include:

Choosing the appropriate installation method from the Web Start Wizard, JumpStart, suninstall, and Live Upgrade.

Deciding whether or not to upgrade an existing installation or install the operating system cleanly. If your system is currently running Solaris 2.6, 7, or 8, an upgrade can be performed. If your system is running Solaris 2.5.1 or earlier, or if it is not running Solaris at all, you need to perform an initial installation. An upgrade preserves many of the system settings from a previous installation, and generally takes less time to complete than a completely new install. If an upgrade is being performed, the current system should be backed up by using ufsdump or something similar so that it can be restored in the event of an upgrade failure.

Analyzing your existing hardware devices to determine whether or not Solaris 9 will run on your system without an upgrade. For example, Solaris 8 on SPARC would run with only 64MB RAM, but at least 96MB of RAM is required to run Solaris 9. To perform an upgrade installation, extra RAM would need to be added to an existing Solaris 8 system with only 64MB RAM.

Determining whether your storage devices have sufficient capacity to install Solaris 9 and all required third-party applications. A complete Solaris 9 installation requires 2.4GB of disk space, if OEM support is included, and 2.3GB if OEM support is excluded. A Developer installation requires at least 1.9GB, while the End User installation requires 1.6GB. In addition, an amount of swap space equivalent to twice your physical memory should be factored into the sum, along with third-party and user disk space requirements. This is not a requirement, but a sound practice.

Choosing an appropriate installation medium. Possibilities include a JumpStart, CD-ROM, DVD-ROM, or net-based installation from a remotely mounted CD-ROM or DVD-ROM drive. For large organizations, it’s often convenient to set up a single network server with an NFS-exported DVD-ROM or CD-ROM drive that is publicly available for mounting. In addition, large organizations might also choose a customized JumpStart installation, which also requires network access to a centralized boot server. Smaller organizations will almost certainly use a CD-ROM or DVD-ROM drive attached to the local system to be installed.

Gathering all of the necessary system configuration information. This includes the system hostname, IP address, subnet mask, name service type, name server IP address, default router IP address, time zone, locale, and proxy server IP address. These values, and when they are required, will be discussed next.

By undertaking a comprehensive preinstallation review, a successful installation can be assured. In addition to making decisions about the installation type and gathering basic system data, it’s important to understand the network context in which the system will operate. The network context can be defined by answering several key questions:

Will the system be networked? If so, you will need an IP address, subnet mask, and default router (unless the system itself is intended to be a router).

Will the system use the Dynamic Host Configuration Protocol? If so, you will not need to supply an IP address, as a lease over an IP address will automatically be granted to you at boot time.

Will the system use IPv6, the newest version of the Internet Protocol?

Will the system form part of a Kerberos v5 realm, to allow centralized authentication? If so, you will need the name of the realm, the administration server’s IP address, and the address of the primary KDC.

Will the system use the Domain Name Service (DNS)? If so, you will need the IP address of a primary and secondary DNS server, which is authoritative for the local domain.

Will the system use Network Information Service (NIS) or NIS+? If so, the IP address or the hostname of the local NIS or NIS+ server will need to be supplied.

Will the system make use of the Lightweight Directory Access Protocol (LDAP) for centralized authentication and authorization? If so, you will need to supply the profile server’s IP address or hostname.

Will the system use a proxy server to access the Internet? If so, the IP address or hostname of the proxy server will be required.

Answers to these questions will be required to completely configure the system during installation.

Disk Space Planning
The question of how much disk space you require to install Solaris 9 can only be answered by examining the purpose of the server. For a SPARC system, with 512MB RAM, a complete installation will require 2.6GB for software and 1024MB for swap, as well as space for user data and applications. Extra disk space must be set aside for special features, such as internationalization, and an estimate needs to be made of the size of print and mail spooling directories which lie under /var. Although the default size of /var is usually small in the installation program, mail and print servers will need to increase this, by allowing for a reasonable allocation of spooling space per user.

Caution Since a full /var file system caused by a large print job can affect other tasks such as mail, it’s important to overestimate rather than underestimate the size of /var.


In terms of applications, an Oracle database server, for example, will require at least 1–2GB of disk space, for software packages, mount points, and table data. For a development system with multiple users, a projection based on the maximum quota for each user should be computed. For example, if 50 users are allowed 100MB disk space each, then at least of 5GB of disk space must be available for their exclusive use—as a rule, if users have quotas imposed on them, they should always be guaranteed access to that space. If data on a server is mission critical, consideration should be given to installing some volume management software, as described in Chapter 21.

In terms of specific layouts, the typical file system layout for a SPARC architecture system follows a set of customary, although not required, disk slice allocations. Slice 0 holds the root partition, while slice 1 is allocated to swap space. For systems with changing virtual memory requirements, it might be better to use a swap file on the file system, rather than allocating an entire slice for swap. Slice 2 often refers to the entire disk, while /export on slice 3 traditionally holds older versions of the operating system, which are used by client systems with lower performance (for example, Classic or LX systems that use the trivial FTP daemon, tftpd, to download their operating system upon boot). These systems may also use slice 4 as exported swap space. Export may also be used for file sharing using the Network File System (NFS). Slice 5 holds the /opt file system, which is the default location under Solaris 9 for local packages installed using the pkgadd command. Under earlier versions of Solaris, the /usr/local file system held local packages, and this convention is still used by many sites. The system package file system /usr is usually located on slice 6, while /export/home usually contains user home directories on slice 7. Again, earlier systems located user home directories under /home, but because this is used by the automounter program in Solaris 9, some contention can be expected.

The typical file system layout for an Intel architecture system also follows a set of customary, although not required, disk slice allocations. Slice 0 again holds the root partition, while slice 1 is also allocated to swap space. Slice 2 continues to refer to the entire disk, while /export on slice 3 again holds older versions of the operating system, which are used by client systems, and slice 4 contains exported swap space for these clients. The local package file system /opt is still located on slice 5, and the system package file system /usr is again located on slice 6. Slice 7 contains the user home directories on /export/home. However, the two extra slices serve very different purposes: boot information for Solaris is located on slice 8, and is known as the “boot slice,” while slice 9 provides space for alternative disk blocks, and is known as the “alternative slice.”

Device Names
Among the most challenging aspects of understanding Solaris hardware are the device names and references used by Solaris to manage devices. Solaris uses a very specific set of naming conventions to associate physical devices with instance names on the operating system. In addition, devices can also be referred to by their device name, which is associated with a device file created in the /dev directory after configuration. For example, a hard disk may have the physical device name/pci@1f,0/pci@1,1/ide@3/dad@0,0, which is associated with the device file /dev/dsk/c0t0d0. The benefit of the more complex Solaris device names and physical device references is that it is easy to interpret the characteristics of each device by looking at its name. For the disk example given above, we can see that the IDE hard drive is located on a PCI bus at target 0. When we view the amount of free disk space on the system, for example, it is easy to identify slices on the same disk by looking at the device name:

# df -k
Filesystem kbytes used avail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 1982988 615991 1307508 33% /
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 1487119 357511 1070124 26% /usr
swap 182040 416 181624 1% /tmp

Here, we can see that /dev/dsk/c0t0d0s0 and /dev/dsk/c0t0d0s3 are slice 0 and slice 3 of the disk /dev/dsk/c0t0d0. If you’re ever unsure of which physical disk is associated with a specific disk device name, the format command will tell you:

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c1t3d0 <>
/pci@1f,0/pci@1/scsi@1/sd@3,0
Here, we can see that physical device /pci@1f,0/pci@1/scsi@1/sd@3,0 is matched with the disk device /dev/dsk/c1t3d0. In addition, a list of mappings between physical devices to instance names is always kept in the /etc/path_to_inst file. More information on device naming conventions can be found in Chapter 18.

SPARC Preinstallation
Prior to installing or upgrading Solaris on a SPARC system, it is suggested that a few basic checks of the system be performed, to obtain data necessary for installation (such as the device name of the boot disk) and to verify that all system components are functional. The three most commonly performed tasks are checking network connectivity, checking the disks that have been detected on the SCSI bus, and reviewing how much memory is installed.

If you are booting over a network, or if your system needs to access a DNS, NIS/NIS+, Kerberos, or LDAP server, and you want support for these services to be installed, your network connection will need to be operational. In order to ensure that packets are being sent and received to your system, you can use the watch-net command:

ok watch-net
Internal Loopback test - succeeded
External Loopback test - succeeded
Looking for Ethernet packets.
‘.’ is a good packet. ‘X’ is a bad packet.
Type any key to stop
......X.........XXXX.....….XX............
If a large number of packets are showing as bad, then you should check for hardware errors on your network cable, and/or use a packet analyzer to determine if there is a structural fault on the local area network. In order to check whether or not all of the disk devices attached to the system have been correctly detected, you can use the probe- scsi command to print a list of available devices.

Intel Preinstallation
To install Solaris Intel, the first step is to switch on the system and insert the Solaris 9 Installation CD-ROM into the drive. If you have a high-resolution graphics monitor attached to the system, the GUI-based Configuration Assistant will start. Alternatively, if you are using a low-resolution terminal to connect, the Configuration Assistant will be text-based.

After the BIOS messages have been displayed, the following message will be displayed:

SunOS Secondary Boot
Solaris Intel Platform Edition Booting System
Running Configuration Assistant...
The Configuration Assistant is responsible for performing a number of preinstallation tasks, and must be executed prior to the Web Start Wizard or any other installation program. At the opening screen, simply press F2 to proceed with the installation, unless you are performing an upgrade.

The first task performed by the Configuration Assistant is determining the bus types supported by your system, and collecting data about the devices installed in your system. During this process, the following message will be displayed on your screen:

Determining bus types and gathering hardware configuration data ...
After all of the devices have been discovered by scanning, a list of identified devices is printed on the screen:

The following devices have been identified on this system. To identify
devices not on this list or to modify device characteristics, choose Device
Task. Platform types may be included in this list.

ISA: Floppy disk controller
ISA: IDE controller
ISA: IDE controller
ISA: Motherboard
ISA: PS/2 Mouse
ISA: PnP bios: 16550-compatible serial controller
ISA: PnP bios: 8514-compatible display controller
ISA: PnP bios: Audio device
ISA: System keyboard (US-English)
If you are satisfied that the devices required for installation have been correctly detected (for example, video card and RAM size), you may press F2 again to proceed with booting. Alternatively, you may perform several other tasks on this screen, including:

Viewing and editing devices

Setting the keyboard type

Saving the current configuration

Deleting a saved configuration

Setting the default console device

If your system does not already have a UFS file system installed, or if it is a completely new system, you will need to use fdisk to create new partitions at this point so that your system may be installed. However, if you have an existing Linux system that you wish to dual boot with Solaris, you must ensure that the Linux swap partition is not confused with a Solaris UFS device, because they have the same type within fdisk. You should be able to distinguish Linux swap partitions by their maximum size (127MB). The following page will be displayed during booting and prior to the execution of fdisk:

<<<<<< Current Boot Parameters >>>>>>
Boot path: /pci@1,0/pci-ide@6,1/ide@2/sd@1,0:a
Boot args: kernel/unix
<<<<<< Starting Installation >>>>>>
SunOS Release 5.9 Version Generic 32-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Configuring /dev and /devices
Using RPC Bootparams for network configuration information.
Solaris Web Start installer
English has been selected as the language in which to perform the install.
Starting the Web Start Solaris installer
Solaris installer is searching the system’s hard disks for a
location to place the Solaris installer software.
No suitable Solaris fdisk partition was found.
Solaris Installer needs to create a Solaris fdisk partition
on your root disk, c0d0, that is at least 395 MB.
WARNING: All information on the disk will be lost.
May the Solaris Installer create a Solaris fdisk [y,n,?]
You should heed the warning that all data will be lost if you choose to overwrite it with fdisk.

Disk Partitions
If you consent to using fdisk, you will see a screen similar to the following:

Total disk size is 2048 cylinders
Cylinder size is 4032 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ==== ===== ==== ====== ===
1 UNIX 0 1023 1024 50
2 DOS 1024 2047 1024 50
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Exit (update disk configuration and exit)
5. Cancel (exit without updating disk configuration)
Enter Selection:
In this example, we can see that there are two existing partitions occupying 1,204 cylinders each. Partition 1 is a UNIX partition (perhaps from SCO UNIX), while partition 2 is an MS-DOS partition. If we want to use the entire disk for Solaris, we would need to select option 3 on this menu twice, to delete each existing partition in turn. Alternatively, if we wished to retain the UNIX partition but delete the MS-DOS partition, we would use option 3 only once, and select partition 2 for deletion.

After you have freed up space, if necessary, you will be required to select option 1 to create a partition. You will then be required to select option A from the following menu to create a Solaris partition:

Select the partition type to create:
1=SOLARIS 2=UNIX 3=PCIXOS 4=Other
5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG
A=x86 Boot B=Diagnostic 0=Exit?
Note that it is not possible to run Solaris from a non-UFS partition; however, it is possible to mount non-Solaris file systems after the system has been installed. Next, you need to specify the size of the partition, in either the number of cylinders or the percentage of the disk to be used. In this example, we would enter either 100% or 2048 cylinders:

Specify the percentage of disk to use for this partition
(or type "c" to specify the size in cylinders).
Next, you will need to indicate whether or not the target partition is going to be activated. This means that the system will attempt to boot the default operating system loader from this partition. If you are going to use the Solaris boot manager, you may activate this partition. However, if you are using Boot Magic or LILO to manage existing Microsoft Windows or Linux partitions, and you wish to continue using either of these systems, you should answer no.

After you have created the partition, the fdisk menu will be updated and displayed as follows:

2 Active x86 Boot 8 16 9 1
Total disk size is 2048 cylinders
Cylinder size is 4032 (512 byte) blocks
Cylinders
Partition Status Type Start End Length %
========= ====== ========= ===== ==== ====== ===
2 Active x86 Boot 0 2047 2048 100
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Exit (update disk configuration and exit)
5. Cancel (exit without updating disk configuration)
Enter Selection:
At this point, you should select option 4. You will then be prompted with the following message:

No suitable Solaris fdisk partition was found.
Solaris Installer needs to create a Solaris fdisk partition
on your root disk, c0d0, that is at least 395 MB.
WARNING: All information on the disk will be lost.
May the Solaris Installer create a Solaris fdisk [y,n,?]
Since you’ve just created the appropriate partition using fdisk, you should type n here. You will then see the following message:

To restart the installation, run /sbin/cd0_install.

After restarting the installer, you will see the formatting display shown in the next section.

Disk Formatting and Virtual Memory
If your system already has a UFS partition, or if you have just created one, you will see a screen similar to the following:

<<<<<< Current Boot Parameters >>>>>>
Boot path: /pci@1,0/pci-ide@6,1/ide@2/sd@1,0:a
Boot args: kernel/unix
<<<<<< Starting Installation >>>>>>
SunOS Release 5.9 Version Generic 32-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Configuring /dev and /devices
Using RPC Bootparams for network configuration information.
Solaris Web Start installer
English has been selected as the language in which to perform the install.
Starting the Web Start Solaris installer
Solaris installer is searching the system’s hard disks for a
location to place the Solaris installer software.
The default root disk is /dev/dsk/c0d0.
The Solaris installer needs to format
/dev/dsk/c0d0 to install Solaris.
WARNING: ALL INFORMATION ON THE DISK WILL BE ERASED!
Do you want to format /dev/dsk/c0d0? [y,n,?,q]
At this point, you simply enter y, and the disk will be formatted as required, so that new partitions may be created. You will then be prompted to enter the size of the swap partition:

NOTE: The swap size cannot be changed during filesystem layout.
Enter a swap partition size between 384MB and 1865MB, default = 512MB [?]
You will then be asked to confirm that the swap slice can be installed at the beginning of the partition:

The Installer prefers that the swap slice is at the beginning of the
disk. This will allow the most flexible filesystem partitioning later in the
installation.
Can the swap slice start at the beginning of the disk [y,n,?,q]
After creating the swap partition, the other slices can be created on the target disk, since the installation program requires a UFS file system to install correctly. However, the system must first be rebooted clean to perform the layout:

The Solaris installer will use disk slice, /dev/dsk/c0d0s1.
After files are copied, the system will automatically reboot, and
installation will continue.
Please Wait...
Copying mini-root to local disk....done.
Copying platform specific files....done.
Preparing to reboot and continue installation.
Need to reboot to continue the installation
Please remove the boot media (floppy or cdrom) and press Enter
Note: If the boot media is cdrom, you must wait for the system
to reset in order to eject.

After you press the ENTER key, you will see the standard Solaris shutdown messages, including:

Syncing file systems... 49 done
rebooting...
Boot Manager
After ejecting the installation CD-ROM from your drive, you will see the standard Solaris boot manager menu:

SunOS - Intel Platform Edition Primary Boot Subsystem
Current Disk Partition Information
Part# Status Type Start Length
=======================================
1 Active X86 BOOT 0 2048
Please select the partition you wish to boot:
After you enter 1 and hit the ENTER key, you will see the following message:

SunOS Secondary Boot
Solaris Intel Platform Edition Booting System
Running Configuration Assistant...
Autobooting from boot path: /pci@1,0/pci-ide@6,1/ide@2/sd@1,0:a
If the system hardware has changed, or to boot from a different
device, interrupt the autoboot process by pressing ESC.
A few seconds later, the boot interpreter is initialized:

Initializing system
Please wait...
<<<<<< Current Boot Parameters >>>>>>
Boot path: /pci@0,0/pci-ide@7,1/ata@1/cmdk@0,0:b
Boot args:
Type b [file-name] [boot-flags] <> to boot with options
or i <> to enter boot interpreter
or <> to boot with defaults
<<<<<< timeout in 5 seconds >>>>>>
Select (b)oot or (i)nterpreter:
SunOS Release 5.9 Version Generic 32-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Configuring /dev and /devices
Using RPC Bootparams for network configuration information.
Next, you will need to use kdmconfig to set up your graphics card and monitor, so that the Web Start Wizard can display its windows correctly. To start kdmconfig, press F2, after which you will be taken to the kdmconfig introduction screen. After pressing F2 again, you will be asked to perform the kdmconfig view/edit system, configuration window. Here, you can make changes to the settings detected for your system. If your system is listed on the Hardware Compatibility List (HCL), you won’t have any problems with hardware detection.
Web Start Wizard Installation
To use the Web Start Wizard installer using a local DVD-ROM or CD-ROM drive, you need to bring the system to run level 0 so that commands can be entered into the PROM boot monitor (for more information about the boot monitor, see Chapter 3). The following command can be used from a root shell to bring the system to run level 0:

# sync; init 0
Once the system has reached init level 0, the following prompt will be displayed:

ok
Next, you need to place the Solaris 9 Installation CD-ROM or DVD-ROM into the local drive, and type the following command:

ok boot cdrom
Note that the command is the same whether a DVD or CD-ROM is used as the source. If you have a Solaris Intel system, you cannot upgrade from 2.6 and 7 to 9 by using the Web Start Wizard from the CD-ROM: you must use either a DVD-ROM, JumpStart, or net-based installation. In addition, your BIOS and hard disk controller for the boot device must support logical block addressing (LBA) to work with Solaris 9.

Soon after the system has started booting, you will see output similar to the following:

Boot device: /sbus/espdma@e,8400000/esp@e,8800000/sd@6,0:f File and args:
SunOS Release 5.9 Version Generic 32-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Configuring /dev and /devices
Using RPC Bootparams for network configuration information.
Solaris Web Start installer
English has been selected as the language in which to perform the install.
Starting the Web Start Solaris installer
Solaris installer is searching the system’s hard disks for a
location to place the Solaris installer software.
Your system appears to be upgradeable.
Do you want to do a Initial Install or Upgrade?
1) Initial Install
2) Upgrade
Please Enter 1 or 2 >>
If the following message appears in the boot messages, you may elect to perform an upgrade of the existing Solaris installation. However, most administrators would back up their existing software, perform a fresh install, and then restore their data and applications once their system is operational. In this case, we will choose to perform an Initial Install, which will overwrite the existing operating system.

After you enter 1 and hit ENTER, you will see a message like this:

The default root disk is /dev/dsk/c0t0d0.
The Solaris installer needs to format
/dev/dsk/c0t0d0 to install Solaris.
WARNING: ALL INFORMATION ON THE DISK WILL BE ERASED!
Do you want to format /dev/dsk/c0t0d0? [y,n,?,q]
Formatting the hard drive will overwrite all existing data on the drive—you must ensure that if you previously installed an operating system on the target drive (c0t0d0), you have backed up all data that you will need in the future. This includes both user directories and application installations.

After entering y, the following screen will appear:

NOTE: The swap size cannot be changed during filesystem layout.
Enter a swap slice size between 384MB and 2027MB, default = 512MB [?]
Just hit the ENTER key to accept the default on 512MB if your system has 256MB physical RAM, as the sample system has. However, as a general rule, you should only allocate twice the amount of physical RAM as swap space; otherwise, system performance will be impaired. The swap partition should be placed at the beginning of the drive, as the following message indicates, so that other slices are not dependent on its physical location:

The Installer prefers that the swap slice is at the beginning of the
disk. This will allow the most flexible filesystem partitioning later in the
installation.
Can the swap slice start at the beginning of the disk [y,n,?,q]
After entering y to this question, you will be asked to confirm the formatting settings:

You have selected the following to be used by the Solaris installer:
Disk Slice : /dev/dsk/c0t0d0
Size : 1024 MB
Start Cyl. : 0
WARNING: ALL INFORMATION ON THE DISK WILL BE ERASED!
Is this OK [y,n,?,q]
If you enter y, the disk will be formatted and the mini root file system will be copied to the disk, after which the system will be rebooted and the Web Start Wizard installation process can begin:

The Solaris installer will use disk slice, /dev/dsk/c0t0d0s1.
After files are copied, the system will automatically reboot, and
installation will continue.
Please Wait...
Copying mini-root to local disk....done.
Copying platform specific files....done.
Preparing to reboot and continue installation.
Rebooting to continue the installation.
Syncing file systems... 41 done
rebooting...
Resetting ...
SPARCstation 20 (1 X 390Z50), Keyboard Present
ROM Rev. 2.4, 256 MB memory installed, Serial #456543
Ethernet address 5:2:12:c:ee:5a HostID 456543
Rebooting with command: boot /sbus@1f,0/espdma@e,8400000/
esp@e,8800000/sd@0,0:b
Boot device: /sbus@1f,0/espdma@e,8400000/esp@e,8800000/sd@0,0:b
File and args:
SunOS Release 5.9 Version Generic 32-bit
Copyright 1983-2001 Sun Microsystems, Inc. All rights reserved.
Configuring /dev and /devices
Using RPC Bootparams for network configuration information.

Configuration
The Web Start Wizard proceeds by asking a number of configuration questions that are used to determine which files are copied to the target drive, and how the new system’s key parameters will be set. Many of the questions involve network and software configuration, because these are the two foundations of the Solaris installation. In the following sections, we will review each of the configuration options and cover examples of appropriate settings.

Network Support
The Network Support screen gives users the option to select a networked or non- networked system. Some examples of non-networked systems include stand-alone workstations and offline archives. If you don’t want or need to install network support, however, you will still need a unique hostname to identify the localhost.

DHCP Server
Network users must first identify how their system is identified using the IP. One possibility is that the system will use Dynamic Host Configuration Protocol (DHCP), which is useful when IP addresses are becoming scarce on a class C network. DHCP allows individual systems to be allocated only for the period during which they are “up.” Thus, if a client machine is only operated between 9:00 A.M. and 5:00 P.M. every day, it is only “leased” an IP address for that period of time.

Tip When an IP address is not leased to a specific host, it can be reused by another host. Solaris DHCP servers can service Solaris clients, as well as Microsoft Windows and Linux clients.


Hostname
A hostname is used to uniquely identify a host on the local network, and when combined with a domain name it allows a host to be uniquely identified on the Internet. Solaris administrators often devise related sets of hostnames that form part of a single domain. For example, names of the planets, minerals, and jewels are commonly used. Alternatively, a descriptive name, such as “mail,” can be used to describe systems with a single purpose, such as mail servers.

IP Address
If your network does not provide DHCP, you will need to enter the IP address assigned to this system by the network administrator. It is important not to use an IP address that is currently being used by another host, because packets may be misrouted. Like a hostname, the IP address needs to be unique to the local system.

Netmask
You will next need to enter the netmask for the system, which will be 255.0.0.0 (class A), 255.255.0.0 (class B), or 255.255.255.0 (class C). If you’re not sure, ask your network administrator.

IPv6 Support
Next, you need to indicate whether IPv6 needs to be supported by this system. The decision to use or not to use DHCP will depend on whether your network is part of the mbone, the IP-v6-enabled version of the Internet. As proposed in RFC 2471, IPv6 will replace IPv4 in the years to come, as it provides for many more IP addresses than IPv4. Once IPv6 is adopted worldwide, there will be less reliance on stopgap measures like DHCP. However, IPv6 also incorporates a number of innovations above and beyond the addition of more IP addresses for the Internet—enhanced security provided by authenticating header information, for example, will reduce the risk of IP spoofing and denial of service attacks succeeding. Since IPv6 support does not interfere with existing IPv4 support, most administrators will want to support it.

Kerberos Server
Kerberos is a network authentication protocol that is designed to provide centralized authentication for client/server applications by using secret-key cryptography, which is based around tickets. Once a ticket has expired, the trust relationship between two hosts is broken. In order to use Kerberos, you’ll need to identify the name of the local KDC.

Name Services
A name service allows your system to find other hosts on the Internet or on the local-area network. Solaris supports several different naming servers, including the Network Information Service (NIS/NIS+), the Domain Name Service (DNS), or file-based name resolution. Solaris supports the concurrent operation of different naming services, so it’s possible to select NIS/NIS+ at this point, and set up DNS manually later. However, since most hosts are now connected to the Internet, it may be more appropriate to install DNS first, and install NIS/NIS+ after installation.

DNS Server
The Domain Name Service maps IP addresses to hostnames. If you select DNS as a naming service, you will be asked to enter a domain name for the local system. This should be the fully qualified domain name (for example, cassowary.net). If you selected DNS, you will either need to search the local subnet for a DNS server or enter the IP address of the primary DNS server that is authoritative for your domain. You may also enter up to two secondary DNS servers that have records of your domain. This can be a useful backup if your primary DNS server goes down. It is also possible that, when searching for hosts with a hostname rather than a fully qualified domain name, you would want to search multiple local domains. For example, the host www.buychapters.com belongs to the buychapters.com domain. However, your users may wish to locate other hosts within the broader cassowary.net domain by using the simple hostname, in which case you can add the cassowary.net domain to a list of domains to be searched for hosts.

NIS/NIS+ Server
NIS/NIS+ is a network information service that is used to manage large domains by creating maps or tables of hosts, services, and resources that are shared between hosts. NIS/NIS+ centrally manages the naming and logical organization of these entities. If you choose NIS or NIS+ as a naming service, you will need to enter the IP address of the local NIS or NIS+, respectively.

LDAP Server
LDAP is the Lightweight Directory Access Protocol, which provides a “white pages” service that supersedes existing X.500 systems and runs directly over TCP/IP. The LDAP server is used for managing directory information for entire organizations, using a centralized repository. If you wish to use an LDAP server, you will need to provide both the name of your profile and the IP address of the LDAP server.

Router
To access the local area network and the Internet, you will need to supply the IP address of the default router for the system. A router is a multihomed host that is responsible for passing packets between subnets. More information about routers is provided in Chapter 35.

Time Zone and Locale
The next section requires that you enter your time zone, as specified by geographic region, the number of hours beyond or before Greenwich Mean Time (GMT), or by time zone file. Using the geographic region is the easiest method, although if you already know the GMT offset and/or the name of the time zone file, you may enter that instead. Next, you are required to enter the current time and date, with a four-digit year, a month, day, hour, and minute. In addition, you will need to specify support for a specific geographic region in terms of locales, if required.

Power Management
Do you want your system to switch off automatically after 30 minutes of inactivity? If you can honestly answer yes to this question (for example, because you have a workstation that does not run services), then you should enable power management, because it can save costly power bills. However, if you’re administering a server, you’ll definitely want to turn power management off. A case in point: once your server has shut down in the middle of the night, and your clients cannot access data, you’ll understand why disabling power management is so important.

Proxy Server
A proxy server acts as a buffer between hosts on a local network and the rest of the Internet. A proxy server passes connections back and forth between local hosts and any other host on the Internet. It usually acts in conjunction with a firewall to block access to internal systems, thereby protecting sensitive data. One of the most popular firewalls is squid, which also acts as a caching server. To enable access to the Internet through a proxy server, you need to enter the hostname of the proxy server and the port on which the proxy operates.

64-bit Support
Solaris 9 provides support for 64-bit kernels for the SPARC platform. By default, only a 32-bit kernel will be installed. For superior performance, a 64-bit kernel is preferred because it can natively compute much larger numbers than the 32-bit kernel. In the 64-bit environment, 32-bit applications run in compatibility mode. The installation program will automatically select the appropriate kernel for your system.

Disk Selection and Layout
If you are performing an upgrade or installing a new system, you will need to decide whether or not to preserve any preexisting data on your target drives. For example, you may have five SCSI disks attached, only one of which contains slices used for a previous version of Solaris. Obviously, you will want to preserve the data on the four nonboot disks. However, partitions on the boot disk will be overwritten during installation, so it’s important to back up and/or relocate files that need to be preserved. Fortunately, if you choose to perform an upgrade rather than a fresh installation, many system configuration files will be preserved.

The Web Start Wizard will also ask you if you want to autolayout the boot disk slices, or if you want to manually configure them. You should be aware that the settings supplied by the installation program are very conservative, and trying to recover a system that has a full root file system can be time-consuming, especially given the low cost of disk space. It’s usually necessary to increase the size of the / and /var partitions by at least 50 percent over what the installer recommends. If you have two identical disks installed, and you have more space than you need, you can always set up volume management to ensure high availability through root partition mirroring—thus, if your primary boot disk fails, the system can continue to work uninterrupted until the hardware issue is resolved.

Finally, some client systems use NFS to remotely mount disks on central servers. While this can be a useful way of accessing a centralized home directory from a number of remote clients (by using the automounter), database partitions should never be remotely mounted. If you need to access remote partitions via NFS, you can nominate these partitions during the installation program.

Root Password
An important stage of the installation process involves selecting the root password for the superuser. The root user has the same powers as the root user on Linux, or the administrator account on Windows NT. If an intruder gains root access, he or she is free to roam the system, deleting or stealing data, removing or adding user accounts, or installing Trojan horses that transparently modify the way that your system operates.

One way to protect against an authorized user gaining root access is to use a difficult-to-guess root password. This makes it difficult for a cracker to use a password-cracking program to guess your password to be successful. The optimal password is a completely random string of alphanumeric and punctuation characters.

In addition, the root password should never be written down, unless it is locked in the company safe, nor should it be told to anyone who doesn’t need to know it. If users require levels of access that are typically privileged (such as mounting CD-ROMs), it is better to use the sudo utility to limit the access of each user to specific applications for execution as the superuser, rather than giving out the root password to everyone who asks for it. Role-based access control (RBAC) can also be used for this purpose.

The root password must be entered twice—just in case you should happen to make a typographical error, as the characters that you type are masked on the screen.

Software Selection
After all of the configuration settings have been entered, the following message will be seen on the screen:

Please wait while the system is configured with your settings...
The installation kiosk will then appear on the screen. The kiosk is primarily used to select the type of installation that you wish to perform. To begin the software selection process, you need to eject the Web Start CD-ROM, and insert the Software (1) CD-ROM. Next, you have the option of installing all Solaris software using the default options or customizing your selection before copying the files from the CD-ROM. Obviously, if you have a lot of disk space and a fast system, you may prefer to install the entire distribution, and delete packages after installation that you no longer require. This is definitely the fastest method. Alternatively, you can elect to perform a customized installation.

You are then presented with a screen of all the available software groups. Here, you may select or deselect individual package groups, or package clusters, depending on your requirements. For example, you may decide to install the Netscape Navigator software, but not install the NIS/NIS+ server for Solaris. After choosing the packages that you wish to install, you are then required to enter your locale based on geographic region (the U.S. entry is selected by default). You may also elect to install third-party software during the Solaris installation process—this is particularly useful if you have a standard operating environment that consists of using the Oracle database server in conjunction with the Solaris operating environment, for example. You would need to insert the product CD-ROM at this point so that it could be identified.

After selecting your software, you will need to lay out the disks. This involves defining disk slices that will store the different kinds of data on your system. The fastest configuration option involves selecting the boot disk and allowing the installer to automatically lay out the partitions according to the software selection that you have chosen. For example, you may wish to expand the size of the /var partition to allow for large print jobs to be spooled, or web server logs to be recorded.

Finally, you will be asked to confirm your software selections and proceed with installation. All of the packages will then be installed to your system. A progress bar displayed on the screen indicates which packages have been installed at any particular point, and how many remain to be installed. After you have installed all of the software, you will have to reboot the system. After restarting, your system should boot directly into Solaris unless you have a dual-booting system, in which case you will need to select the Solaris boot partition from the Solaris boot manager.

After installation, the system will reboot and display a status message when starting up, which is printed on the console. A sample console display during booting will look something like this:

ok boot
Resetting ...
SPARCstation 20 (1 X 390Z50), Keyboard Present
ROM Rev. 2.4, 256 MB memory installed, Serial #456543
Ethernet address 5:2:12:c:ee:5a HostID 456543
Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@1,0
File and args:
SunOS Release 5.9 Version generic [UNIX(R) System V Release 4.0]
Copyright (c) 1983-2001, Sun Microsystems, Inc.
configuring network interfaces: le0.
Hostname: server
The system is coming up. Please wait.
add net default: gateway 204.58.62.33
NIS domainname is paulwatters.net
starting rpc services: rpcbind keyserv ypbind done.
Setting netmask of le0 to 255.255.255.0
Setting default interface for multicast: add net 224.0.0.0: gateway client
syslog service starting.
Print services started.
volume management starting.
The system is ready.
client console login:
By default, the CDE login screen is displayed.

Network Installation
Although we’ve looked in detail at CD-ROM and DVD-ROM installation from a local drive, it’s actually possible to set up a single install server from which installation clients read all of their data. This approach is quite useful where a number of different clients will be using the same disk to install from, and/or if installation is concurrent. Thus, it’s possible for a number of users to install Solaris from a single server, which can be very useful when a new release of Solaris is made. For example, the Solaris 9 beta was distributed in a form suitable for network installation, allowing multiple developers to get their systems running as quickly as possible. For existing install servers, this reduces administration overhead, because different versions of Solaris (Solaris 8 and 9, for example) can be distributed from the same server.

The install server reads copies of the installation CD-ROMs and DVD-ROMs and creates a distributable image, which can then be downloaded by remote clients. In addition, it’s possible to create images for both SPARC and Intel versions that can be distributed from a single system; thus, a high-end SPARC install server could distribute images to many Intel clients. The install server uses DHCP to allocate IP addresses dynamically to all install clients. Alternatively, a name server can be installed and used for allocating permanent IP addresses to install clients.

To create SPARC disk images on the install server, the setup_install_server command is used. For a SPARC DVD-ROM or CD-ROM, this command is located in /cdrom/cdrom0/s0/Solaris_9/Tools. For an Intel DVD-ROM or CD-ROM, this command is located in /cdrom/cdrom0/Solaris_9/Tools. The only parameter that needs to be supplied to the command is the path where the disk images should be installed. You should ensure that the path can be exported to clients, and that the partition selected has sufficient disk space to store the images.

When creating Intel disk images, the same command is used, but the path is different: for a SPARC DVD-ROM or CD-ROM, the command is located in /cdrom/cdrom0/ Solaris_9/Tools, while for an Intel DVD-ROM or CD-ROM, the command is located in /cdrom/cdrom0/s2/Solaris_9/Tools.

To set up individual clients, the add_install_client command must be executed on the install server—once for each client. You need to specify the name of the client to be installed, as well as its architecture. For a sun4m system named pink, you would use the following command:

# /export/install/boot/Solaris_9/Tools/add_install_client pink sun4m
On the client side, instead of using boot cdrom at the ok prompt, you will need to enter the following command:

ok boot net
suninstall Installation
To boot with the suninstall program, you don’t use the Solaris 9 Installation CD-ROM; rather, the Solaris 9 Software 1 CD-ROM, which is bootable, should be employed. The suninstall program has the advantage of not requiring high-resolution graphics to complete installation: thus, a low-resolution monitor or terminal can be used. It requires a minimal amount of RAM, and allows you the greatest flexibility in configuring your system prior to installation (including internationalization). However, it does not allow you to install third-party software as part of the installation process, like the Web Start Wizard. The order of questions and procedures followed are generally the same as for the Web Start Wizard.

When installing Solaris Intel, using the suninstall method is more reliable than the Web Start Wizard, because it relies less on graphic cards and displays that may not be compatible with the Solaris X11 server.

JumpStart
JumpStart is an installation technology that allows a group of systems to be installed concurrently, using a standard file system layout and software package selection. For sites with hundreds of systems that are maintained by a small group of staff, it is the ideal tool for upgrading or reinstalling systems. For example, when a staff member leaves, his or her workstation can be simply reinstalled by using JumpStart, rather than assuming that no system software was modified or that a Trojan horse was not installed. By enforcing a standard operating environment (SOE), there is no need to individually configure every system that needs to be installed, greatly reducing the administrative burden on system administrators.

When using JumpStart on a large number of clients, installation can be expedited by using a sysidcfg file, which defines a number of standard parameters for installation. The sysidcfg file can contain configuration entries for the following properties:

Current date and time

DHCP server IP address

Local domain name

Graphics card

Local hostname

Local IP address

IPv6 support

Locale

Security policy

Monitor type

DNS server

NIS/NIS+ server

LDAP server

Netmask

Network interface

Pointing device

Power management

Root password

Security policy

Terminal type

Time zone

The following is a sample sysidcfg file:

system_locale=en_US
timezone=US/Eastern
timeserver=192.168.34.3
network_interface=le0 {netmask=255.255.255.0 protocol_ipv6=yes}
security_policy=NONE
terminal=dtterm
name_service=NONE
root_password=5fg48;r3f
name_service=NIS {domain_name=cassowary.net name_server=nis(192.168.44.53)}
Here, we can see that the system locale has been set to standard U.S. English, the time zone set to the U.S. East coast, the time server set to 192.168.34.3, and the network interface running IPv6 is set to /dev/le0. While the default terminal and root password are also set, the name service and security policy have not been set, because these might change from system to system. In addition, the name service selected is NIS, with the NIS server set to nis.cassowary.net (192.168.44.53).
Live Upgrade
All of the installation methods reviewed so far require an existing system to be brought to run level 0 in order to start the installation process. In addition, any system undergoing upgrade can expect to be in single-user mode for a matter of hours while distribution files are copied and third-party software is reinstalled. This kind of downtime may be unacceptable for a production server. While many departmental servers will no doubt have a backup server, which can take their place during upgrading and installation testing, many high-end servers, such as the StarFire, are logically divided into domains that run on a single system. A second standby system may not be available to replace a high-end server just for the purpose of an upgrade. While it’s possible to configure each domain individually, many sites would prefer to keep all servers at the same release level.

In such cases, Solaris now offers a Live Upgrade facility. This allows a separate boot environment to be created, with the distribution of the new operating system files installed to an alternative location. Once the installation of the new boot environment has been completed, the system needs only to be rebooted once to allow the system to run the new operating environment. If the new boot environment fails for some reason (such as a missing driver or hardware incompatibility), the old boot environment can be reinstated as the default, and the system can be rebooted into its previous state. This allows operations to resume as quickly as possible in the event of a failure.

One of the nice features of Live Upgrade is that the file system layout and configuration can be quite different from your existing installation. This allows you to fine-tune your existing settings before upgrading. For example, if print and mail jobs have continually caused the /var partition to overfill on a regular basis, the size of the /var partition can be increased in the new boot environment. Changes can be made to the /, /usr, /var, and /opt partitions. Other file systems continue to be shared between the existing and new boot environments unless otherwise specified.

In order to create a new boot environment, a separate partition must be identified and formatted before the procedure can begin. This partition must have sufficient disk space to install the new boot environment. The current contents of /, /usr, and /opt are then copied to the new partition prior to upgrade. Alternatively, if you have a second disk installed on the system, the existing files can be copied to the appropriate slices on the new disk. Once these files are in place, the new boot environment is ready to be upgraded. All of these processes can occur without interfering with the current boot environment.

Upgrading typically involves overwriting the files stored on the new boot environment in /, /usr, and /opt. Once this has been completed, the new boot environment can be activated and the system booted into the new environment.

Live Upgrade operates through a terminal-based menu that allows the following operations to be performed:

Activate Activates a newly installed boot environment.

Cancel Cancels a file transfer operation.

Compare Checks for differences between the new and current boot environments.

Copy Begins a file transfer operation.

Create Initializes a new boot environment.

Current Prints the name of the current boot environment.

Delete Uninstalls a boot environment.

List Displays the file systems in a boot environment.

Rename Modifies the name of a new or existing boot environment.

Status Prints the condition of any boot environment.

Upgrade Begins the upgrade process on the new boot environment.

Help Prints the help menu.

Exit Quits the program.

The OpenBoot PROM

In this chapter, you will
Analyze host setup details using OpenBoot commands

Change the default boot device

Test system hardware

Create device aliases using nvalias

Remove custom devices using nvunalias

Diagnose and troubleshoot booting problems

Halt a hung system

One of the main hardware differences between SPARC systems that run Solaris and PC systems that run Linux or Microsoft Windows is that SPARC systems have an OpenBoot PROM monitor program, which can be used to modify firmware settings prior to booting. In this chapter, we examine how the monitor can be used to boot a system and troubleshoot hardware problems.

The OpenBoot PROM Monitor
The OpenBoot PROM monitor is based on the Forth programming language, and can be used to run Forth programs that perform the following functions:

Booting the system, by using the boot command

Performing diagnostics on hardware devices by using the diag command

Testing network connectivity by using the watch-net command

The OpenBoot monitor has two prompts from which commands can be issued: the ok prompt, and the > prompt. In order to switch from the > prompt to the ok prompt, you simply need to type n:

> n
ok

Commands are typically issued from the ok prompt. These commands include boot, which boots a system from the default system boot device, or from an optional device specified at the prompt. Thus, if a system is at run level 0, and needs to be booted, the boot command with no options specified will boot the system:

ok boot
SPARCstation 20, Type 5 Keyboard
ROM Rev. 2.4, 256 MB memory installed, Serial #456543
Ethernet address 5:2:12:c:ee:5a HostID 456543
Rebooting with command:
Boot device: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,8...
SunOS Release 5.9 Version Generic 32-bit
Copyright (c) 1983-2002 by Sun Microsystems, Inc.
configuring IPv4 interfaces: hme0.
Hostname: Winston
The system is coming up. Please wait.
checking ufs filesystems
/dev/rdsk/c0t0d0s1: is clean.
NIS domainname is Cassowary.Net.
starting rpc services: rpcbind keyserv ypbind done.
Setting netmask of hme0 to 255.255.255.0
Setting default IPv4 interface for multicast: add net 224.0/
4: gateway Winston
syslog service starting.
Print services started.
volume management starting.
The system is ready.
winston console login:
Alternatively, if you have modified your hardware configuration since the last boot and you want the new devices to be recognized, you should always reboot using this command:

ok boot -r
This is equivalent to performing a reconfiguration boot using the following command sequence in a shell as the superuser:

# touch /reconfigure; sync; init 6
or

# reboot -- -r
So far, we’ve looked at automatic booting. However, sometimes it is desirable to perform a manual boot, using the command boot -a, where parameters at each stage of the booting process can be specified. These parameters include:

The path to the kernel that you wish to boot

The path to the kernel’s modules directory

The path to the system file

The type of the root file system

The name of the root device

For example, if we wished to use a different kernel, such as an experimental kernel, we would enter the following parameters during a manual boot:

Rebooting with command: boot -a
Boot device: /pci@1f,0/pci@1,2/ide@1/disk@0,1:a File and args: -a
Enter filename [kernel/sparcv9/unix]: kernel/experimental/unix
Enter default directory for modules [/platform/SUNW,Sparc-20/kernel
/platform/sun4m/kernel /kernel /usr/kernel]:
Name of system file [etc/system]:
SunOS Release 5.9 Version Generic 64-bit
Copyright (c) 1983-2002 by Sun Microsystems, Inc.
root filesystem type [ufs]:
Enter physical name of root device
[/pci@1f,0/pci@1,2/ide@1/disk@0,1:a]:
To accept the default parameters, simply press ENTER when prompted. Thus, to only change the path to the experimental kernel, we would enter kernel/experimental/unix at the Enter filename prompt.
Analyzing System Configuration
To view the OpenBoot release information for your firmware, as well as the system configuration, use the following command:

ok banner
SPARCstation 20, Type 5 Keyboard
ROM Rev. 2.4, 256 MB memory installed, Serial #456543
Ethernet address 5:2:12:c:ee:5a HostID 456543
Here, we can see the system is a SPARCstation 20, with a standard keyboard, and that the OpenBoot release level is 2.4. There are 256MB of RAM installed on the system, which has a hostid of 456543. Finally, the Ethernet address of the primary Ethernet device is 5:2:12:c:ee:5a.

Changing the Default Boot Device
To boot from the default boot device (usually the primary hard drive), you would enter the following:

ok boot
However, it is also possible to boot using the CDROM by using this command:

ok boot cdrom
The system may be booted from a host on the network by using this command:

ok boot net
Alternatively, if you have a boot floppy, the following command may be used:

ok boot floppy
Because many early Solaris distributions were made on magnetic tape, it’s also possible to boot using a tape drive with the following command:

ok boot tape
Instead of specifying a different boot device each time you want to reboot, it is possible to set an environment variable within the OpenBoot monitor, so that a specific device is booted by default. For example, to set the default boot device to be the primary hard disk, you would use the following command:

ok setenv boot-device disk
boot-device = disk
To verify that the boot device has been set correctly to disk, the following command can be used:

ok printenv boot-device
boot-device disk
In order to reset the system, to use the new settings, you simply use the reset command:

ok reset
To set the default boot device to be the primary network device, you would use the following command:

ok setenv boot-device net
boot-device = net
This configuration is commonly used for diskless clients, such as Sun Rays, which use RARP and NFS to boot across the network. To verify that the boot device has been set correctly to net, the following command can be used:

ok printenv boot-device
boot-device net disk
To set the default boot device to be the primary CD-ROM device, you would use the following command:

ok setenv boot-device cdrom
boot-device = cdrom
To verify that the boot device has been set correctly to cdrom, the following command can be used:

ok printenv boot-device
boot-device cdrom disk
To set the default boot device to be the primary floppy drive, you would use the following command:

ok setenv boot-device floppy
boot-device = floppy
To verify that the boot device has been set correctly to floppy, the following command can be used:

ok printenv boot-device
boot-device floppy disk
To set the default boot device to be the primary tape drive, you would use the following command:

ok setenv boot-device tape
boot-device = tape
To verify that the boot device has been set correctly to tape, the following command can be used:

ok printenv boot-device
boot-device tape disk
Testing System Hardware
The test command is used to test specific hardware devices, such as the loopback network device. This device could be tested by using the following command:

ok test net
Internal Loopback test - (OK)
External Loopback test - (OK)
This indicates that the loopback device is operating correctly. Alternatively, the watch-clock command is used to test the clock device:

ok watch-clock
Watching the 'seconds' register of the real time clock chip.
It should be ticking once a second.
Type any key to stop.
1
2
3
Tip Timing results can be cross-checked against a reliable timing device for accuracy.


If the system is meant to boot across the network, but a boot attempt does not succeed, it is possible to test network connectivity using the watch-net program. This determines whether or not the system’s primary network interface is able to read packets from the network it is connected to. The output from the watch-net program looks like this:

Internal Loopback test - succeeded
External Loopback test - succeeded
Looking for Ethernet packets.
'.' is a good packet. 'X' is a bad packet.
Type any key to stop
......X.........XXXX.....….XX............
In this case, a number of packets are marked as bad, even though the system has been connected successfully to the network.

In addition to the watch-net command, the OpenBoot monitor can perform a number of other diagnostic tests. For example, all of the SCSI devices attached to the system can be detected by using the probe-scsi command. The probe-scsi command displays all of the SCSI devices attached to the system. The output of probe-scsi looks like this:

ok probe-scsi
Target 1
Unit 0 Disk SUN0104 Copyright (C) 1995 Sun Microsystems All rights reserved
Target 1
Unit 0 Disk SUN0207 Copyright (C) 1995 Sun Microsystems All rights reserved
Here, we can see that two SCSI disks have been detected. If any other disks or SCSI devices were attached to the chain, they have not been detected, indicating a misconfiguration or hardware error.

Tip If you are using a PCI system, then SCSI devices may or may not appear.

Creating and Removing Device Aliases
The OpenBoot monitor is able to store certain environment variables in nonvolatile RAM (NVRAM), so that they can be used from boot to boot, by using the nvalias command. For example, to set the network device to use RARP for booting, we would use the following command:

ok nvalias net /pci@1f,4000/network@1,1:rarp

This means that booting using the net device, as shown in the following example, would use the /pci@1f,4000/network@1,1 device to boot the system across the network:

ok boot net
However, if we wanted to use the Dynamic Host Configuration Protocol (DHCP) to retrieve the host’s IP address when booting, instead of using RARP, we would use the following command:

ok boot net:dhcp
To remove the alias from NVRAM, you simply use the nvunalias command:

ok nvunalias net
This would restore the default value of net.
Troubleshooting Booting Problems
If a system fails to start correctly in multiuser mode, it’s likely that one of the scripts being run in /etc/rc2.d is the cause. In order to prevent the system from going multiuser, it is possible to boot directly into single-user mode from the ok prompt:

ok boot –s
...
INIT: SINGLE USER MODE
Type Ctrl-d to proceed with normal startup,
(or give root password for system maintenance):
At this point, the root password can be entered, and the user will be given a root shell. However, not all file systems will be mounted, although individual scripts can then be checked individually for misbehaving applications.

If the system will not boot into single-user mode, the solution is more complicated because the default boot device cannot be used. For example, if an invalid entry has been made in the /etc/passwd file for the root user, the system will not boot into single- or multiuser mode. To recover the installed system, the host needs to be booted from the installation CD-ROM into single-user mode. At this point, the default root file system can be mounted on a separate mount point, the /etc/passwd file edited, and the system rebooted with the default boot device. This sequence of steps is shown next, assuming that /etc is located on /dev/dsk/c0t0d0s1:

ok boot cdrom
...
INIT: SINGLE USER MODE
Type Ctrl-d to proceed with normal startup,
(or give root password for system maintenance):
# mkdir /temp
# mount /dev/dsk/c0t0d0s1 /temp
# vi /temp/etc/passwd
# sync; init 6
Using eeprom
Solaris provides an easy way to modify the values of variables stored in the PROM through the eeprom command. The eeprom command can be used by the root user when the system is running in either single- or multiuser mode. The following variables can be set, as shown next with their default values:

# /usr/sbin/eeprom
tpe-link-test?=true
scsi-initiator-id=7
keyboard-click?=false
keymap: data not available.
ttyb-rts-dtr-off=false
ttyb-ignore-cd=true
ttya-rts-dtr-off=false
ttya-ignore-cd=true
ttyb-mode=9600,8,n,1,-
ttya-mode=9600,8,n,1,-
pcia-probe-list=1,2,3,4
pcib-probe-list=1,2,3
mfg-mode=off
diag-level=max
#power-cycles=50
system-board-serial#: data not available.
system-board-date: data not available.
fcode-debug?=false
output-device=screen
input-device=keyboard
load-base=16384
boot-command=boot
auto-boot?=true
watchdog-reboot?=false
diag-file: data not available.
diag-device=net
boot-file: data not available.
boot-device=disk net
local-mac-address?=false
ansi-terminal?=true
screen-#columns=80
screen-#rows=34
silent-mode?=false
use-nvramrc?=false
nvramrc: data not available.
security-mode=none
security-password: data not available.
security-#badlogins=0
oem-logo: data not available.
oem-logo?=false
oem-banner: data not available.
oem-banner?=false
hardware-revision: data not available.
last-hardware-update: data not available.
diag-switch?=false
Halting a Hung System
If a system is hung, and commands cannot be entered into a shell on the console, then the key combination STOP-A can be used to halt the system and access the OpenBoot PROM monitor.

Caution If the system is halted and rebooted in this way, all data that has not been written to disk will be lost, unless the go command is used to resume the system’s normal operation.


An alternative method of accessing a system if the console is locked is to telnet to the system as an unprivileged user, using the su command to obtain superuser status, and kill whatever process is hanging the system. Normal operation can then be resumed.

STOP Commands
The STOP commands are executed on the SPARC platform by holding down the special STOP key located on the left-hand side of the keyboard, and another key that specifies the operation to be performed. The following functions are available:

STOP
Enters the POST environment.

STOP-A
Enters the PROM monitor environment.

STOP-D
Performs diagnostic tests.

STOP-F
Enters a program in the Forth language.

STOP-N
Initializes

Boot Commands
You can use the boot command with any one of the following options:

net
Boots from a network interface.

cdrom
Boots from a local CD-ROM drive.

disk
Boots from a local hard disk.

tape
Boots from a local tape drive.


In addition, you can specify the name of the kernel to boot by including its relative path after the device specifier. Or, you can pass the –a option on the command line to force the operator to enter the path to the kernel on the boot device.

System Concepts

In this chapter, you will
Understand the role of the kernel, shell and file system

Review commonly used Solaris shells

Investigate the distinction between a multiuser system and a multitasking system

Explore the role of clients and servers

Define hosts, hostnames, networks, and IP addresses

Explore the range of SPARC and Intel hardware supported by Solaris

Understanding what makes Solaris different from other operating systems is critical to appreciating why it is the environment of choice for high-availability client/server environments. In this chapter, we review the terms used to describe Solaris systems and major components, as well as networking terminology associated with Solaris networks. Understanding these terms will ensure that you understand some of the concepts discussed in later chapters. Much Solaris terminology is particular to the context of Solaris systems, and some generic terms may have one meaning in Solaris but another meaning for other operating systems. For example, while the term host may be used generically to identify any system attached to a network, it may be used in Solaris, to refer to multihomed hosts.

The Kernel
Operating systems are the building blocks of computer systems, and they provide the interface between user applications and computer hardware. Solaris is a multiuser, multitasking operating system developed and sold by Sun Microsystems (http://www.sun.com/), and it is one implementation of the UNIX operating system that draws on both the System V (AT&T) and Berkeley (BSD) systems. Solaris has evolved from little more than a research project to become the dominant UNIX operating system in the international marketplace.

Solaris 9 is the latest in a long line of operating environment releases that are based around the SunOS operating system, which is currently in version 5.9. Solaris is commonly found in large corporations and educational institutions that require concurrent, multiuser access on individual hosts and between hosts connected via the Internet.

Many desktop computer users have never heard of the word Sun in the context of computing, nor are they usually familiar with the term Solaris as an operating environment. However, almost every time that an Internet user sends an e-mail message or opens a file from a networked server running Sun’s Network File System (NFS) product, Solaris is transparently supporting the Internet applications that allow these things to happen. In the enterprise computing industry, Sun is synonymous with highly available, highly reliable performance hardware, while Solaris is often the operating environment of choice to support database servers and application servers. Sun’s hardware solutions are based around the SPARC and UltraSPARC integrated circuit technologies, which can currently support more than 64 processors in a single server system, such as the E10000 StarFire configuration.

UNIX is hard to define because different vendors have historically introduced different features to arrive at the entities that most users would think of as UNIX. However, it is easy enough to list the fundamental characteristics that are common to all UNIX and UNIX-like systems:

They have a kernel, written in the C programming language, which mainly manages input/output processing rather than being a complete operating system. The kernel has ultimate responsibility for allocating system resources to complete various tasks.

They have a hierarchical file system, which begins with a root directory and from which the branches of all other directories (and file systems) are mounted.

System hardware devices are represented logically on the file system as special files (such as /dev/pty, for pseudoterminals).

They are process-based, with all services and user shells being represented bya single identifying number (the process ID, or PID).

They share a set of command-line utilities that can be used for text and numeric processing of various kinds, such as troff, col, cat, head, tbl, and so on.

User processes can be spawned from a shell, such as the Bourne shell, which interactively executes application programs.

Multiple processes can be executed concurrently by a single user and sent into the background by using the & operator.

Multiple users can execute commands concurrently by logging in from pseudoterminals.

Note that a graphical user interface (GUI) is not necessarily a defining feature of UNIX, unlike other desktop operating systems, which place much stock in “look and feel.” Although CDE remains the default desktop for Solaris 9, Sun plans to integrate the GNOME window manager (http://www.gnome.org/) into future maintenance releases. GNOME is currently the leading desktop of Linux users. Integrating GNOME into Solaris 9 will lead to greater interoperability between Solaris and Linux systems, particularly in terms of GUI application development. It will also make porting GUI applications between Solaris and Intel easier, because Linux back-end applications have been able to be executed on Solaris Intel for some time by using lxrun.

The reasons for this distinction are largely historical and related to the UNIX design philosophy. For operating systems that are not layered, changing the window manager or even the look and feel involves rewriting significant portions of back-end code. In the Solaris environment, where the interface and display technologies are appropriately abstracted from the underlying kernel, moving from CDE to GNOME involves simply changing the command to initialize the X11 display manager; the kernel remains unmodified. The layering of the various components of a UNIX system is shown in Figure 2-1.


Figure 2-1: Components of a UNIX system
Broadly speaking, a UNIX system is layered according to applications that are invoked through user shells, which are managed by a kernel—which in turn uses file systems to create a persistence storage mechanism. Because the kernel provides the interface between shells and the file system, (and by extension, between applications and the file system), it is considered the central part of UNIX technology.

Solaris kernels can trace their origins to both the System V and BSD variants of UNIX, while Microsoft NT was based on the Virtual Memory System (VMS) kernel originally developed for the high-end VAX systems. Most kernels during the 1960s were written using assembly language or machine (binary) code, so the development of a high-level language for writing kernels (the C language) was one of the founding ideas of UNIX. This level of abstraction from hardware meant that kernels could be ported to other hardware platforms without having to be completely rewritten. The tradition of writing kernels in C continues today, with the Linux kernel (for example) being written in C. Obviously, a kernel alone is not a complete operating environment, so many additional applications (such as the visual editor, vi) were later added to what UNIX users would recognize as the suite of standard UNIX tools.

All UNIX systems have a kernel, which is the central logical processor that provides an interface between the system hardware, the system services, and the user shells that directly enable applications. For example, support for network interfaces is provided in the form of a kernel module and a device file that logically represents the physical device. Services are defined in the services database, and network daemons provide the final layer for supporting applications that use the network to transmit data. Since UNIX kernels are typically written in the C programming language, many systems-level applications and daemons are also written in C.

Of course, UNIX systems share some common characteristics with other operating systems, including the use of a hierarchical file system in which special files called directories are used to arrange related files logically. But UNIX has some distinctive features as well: explicit permissions to read, execute, and modify files on the UNIX file system can be granted to specific users or groups of users, making it easy to share work and collaborate with other users on the system.

Because UNIX was created by active developers, rather than by operating system gurus, the focus was on creating an operating system that suited a programmer’s needs. A Bell System Technical Journal article in 1978 lists the following key guiding principles of UNIX development:

Create small, self-contained programs that perform a single task. When a new task needs to be solved, either create a new program that performs it or combine tools from the toolset that already exists to arrive at a solution. This is a similar orientation to the current trend toward encapsulation and independent component building (such as Enterprise JavaBeans), where complicated systems are built from smaller interacting but logically independent modules.

Programs should accept data from standard input and write to standard output; thus, programs can be “chained” to process each other’s output sequentially. Interactive input should be avoided in favor of command-line options that specify a program’s actions to be performed. Presentation should be separated from what a program is trying to achieve. These ideas are consistent with the concept of piping, which is still fundamental to the operation of user shells. For example, the output of the ls command to list all files in a directory can be "piped" using the "|" symbol to a program such as grep, to perform pattern matching. The number of pipes on a single command-line instruction is not limited.

Creating a new operating system or program should be undertaken on a scale of weeks, not years—the creative spirit that leads to cohesive design and implementation should be exploited. If software doesn’t work, don’t be afraid to build something better. This process of iterative revisions of programs has resurfaced in recent years with the rise of object-oriented development.

Make best use of all the tools available, rather than asking for more help. The motivation behind UNIX is to construct an operating system that supports the kinds of toolsets that are required for successful development.

This is not intended to be an exhaustive list of the kernel-oriented characteristics that define UNIX; however, these features are central to understanding the importance that UNIX developers often ascribe to the operating system. It is designed to be a programmer-friendly system.

The Shell
A key Solaris concept is the functional separation between the user interface and the operating system. This distinction means that a user can access a Solaris system by using either a terminal-based character user interface (CUI) or a high-resolution graphical user interface (GUI) without modifying the underlying operating system.

With so much attention paid to GUI, why are CUI environments still important to Solaris? Are they just a historical hangover that Windows has managed to overcome? Or are they simply the tools of choice for long-haired network administrators who have never used a mouse? In fact, mastering the Solaris command line is one of the effective tools available under any UNIX environment, and the good news is it’s not that difficult to learn. Using the command line (or shell) has several advantages over GUI environments.

The shell is essential for programming repetitive tasks that can be performed laboriously through a GUI. For example, searching a file system for all document files that have changed each day and making a copy of all these files (with the extension .doc) to a backup directory (with the extension .bak) takes time.

The shell can be used to search for, modify, edit, and replace Solaris configuration files, which are typically storied in text format. This is much like the approach taken with Windows .ini configuration files, which were text-based. However, after Windows 95, Windows versions store configuration information in the Registry in a binary format, making it impossible to edit manually. All Solaris configuration files, including the startup scripts, are text-based.

The shell has a number of built-in commands that typically mirror those provided in the C programming language. This means that it is possible to write small programs as shell statements that are executed as sequential steps, without having to use a compiler (just like MS-DOS batch files are interpreted without requiring a compiler).

The shell can be used to launch applications that use a CUI, which is especially useful for logging onto a remote system and enabling access to the commands an administrator can use on the console, a valuable point in this era of global information systems. While Windows applications like Symantec’s pcAnywhere can be used for remote access to the Windows Desktop, they don’t easily support multiuser access (or multiuser access where one user requires a CUI and another a GUI).

The shell can be used to execute commands for which no equivalent GUI application exists. Although many operations could conceivably be performed using a GUI, it is usually easier to write a shell script than create a completely new GUI application.

Many applications in Solaris, Linux, and Windows are now available through a GUI interface. If you feel more comfortable using GUI interfaces, there is little reason to stop using them as long as you can find the tools to perform all of the tasks you need to undertake regularly, such as monitoring resource usage, setting process alarms and diagnostics, and/or remote access. However, if you want to make the most of Solaris and competently administer the system, you will need to become familiar with the shell and command-line utilities.

In keeping with the philosophy that different administrators have different needs and styles, Solaris makes several different shells available:

Bourne shell (sh) The original UNIX shell used to write all system scripts by convention.

Korn shell (ksh) Provides enhanced input/output features, including the print and read commands.

C shell (csh) Offers a command syntax similar to the C programming language.

The Cornell shell (tcsh) Includes improved terminal handling compared to the original C shell.

Bourne Again shell (bash) An open source, much improved version of the Bourne shell.

Exercise 2-1 Find out if these shells are installed on your system, and what others might be supported. Precompiled binary shells can be downloaded from www.sunfreeware.com
The File System
UNIX also features a hierarchical file system that makes it easy for you to separate related files logically into directories, which are themselves special files. While MS-DOS and similar operating systems feature a hierarchical file system with simple file access permissions (such as read only), UNIX has a complete user-based file access permission system. Like process management, each file on the system is “owned” by a specific user, and by default only that user can perform operations on that file. Privileged users can perform all operations on all files on the file system. Interestingly, a special file permission allows unprivileged users to execute certain commands and applications with superuser privileges (such as setuid).

The following file system types are supported by the kernel:

cachefs The CacheFS cached file system

hsfs The High Sierra file system

nfs The Network File System (NFS)

pcfs The MS-DOS file system

tmpfs A file system that uses memory

ufs The standard UNIX File System (UFS)

The default local file system type is contained in the /etc/default/fs file, while the default remote file system type is contained in the /etc/default/fstypes file.




Multiuser vs. Multitasking
Operating systems like MS-DOS are single-user, single-task systems; they are designed to be used by a single user who wishes to execute a single program from the shell. However, with advances in CPU technology, even the humble MS-DOS shell was expanded to allow multitasking, where more than one application can execute concurrently. This approach was extended with Microsoft Windows, which allows several applications to be executed concurrently in a GUI environment. In addition, Microsoft Windows has support for multiple users, although it is generally possible for only a single user to initiate a console session, limiting its concurrency—unless some third-party product is installed (such as Symantec’s pcAnywhere, or Terminal Server with Windows 2000/XP).

UNIX provides the best of both worlds, because it is designed from the ground up to permit multiple users to initiate multiple shells, which in turn can execute multiple applications. In addition, Solaris supports lightweight processes such as threads, which allow the traditional concept of multitasking to be generalized to execute multiple threads within a single process. Solaris also supports symmetric multiprocessing, meaning that the physical execution of processes, threads, and user applications may occur on one of many different supported processors.

Client/Server Networks
While PC operating systems were designed in response to the waning of client/server systems, Solaris and other UNIX systems are firmly designed as client/server systems. While a PC is designed to run many high-powered applications using the local CPU, a client/server network is designed around the concept of multiple thin clients that access data and execute applications on a fat centralized server, or on a number of servers that are dedicated to one particular purpose. For example, a typical Solaris network might consist of hundreds of Sun Ray thin client systems, which are supported on the front line by several E450 departmental servers, as well as a set of rack-mounted 420R systems that run database, web server, and development systems.

The client/server topology is also reflected in the structure of UNIX services: client applications running on client systems are designed to connect through to server applications running on server systems. Sun was instrumental in initiating key distributed computing technologies, such as the Remote Procedure Call (RPC) technology used in the Network File System (NFS) protocol. In addition, the Remote Method Invocation (RMI) technology developed as part of the Java networking and distributed computing APIs allows objects to be passed around the network as seamlessly as RPC.

Basic Networking Terminology
A Solaris network consists of a number of different hosts that are interconnected using a switch or a hub. Solaris networks connect to one another via routers, which can be dedicated hardware systems, or Solaris systems, which have more than one network interface. Each host on a Solaris network is identified by a unique hostname; these hostnames often reflect the function of the host in question. For example, a set of four FTP servers may have the hostnames ftp1, ftp2, ftp3, and ftp4.

Every host and network that is connected to the Internet uses the Internet Protocol (IP) to support higher-level protocols such as Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). Every interface of every host on the Internet has a unique IP address that is based on the network IP address block assigned to the local network. Networks are addressable by using an appropriate netmask that corresponds to a class A (255.0.0.0), class B (255.255.0.0), or class C (255.255.255.0) network.

Solaris supports multiple Ethernet interfaces that can be installed on a single machine. These are usually designated as /etc/hostname.hmen, where n is the interface number and hme is the interface type. Interface files contain a single unqualified domain name or IP address, with the primary network interface being designated with an interface number of zero. Thus, the primary interface of a machine called ftp would be defined by the file /etc/hostname.hme0, which might contain the unqualified domain name “ftp”, or the IP address 203.17.64.28. A secondary network interface, connected to a different subnet, might be defined in the file /etc/hostname.hme1. In this case, the file might contain the unqualified domain name “mail”, or the IP address 10.17.65.28.

The decision to use unqualified domain names or IP addresses rests largely with the naming service used by the system, which is defined by the file /etc/nsswitch.conf. If this file does not allow hostname resolution from the /etc/hosts because the Domain Name System (DNS) is used exclusively, using unqualified domain names in /etc/hostname.* files can lead to a failure of local hostname resolution. However, because IP addresses can change from time to time (particularly if Dynamic Host Configuration Protocol, or DHCP, is used), some administrators may need to use unqualified domain names.

Enabling multiple interfaces is commonly used in organizations that have a provision for a failure of the primary network interface or to enable load balancing of server requests across multiple subnets (for example, for an intranet web server processing HTTP requests). A system with a second network interface can act either as a router or as a multihomed host. Hostnames and IP addresses are locally administered through a naming service, which is usually DNS for companies connected to the Internet, and the Network Information Service (NIS/NIS+) for companies with large internal networks that require administrative functions beyond what DNS provides, including centralized authentication.

It is also worth mentioning at this point that it is possible for you to assign different IP addresses to the same network interface; this configuration can be useful for hosting “virtual” interfaces that require their own IP address, rather than relying on application-level support for multihoming (for example, when using the Apache web server). You simply create a new /etc/hostname.hmeX:Y file for each IP address required, where X represents the physical device interface and Y represents the virtual interface number.

The subnet mask used by each of these interfaces must also be defined in /etc/ netmasks. This is particularly important if the interfaces lie on different subnets, or if they serve different network classes. In addition, it might also be appropriate to assign a fully qualified domain name to each of the interfaces, although this will depend on the purpose to which each interface is assigned.

System Configuration
Solaris provides a simple way to view all the hardware devices on your system. This information can be used to configure your system. For example, by identifying the disk devices on your system, you can correctly select targets for formatting.

The prtconf command is used for displaying system information:

prtconf
System Configuration: Sun Microsystems sun4u
Memory size: 128 Megabytes

This section shows the hardware architecture (sun4u, which means that this is a Sun 4 system with an UltraSPARC CPU) and that it has 128MB of RAM.

The following section identifies the terminal emulator, keyboard, and UFS. These devices are necessary to boot a Solaris system.

System Peripherals (Software Nodes):
SUNW,Ultra-5_10
packages (driver not attached)
terminal-emulator (driver not attached)
disk-label (driver not attached)
SUNW,builtin-drivers (driver not attached)
sun-keyboard (driver not attached)
ufs-file-system (driver not attached)
The next section shows the OpenBoot PROM (programmable read-only memory), physical memory, and virtual memory monitor devices:

chosen (driver not attached)
openprom (driver not attached)
client-services (driver not attached)
options, instance #0
aliases (driver not attached)
memory (driver not attached)
virtual-memory (driver not attached)
The final section displays devices attached to the first PCI local bus. This includes an Integrated Device Electronics (IDE) hard disk, IDE hard drive, and network interface:

pci, instance #0
pci, instance #0
ebus, instance #0
auxio (driver not attached)
power, instance #0
SUNW,pll (driver not attached)
se, instance #0
su, instance #0
su, instance #1
ecpp (driver not attached)
fdthree, instance #0
eeprom (driver not attached)
flashprom (driver not attached)
SUNW,CS4231 (driver not attached)
network, instance #0
SUNW,m64B (driver not attached)
ide, instance #0
disk (driver not attached)
cdrom (driver not attached)
dad, instance #0
sd, instance #30
Note Obviously, the specific devices installed on each system vary, and so will the configuration displayed when using prtconf.

Processes
Processes lie at the heart of all modern multiuser operating systems. By dividing system tasks into small, discrete elements that are uniquely identified by a process identifier (PID), Solaris is able to manage all the applications that may be concurrently executed by many different users. In addition, individual users may execute more than one application at any time. Each Solaris process is associated with a UID and a GID, just like a standard file. This means that only users may send signals to their own processes (except for the superuser, who may send signals to any process on the system). Signals are typically used to restart or terminate processes. The multiuser, multitasking process model in Solaris ensures that system resources can be shared equally among all competing processes or allocated preferentially to the most important applications. For example, a firewall application would probably take precedence over all other system processes. Individual users and the superuser may allocate a priority level to active processes in real time.

Solaris provides a number of command-line tools that can be used to manage processes. In addition, APIs are provided for C programmers to allow them to operate directly on processes—spawning, managing, and killing as necessary. Solaris also provides lightweight processes (LWPs) that don’t require as much overhead to operate as “normal” processes.

Naming Services
Every computer connected to the Internet must have an IP address, which identifies it uniquely within the network. For example, 192.18.97.241 is the IP address of the web server at Sun. IP addresses are difficult for humans to remember, and they don’t adequately describe the network on which a host resides. Thus, by examining the fully qualified domain name (FQDN) of 192.18.97.241—www.sun.com—it’s immediately obvious that the host, www, lies within the sun.com domain. The mapping between human-friendly domain names and machine-friendly IP addresses is performed by a distributed naming service known as the Domain Name Service (DNS). DNS is the standard protocol used by UNIX systems (and other operating systems) for mapping IP addresses to hostnames, and vice versa.

Although Solaris provides complete support for DNS, it uses its own domain management and naming system, known as the Network Information Service (NIS). NIS is not only responsible for host naming and management, but it is a comprehensive resource management solution that can be used to structure and administer groups of local and remote users.

NIS uses a series of maps to create namespace structures. Sometimes administrators ask why this extra effort is required to manage hosts and naming, because DNS already provides this for Internet hosts by converting computer-friendly IP addresses to human-friendly “names.” However, NIS does not just provide naming services; a NIS server also acts as a central repository of all information about users, hosts, Ethernet addresses, mail aliases, and supported Remote Procedure Call (RPC) services within a network. This information is physically stored in a set of maps that are intended to replace the network configuration files usually stored in a server’s /etc directory, ensuring that configuration data within the local area network (LAN) is always synchronized. Many large organizations use NIS alongside DNS to manage both their Internet and LAN spaces effectively. Linux also supports NIS.

In the past, Sun introduced an enhanced version of NIS known as NIS+. Instead of a simple mapping system, it uses a complex series of tables to store configuration information and hierarchical naming data for all networks within an organization. Individual namespaces may contain up to 10,000 hosts, with individual NIS+ servers working together to support a completely distributed service. NIS+ also includes greater capabilities in the area of authentication, security (using DES encryption), and resource access control.

Recently, Solaris has begun a transition to Lightweight Directory Access Protocol (LDAP) directory services as an alternative source of authoritative information for naming, identification, and authentication. LDAP is based on the original Directory Access Protocol (DAP), which provided X.500-type services for centralized directory lookups. Like NIS and NIS+, LDAP performs lookups, given a token, and returns a result. However, the query is much more generalized than what can be returned from NIS or NIS+: text, sounds, and graphics can all be associated with an entry in the directory.

LDAP does not provide any kind of programmatic query language, like SQL, to query the directory, so its use is still limited. However, because it works directly over TCP/IP, and it can support directory services for clients on different operating systems, LDAP is often viewed as the future central naming and directory service for Solaris.

Server-Side Java
Java is a new programming language that is often used to create platform-independent GUIs that a user can interact with in complex and sophisticated ways. However, Java applets—the bits of code that are transmitted over the Internet and executed on the user’s machine—are only one side of the whole Java story. This section will focus on the server side of Java.

Java applications that execute on the server are called servlets, and they have their own standard API specification that has now been widely implemented in web server extension products known as servlet runners (such as Apache’s Tomcat server). Servlets are useful in developing web-enabled, Solaris-based enterprise applications.

Increasingly, applications in the enterprise are being implemented using web interfaces, partly in response to the persistent heterogeneity of computing platforms within organizations that span cities, states, and even nations. Accepting platform diversity does not mean losing control of standards, however. Sun Microsystems has pioneered a platform-independent programming language in which applications run on top of a logical Java Virtual Machine (JVM) that presents a consistent API for developers. Most major hardware platforms and operating systems now have virtual machines implemented, including (obviously) Solaris. In fact, the Solaris JVM produced by Sun has been highly optimized in its production release series. JVMs have also been integrated into popular web browsers, so that Java programs can be downloaded from a server and executed within these browsers. (HTML has an tag that facilitates this process.) Applets have increased the complexity of web-based user interfaces from simple arrays of buttons and forms to dynamic interaction with the user in a way that is similar to a normal desktop application.

Although Java has been successful in improving the client side of web-based computing, it has been slower to make an impact on the server side (this is as much a result of the excitement surrounding applets as any deficit in the servlet API). However, many people believe that the server side is where Java has its greatest potential. The notion of having platform-independent enterprise applications that run through a standard web interface promises to change the way that users, developers, and software interact. The “write once, run anywhere” philosophy means that servers with totally different operating systems and hardware can be replaced with newer systems, without concern for application stability and porting. Commonly used Java classes can be bundled as beans that can provide rapid implementation for a client’s business logic. Full access to the Java API and database servers is also provided for Java servlets, using the Java Database Classes (JDBC) supplied by Oracle and other major vendors. These features ensure that today’s Java server-side programs will not become tomorrow’s legacy applications.

How does server-side Java compare to web-based client/server techniques such as the combination of a Common Gateway Interface (CGI) and a non-object-oriented language such as C? Although a compiled language like C is faster on a byte-per-byte basis than an interpreted language like Java, performance increases for Java can be gained by the combination of optimizing “just-in-time” (JIT) compilers for specific platforms and by reducing the process and memory overhead associated with the CGI. For example, if you wrote a search application in Perl that was accessed by 1,000 web users per hour, that would mean an extra 1,000 invocations of Perl that the server has to deal with, unless a specialized module was used. Of course, if you are running on an E10000, this would probably result in a negligible system strain. For other systems, invoking a Java servlet that occupies only a single process after being loaded into memory, and which persists across sessions, is both memory and process efficient. Servlets are therefore more appropriate for applications that are constantly being executed by multiple users, by taking advantage of Java’s multithreading and synchronization capabilities.

On the flip side, CGI programs are often better suited to single-user, infrequently used, and numerically intensive applications that might only be invoked once per hour. In addition, CGI programs written in C are logically isolated from each other in the server’s memory space: if Java servlets are executed using a single instance of a service manager (for example, Live Software’s Jrun), an unhandled exception arising from malformed or unexpected input could potentially impact all servlets running through the manager, especially if the JVM crashes.
SPARC Hardware
Sun has developed a wide range of hardware systems over the past few years, many of which are still supported by Solaris 9. These systems are based on the Scalable Processor ARChitecture (SPARC), which is managed by a SPARC member organization ( http://www.sparc.org/). In addition to Sun Microsystems, Fujitsu (http://www.fujitsu.com/) and T.Sqware (http://www.tsqware.com/) also build SPARC-compliant CPU systems. System vendors that sell systems based on SPARC CPUs include Amdahl Corporation (http://www.amdahl.com/), Tatung (http://www.tatung.com/), Tadpole ( http://www.tadpole.com/), and Toshiba (http://www.toshiba.com/). Vendors of system boards and peripherals for SPARC CPU–based systems include Hitachi (http://www.hitachi.com/ ), Seagate (http://www.seagate.com/), and Kingston Technology ( http://www.kingston.com/).

Although media critics and competitors often paint SPARC systems from Sun as stand-alone, vendor-specific traps for the unwary, the reality is that a large number of hardware vendors also support the SPARC platform. It should also be noted that software vendors such as Red Hat also support SPARC versions of Linux, which proves that Solaris is not the only operating system that powers the SPARC platform. The SPARC standards can be downloaded free of charge from http://www.sparc.org/standards.html.

Often, administrators of Linux and Microsoft Windows systems who are used to “PC” hardware are incredulous to discover that some supported systems (such as the SPARCclassic) have CPUs that run below 100 MHz. This must seem a slow CPU speed in the age of Intel CPUs and their clones reaching the 1-GHz mark. However, CPU speed is only one component that contributes to the overall performance of a system—SPARC systems are renowned for their high-speed buses and very fast I/O performance. In addition, many SPARC systems were designed for continuous operation—it is not unheard of for systems to have several years of uptime, compared to several days for some operating systems. The many impressive features of the Solaris operating systems were developed with the SPARC hardware platform as a target, and these systems naturally have the best performance. The following is an actual uptime reported by the technical editor:

$ uptime
1:36pm up 718 day(s), 22:44, 1 user, load average: 0.23, 0.15, 0.13
However, Sun has not ignored hardware developments and emerging standards—in recent years, Sun has created the Ultra series of workstations and servers that feature a PCI local bus and compatibility with Super Video Graphics Array (SVGA) multisync monitors commonly sold with PC systems. Of course, SPARC systems have always supported the SCSI standard, and all SCSI devices will work with Solaris. At the same time, Sun has proceeded with innovations, such as the 64-CPU Enterprise 10000 system, which can operate as a single system with massively parallel computational abilities, or it can be logically partitioned to act as up to 64 different systems. Imagine being able to control an entire application service provider (ASP) with no apparent “shared hosting” to the client, which is actually being serviced by a single physical system. Although the up-front cost of an E10000 far exceeds that required for 64 systems running Linux or Microsoft Windows, only one administrator is required to manage an E10000, while 64 different systems might require more than one administrator.

Supported Platforms
SPARC systems have an application architecture and a kernel architecture: most modern Sun systems have an application architecture of type 4, while the latest UltraSPARC systems have a kernel architecture of type u. Thus, UltraSPARC systems are known as sun4u systems. One of the great advantages of SPARC is that systems with the same application architecture can run the same binaries; thus, the binary of an application compiled on an Ultra 1 should work on an E10000. However, the kernel architecture has changed significantly over the years, so that systems with different kernel architectures cannot boot the same kernel. While an Ultra 1 and E-450 can boot from the same sun4u kernel, a SPARCstation 5 must boot from a sun4m kernel.

Table 2-1 shows a list of common application and kernel architectures for some type 4 Sun systems.

Table 2-1: Common Application and Kernel Architectures for Sun-4 Systems Application
Kernel
Architecture
System Name

4
C
sun4c
SPARCstation 1

4
C
sun4c
SPARCstation IPX

4
M
sun4m
SPARCstation 5

4
M
sun4m
SPARCstation 10

4
D
sun4d
SPARCserver 1000

4
D
sun4d
SPARCcenter 2000

4
U
sun4u
UltraSPARC 5

4
U
sun4u
Enterprise 220R


You will need a Sun-4 architecture system to run Solaris 9, or any kind of modern UNIX kernel for that matter. (Your old 3/60 really does belong in a museum!) Even some Sun-4 architectures have had support deprecated in Solaris 9, mainly because of the requirement for a minimum of 96MB of RAM. The following SPARC systems are supported under Solaris 9:

SPARCclassic
SPARCstation LX
SPARCstation 4
SPARCstation 5

SPARCstation 10
SPARCstation 20
Ultra 1 (including Creator and Creator 3D models)
Enterprise 1

Ultra 2 (including Creator and Creator 3D models)
Ultra 5
Ultra 10
Ultra 30

Ultra 60
Ultra 450
Enterprise 2
Enterprise 150

Enterprise 250
Enterprise 450
Enterprise 3000
Enterprise 3500

Enterprise 4000
Enterprise 4500
Enterprise 5000
Enterprise 5500

Enterprise 6000
Enterprise 10000
SPARCserver 1000
SPARCcenter 2000


Some popular systems are no longer supported, particularly those in the sun4c family. Often, these systems can be upgraded with a firmware or CPU change to be compatible with Solaris 9. In addition, a minimum of 96MB of RAM is required to install Solaris 9— the Web Start Wizard will not let you proceed unless it can detect this amount of physical RAM, so be sure to check that your system meets the basic requirements before attempting to install Solaris 9.

Note Some machines listed in Table 2-1 will support Solaris 9, but only in 32-bit mode.


System Components
A typical Solaris SPARC workstation consists of the following components:

Base unit (aka “pizza box”), which contains the motherboard, SCSI controller, and SBUS cards

Frame buffer or graphics card

SCSI or IDE units connected by SCSI or IDE cables to the SCSI or IDE controller in the pizza box

CD-ROM drive, internal or external (SCSI or IDE)

DVD-ROM drive, internal on newer systems

Speaker box and microphone, external

Two serial ports (A and B)

A parallel port

A tape drive, internal or external (DAT/DDS/QIC and so on)

Mouse (mechanical or infrared) and keyboard (type 4 or type 5)

As noted, most desktop workstations come in a “pizza box” chassis, although earlier Internetwork Packet Exchange (IPX) and similar systems had a “lunch box” chassis. Both of these designs were more compact than their PC counterparts. Servers generally come in two versions: stand-alone or rack-mountable. The version numbers on servers also differ with their chassis type. The 220R, for example, is the rack-mounted version of the stand-alone E-250, while the 420R is the rack-mounted version of the stand-alone 420. The 220R and E-250 have two CPUs each, while the 420R and E-450 have four CPUs each.

Let’s examine two SPARC systems in detail; a workstation (UltraSPARC 5) and a server (UltraSPARC E-450). The UltraSPARC 5 system is a popular, low-end desktop model. Although it has been replaced in this category by the new, lower-cost Sun Blade 100 (available for around $1,000), it remains a popular workstation for business and home use. It supports UltraSPARC-IIi CPUs with speeds ranging from 270 to 400 MHz. Internally, it features 16KB instruction and data caches, while it supports from 256KB to 2MB of external cache memory. In terms of memory and disk capacity, the system supports up to 512MB of physical RAM, a CD-ROM, a 1.44MB floppy disk, and two hard drives, making it possible to enable volume management. The system has three peripheral ports—two serial and one parallel—and it has a built-in Ethernet adapter and supports 10–100-Mbps transmission rates. The system also features a PCMCIA bay, which allows a wide variety of PC-type hardware to be connected.

While the UltraSPARC 5 is comparable in performance to desktop PCs, the E-450 is a workgroup-level server that features symmetric multiprocessing, larger numbers of disks, fast buses, hot swapping, and more cache RAM per CPU. The E-450 supports up to four UltraSPARC-IIi CPUs, operating at 250–480 MHz. Internally, it features 16KB instruction and data caches per CPU, and up to 4MB of external cache per CPU—for a four-CPU system, that’s a total of 16MB of external cache. The system also features two UPA buses operating at 100 MHz, supporting up to two CPUs on each bus. With respect to mass storage and memory, the system accepts up to 16 dual inline memory modules (DIMMs), giving up to 4GB of physical RAM. Some 20 slots for hard disks provide a large pool of hot-swappable volumes on a fast SCSI-3 bus. A CD-ROM and floppy disk drive are also supplied, and a DDS-3 internal digital audio tape (DAT) drive for backups. In addition, hot-swappable power supplies can be installed into the chassis, enabling two different power sources to be utilized.
Intel Hardware
If Solaris was originally designed to run on SPARC hardware, and if SPARC hardware is where Sun makes its money, why would Sun support an Intel version? For starters, many more Intel systems exist in the world than SPARC systems. Sun also has a historical relationship with Intel, which supported SunOS 4.x for several 80386 and 80486 systems. At this point, however, Sun introduced the SPARC range of CPUs, which were the forerunners of the current UltraSPARC series. Intel-based systems are also suitable for workstation environments, and were (until the recent release of the Sun Blade 100) much cheaper than SPARC systems. Since Sun is primarily in the server hardware business, it made sense to develop a reliable operating system for Intel workstations that was supported by its high-end servers.

For many potential Solaris users, SPARC systems are still prohibitively expensive, even though these users want the features of the UNIX operating system. Often, organizations need to make best use of their existing investment in PC hardware. However, some PC operating systems may not currently meet their needs. While PCs have become the de facto standard for desktop computers, investments in PC-based solutions have sometimes met with dissatisfaction from users because some PC operating systems lack stability—particularly regarding application-specific issues, although operating systems have also caused concern. Some of the problems included the perceived lack of reliability of operating systems that were prone to crash during important business operations. Although Intel CPUs featured modes that should logically isolate such failures to the operation that causes them (such as protected mode), this requires operating system support that was never fully perfected by some vendors. In other words, PC hardware is up to the task, but operating systems have not taken full advantage of the PC’s abilities.

Perhaps more frustratingly, errors in existing PC operating systems could not be corrected by talented developers, because most PC operating systems are proprietary—in some instances, operating system vendors actually charged users to report operating system bugs, only refunding the charge if the bug was verified. In addition, frustration was often caused by so-called “standard” hardware, which often had incompatibilities with application and server software. For example, at the time when 80286 CPU systems were being touted as “IBM compatible,” most were using an ISA bus, while IBMs were actually using the Micro Channel Architecture (MCA) as the bus on their PS/2 systems. However, PC hardware has converged on a number of standards, such as the PCI bus, which have vastly improved the performance figures for data throughput on PCs.

There are some key benefits to using Solaris for Intel over SPARC hardware: For a start, “plug and play” devices are supported, meaning that explicit device configuration is often not required. In addition, you can get access to modern bus architectures like PCI without having to purchase an UltraSPARC system. This point relates to overall system cost: If SPARC systems are going to use PCI for the foreseeable future, why use SPARC when PCI is supported by Intel systems at a smaller cost? In addition, Solaris for Intel supports multiple CPUs, each of which are much cheaper in cost than the equivalent SPARC CPUs.

There are, however, some limitations to using Solaris for Intel. These may be specific to Solaris, but some relate to the architecture itself. For example, while some versions of Microsoft Windows support up to four Enhanced Integrated Drive Electronics (EIDE) controllers, Solaris will see only the first two. Granted, EIDE disks and controllers are generally less favorable than SCSI-3 drives, but they do exist and they are cheap. In addition, support for the universal serial bus (USB) is still experimental, making it harder to add new devices that don’t use the serial port for connection. Many new modems also won’t work on anything but Windows (so-called “Winmodems”) because they rely on Windows to control the modem hardware rather than having a built-in controller.

Because Sun makes no direct revenues from Solaris Intel, the bottom line is that, with the growing popularity of Linux for the Intel platform, continued development of the Solaris Intel edition may receive less attention than the SPARC edition. This doesn’t mean that you shouldn’t continue to use Solaris Intel, though, because it is a mature and stable product. In terms of contemplating future server purchases, however, it might be wiser to go with SPARC.

The Hardware Compatibility List (HCL), which is available at http://soldc.sun.com/support/drivers/hcl/index.html , is the definitive guide to all hardware devices supported by the Solaris Intel platform. If a device does not appear in the HCL, it is unlikely that it will be supported under Solaris Intel—with some exceptions: motherboards, for example, often follow fairly loose standards, with clone boards usually working correctly under Solaris even if they don’t appear in the HCL. The most common compatibility issue occurs with video cards—many are not supported at all, or if they are, their full feature set is unsupported. For example, some video cards have hardware support for receiving TV signals. While their graphical rendering ability will be supported, the TV functions will generally not work with Solaris.

Fortunately, if your video card is not supported, it is possible to replace the X server provided by Solaris with the XFree-86 X server (http://www.xfree.org/). This server is functionally equivalent to any other server that supports the X11R6 standard, meaning that the common desktop environment (CDE) and all other Solaris GUI applications will run if you have installed XFree. The main advantage of using XFree-86 is that it supports a much larger array of hardware devices than the Solaris X server.

Devices Supported Under Solaris Intel
This section reviews some of the families of devices supported under Solaris Intel and examples of products that are likely to be supported. Most common motherboards are supported, including those developed by Acer, ASUS, EPoX, and Intel. Some examples are the Acer M9N MP, the ASUS A7V, and the EPoX EP-MVP3G. In addition, motherboard support has been established for many prebuilt systems, including the Acer AcerAcros T7000 MT, Bull Information Systems Express5800-HX4500, and Compaq Deskpro EN 6400. Many symmetric multiprocessing (SMP)-capable motherboards are also supported. No special configuration is required to support SMP devices—they are plug and play—and some popular models include the Dell PowerEdge 6300, the Fujitsu TeamSERVER-T890I, and the Gateway 8400.

Video cards from many different manufacturers are supported, including those operating from ISA, PCI, or AGP buses. Five display resolutions are supported:

800 × 600 pixels

1024 × 768 pixels

1152 × 900 pixels

1280 × 1024 pixels

1600 × 1200 pixels

Both 8- and 24-bit color are supported in all of these modes, depending on the chipset and onboard memory. Many cards are supported, including the ATI 3D RAGE, the Boca Voyager 64, and the Chips & Technology 65540. All multisync monitors are supported. However, the kdmconfig application used for setting up the display does not show 14-inch monitors in its selection list: in most cases, you will be able to use the 15-inch setting, as long as the frequency specified is supported by your monitor. Fixed-sync monitors should work as long as their frequency is supported by the video card at the resolution you require. Serial, bus, and PS/2 mouse devices are supported under Solaris. In addition, many third-party pointing devices are supported, including the MicroSpeed MicroTRAC trackball, the LogiTech MouseMan cordless, and the Kraft Systems MicroTrack.

In terms of SCSI host adapters, both standard and ultra-wide SCSI support is included for the most popular host adapters, including the Adaptec AHA-2940/2940W, AMD PCscsi, and the Compaq 32-bit Fast-Wide SCSI-2. Many Iomega Jaz/Zip devices are supported under Solaris, including the SCSI devices 2250S Zip drive (250MB) and the V2008I Jaz drive (2GB), as well as the ATAPI and IDE Z100A Zip drives (100MB).

Many different types of network adapters are supported, including 10-Mbps and 100-Mbps data transfer rates. Supported adapters include the 3Com EtherLink III PCI Bus Master, the Adaptec ANA-6901, and the AMD PCnet-PCI.

For laptops, common PCMCIA devices are generally supported, such as modems and network adapters, including the ATI Technologies 14400 ETC-EXPRESS, the Compaq SpeedPaq 192, and the Hayes 5361US.