Solaris 9 9/04 Installation Guide

Creating DHCP Options and Macros for Solaris Installation Parameters

When you add clients with the add_install_client -d script on the install server, the script reports DHCP configuration information to standard output. This information can be used when you create the options and macros that are needed to pass network installation information to clients.

To install DHCP clients from the network, you must create Vendor category options to pass information that is needed to install the Solaris operating environment. Table 7–4 shows the options you must create and the properties that are needed to create them.

You can customize the macros in your DHCP service to perform the following types of installations.

For more information on setting up clients to install from the network, see the following procedures.

The vendor client classes that are listed in the following table determine what classes of client can use the option. Vendor client classes that are listed here are examples only. You should specify client classes that indicate the actual clients in your network that you need to install from the network. See “Working With DHCP Options (Task Map)” in System Administration Guide: IP Services for information about how to determine a client's vendor client class.

For detailed information on DHCP options, see “DHCP Option Information” in System Administration Guide: IP Services.

Table 7–4 Values for Creating Vendor Category Options for Solaris Clients

Name 

Code 

Data Type 

Granularity 

Maximum 

Vendor Client Classes * 

Description 

The following Vendor category options are required to enable a DHCP server to support Solaris installation clients. The options are used in the Solaris client's startup scripts.

SrootIP4

IP address 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

IP address of root server 

SrootNM

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Host name of root server 

SrootPTH

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to the client's root directory on the root server 

SinstIP4

10 

IP address 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

IP address of JumpStart install server 

SinstNM

11 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Host name of install server 

SinstPTH

12 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to installation image on install server 

The following options can be used by the client startup scripts, but are not required by the scripts.

SrootOpt

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

NFS mount options for the client's root file system 

SbootFIL

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to the client's boot file 

SbootRS

NUMBER 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

NFS read size used by standalone boot program when loading the kernel 

SsysidCF

13 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to sysidcfg file, in the format server:/path

SjumpsCF

14 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to JumpStart configuration file in the format server:/path

SbootURI

16 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to the standalone boot file or path to the WAN boot file. For the standalone boot file, use the following format. 

tftp://inetboot.sun4u

For the WAN boot file, the format is 

http://host.domain/path-to-file

This option can be used to override BootFile and siaddr settings in order to retrieve a standalone boot file. Supported protocols: tftp (inetboot), http (wanboot). For example, use the following format. tftp://inetboot.sun4u

SHTTPproxy

17 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

IP address and port number of the proxy server that is used on your network. This option is needed only when a client is booting across a WAN, and the local network uses a proxy server. For example, use the following format: 198.162.10.5:8080

The following options are not currently used by the Solaris client startup scripts. You can use them only if you edit the startup scripts.

SswapIP4

IP address 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

IP address of swap server 

SswapPTH

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Path to the client's swap file on the swap server 

Stz

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Time zone for client 

Sterm

15 

ASCII text 

SUNW.Sun-Blade-1000, SUNW.Sun-Fire-880, SUNW.i86pc

Terminal type  

When you have created the options, you can create macros that include those options. The following table lists sample macros you can create to support Solaris installation for clients.

Table 7–5 Sample Macros to Support Network Installation Clients

Macro Name 

Contains These Options and Macros 

Solaris

SrootIP4, SrootNM, SinstIP4, SinstNM

sparc

SrootPTH, SinstPTH

sun4u

Solaris and sparc macros

i86pc

Solaris macro, SrootPTH, SinstPTH, SbootFIL

SUNW.i86pc

i86pc macro

SUNW.Sun-Blade-1000

sun4u macro, SbootFIL

SUNW.Sun-Fire-880

sun4u macro, SbootFIL

xxx.xxx.xxx.xxx network address macros

BootSrvA option could be added to existing network address macros. The value of BootSrvA should indicate the tftboot server.

The macro names that are listed in the previous table match the Vendor client classes of the clients that must install from the network. These names are examples of clients you might have on your network. See “Working With DHCP Options (Task Map)” in System Administration Guide: IP Services for information about determining a client's vendor client class.

You can create these options and macros by using the following methods.

Writing a Script That Uses dhtadm to Create Options and Macros

You can create a Korn shell script by adapting the example in Example 7–13 to create all the options listed in Table 7–4 and some useful macros. Be sure to change all IP addresses and values contained in quotes to the correct IP addresses, server names, and paths for your network. You should also edit the Vendor= key to indicate the class of clients you have. Use the information that add_install_client -d reports to obtain the data that you need to adapt the script.


Example 7–13 Sample Script to Support Network Installation

# Load the Solaris vendor specific options. We'll start out supporting 
# the Sun-Blade-1000, Sun-Fire-880, and i86 platforms. Changing -A to -M would replace
# the current values, rather than add them.
dhtadm -A -s SrootOpt -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,1,ASCII,1,0'
dhtadm -A -s SrootIP4 -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,2,IP,1,1'
dhtadm -A -s SrootNM -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,3,ASCII,1,0'
dhtadm -A -s SrootPTH -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,4,ASCII,1,0'
dhtadm -A -s SswapIP4 -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,5,IP,1,0'
dhtadm -A -s SswapPTH -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,6,ASCII,1,0'
dhtadm -A -s SbootFIL -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,7,ASCII,1,0'
dhtadm -A -s Stz -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,8,ASCII,1,0'
dhtadm -A -s SbootRS -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,9,NUMBER,2,1'
dhtadm -A -s SinstIP4 -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,10,IP,1,1'
dhtadm -A -s SinstNM -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,11,ASCII,1,0'
dhtadm -A -s SinstPTH -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,12,ASCII,1,0'
dhtadm -A -s SsysidCF -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,13,ASCII,1,0'
dhtadm -A -s SjumpsCF -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,14,ASCII,1,0'
dhtadm -A -s Sterm -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,15,ASCII,1,0'
dhtadm -A -s SbootURI -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,16,ASCII,1,0'
dhtadm -A -s SHTTPproxy -d \
'Vendor=SUNW.Sun-Blade-1000 SUNW.Sun-Fire-880 SUNW.i86pc,17,ASCII,1,0'
# Load some useful Macro definitions.
# Define all Solaris-generic options under this macro named Solaris.
dhtadm -A -m Solaris -d \
':SrootIP4=10.21.0.2:SrootNM="blue2":SinstIP4=10.21.0.2:SinstNM="red5":'
# Define all sparc-platform specific options under this macro named sparc.
dhtadm -A -m sparc -d \
':SrootPTH="/export/sparc/root":SinstPTH="/export/sparc/install":'
# Define all sun4u architecture-specific options under this macro named sun4u. 
#  (Includes Solaris and sparc macros.)
dhtadm -A -m sun4u -d ':Include=Solaris:Include=sparc:'
# Solaris on IA32-platform-specific parameters are under this macro named i86pc.
dhtadm -A -m i86pc -d \
':Include=Solaris:SrootPTH="/export/i86pc/root":SinstPTH="/export/i86pc/install"\
:SbootFIL="/platform/i86pc/kernel/unix":'
# Solaris on IA32 machines are identified by the "SUNW.i86pc" class. All
# clients identifying themselves as members of this class will see these
# parameters in the macro called SUNW.i86pc, which includes the i86pc macro.
dhtadm -A -m SUNW.i86pc -d ':Include=i86pc:'
# Sun-Blade-1000 platforms identify themselves as part of the 
# "SUNW.Sun-Blade-1000" class.
# All clients identifying themselves as members of this class
#  will see these parameters.
dhtadm -A -m SUNW.Sun-Blade-1000 -d \
':SbootFIL="/platform/sun4u/kernel/sparcv9/unix":\
Include=sun4u:'
# Sun-Fire-880 platforms identify themselves as part of the "SUNW.Sun-Fire-880" class.
# All clients identifying themselves as members of this class will see these parameters.
dhtadm -A -m SUNW.Sun-Fire-880 -d \
':SbootFIL="/platform/sun4u/kernel/sparcv9/unix":Include=sun4u:'
# Add our boot server IP to each of the network macros for our topology served by our
# DHCP server. Our boot server happens to be the same machine running our DHCP server.
dhtadm -M -m 10.20.64.64 -e BootSrvA=10.21.0.2
dhtadm -M -m 10.20.64.0 -e BootSrvA=10.21.0.2
dhtadm -M -m 10.20.64.128 -e BootSrvA=10.21.0.2
dhtadm -M -m 10.21.0.0 -e BootSrvA=10.21.0.2
dhtadm -M -m 10.22.0.0	-e BootSrvA=10.21.0.2
# Make sure we return host names to our clients.
dhtadm -M -m DHCP-servername -e Hostname=_NULL_VALUE_
# The client with this MAC address is a diskless client. Override the root settings
# which at the network scope setup for Install with our client's root directory.
dhtadm -A -m 0800201AC25E -d \
':SrootIP4=10.23.128.2:SrootNM="orange-svr-2":SrootPTH="/export/root/10.23.128.12":'

As superuser, execute dhtadm in batch mode. Specify the name of the script to add the options and macros to your dhcptab. For example, if your script is named netinstalloptions, type the following command.


# dhtadm -B netinstalloptions

Clients that have vendor client classes that are listed in the Vendor= string can now use DHCP to install over the network.

For more information about how to use the dhtadm command, see dhtadm(1M). For more information about the dhcptab file, see dhcptab(4).

Using DHCP Manager to Create Install Options and Macros

You can use DHCP Manager to create the options that are listed in Table 7–4 and the macros that are listed in Table 7–5.