Solaris 10 Installation Guide for IBM BladeCenter Servers

Creating DHCP Options and Macros for Solaris Installation Parameters

When you add clients with the add_install_client -d script on the installation 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. You can create DHCP options and macros in one of the following ways:

For installing DHCP clients with a DHCP server over the network, you must create DHCP options to pass information that is needed for installing the Solaris OS. You can customize the macros in your DHCP service to perform the following types of installations:

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

For more information about setting up clients to use a DHCP server for a network installation, see Supporting Solaris Network Installation With the DHCP Service in System Administration Guide: IP Services.

For detailed information about DHCP options, see Working With DHCP Options (Task Map) in System Administration Guide: IP Services.

You can use the standard DHCP options that are listed in Table 1–6 to configure and install systems. These options are not platform specific, and can be used for installing the Solaris OS on a variety of x86 based systems. Use these options for installing the Solaris software on systems by using DHCP. For a complete list of standard options, see the dhcp_inittab(4) man page.

Table 1–6 Values for Standard DHCP Options

Option Name 

Code 

Data Type 

Granularity 

Maximum 

Description 

BootFile

N/A 

ASCII 

Path to the client's boot file 

BootSrvA

N/A 

IP address 

IP address of boot server 

DNSdmain

15 

ASCII 

DNS domain name 

DNSserv

IP address 

List of DNS name servers 

NISdmain

40 

ASCII 

NIS domain name 

NISservs

41 

IP address 

IP address of NIS server 

NIS+dom

64 

ASCII 

NIS+ domain name 

NIS+serv

65 

IP address 

IP address of NIS+ server 

Router

IP address 

IP addresses of network routers 

When you have created the options, you can create macros that include those options. The following table lists examples of macros that you can create to support a Solaris client installation.

Table 1–7 Example Macros to Support Network Installation Clients

Macro Name 

Contains These Options and Macros 

Solaris

SrootIP4, SrootNM,SinstIP4, SinstNM

i86pc

Solaris macro, SrootPTH, SinstPTH, SbootFIL

PXEClient:Arch:00000:UNDI:002001

BootSrvA, BootFile

xxx.xxx.xxx.xxx network address macros

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

01client-MAC-address client-specific macros (for example, 010007E9044ABF)

BootSrvA, BootFile

The macro names in this table match the vendor client classes of the clients that are installed from the network. These names are examples of clients that you might have on your network.

The total size of the vendor options that are provided to a particular client must not exceed 255 bytes, including option codes and length information. This limitation results from the current Solaris DHCP protocol implementation. Generally, you must pass the minimum amount of vendor information needed. Use short path names in options that require path names. If you create symbolic links to long paths, you can use the shorter link names.

Writing a Script That Uses dhtadm to Create Options and Macros

You can create a Korn shell script by adapting examples in this section to create all the options that are described and some other useful macros. Be sure to change all IP addresses and values contained in quotation marks to the correct IP addresses, server names, and paths for your network. Also, edit the Vendor= key to indicate the class of clients that you have. Use the information that add_install_client -d reports to obtain the data that you need to adapt the script.


Example 1–15 Server Script Example to Support Network Installation on IBM BladeCenter Systems


#!/bin/sh

ImageDir="/export/home/sol10_18b"
JumpStartDir="/export/home/jumpstart"
DHCPDir="/export/home/dhcp"
DHCPNetwork="192.168.70.0"
SrvAdd="192.168.70.35"

# Sharing out the Image directory
share -F nfs -o ro,anon=0 $ImageDir

# Sharing out the jumpstart directory
share -F nfs -o ro,anon=0 $JumpStartDir


dhcpconfig -D -r SUNWfiles -p $DHCPDir -l 84600 -h files
dhcpconfig -N $DHCPNetwork

echo "Adding vendor specific symbol table"
echo ""
dhtadm -A -s SrootIP4 -d 'Vendor=SUNW.i86pc,2,IP,1,1'
dhtadm -A -s SrootNM -d 'Vendor=SUNW.i86pc,3,ASCII,1,0'
dhtadm -A -s SrootPTH -d 'Vendor=SUNW.i86pc,4,ASCII,1,0'
dhtadm -A -s SinstIP4 -d 'Vendor=SUNW.i86pc,10,IP,1,1'
dhtadm -A -s SinstNM -d 'Vendor=SUNW.i86pc,11,ASCII,1,0'
dhtadm -A -s SinstPTH -d 'Vendor=SUNW.i86pc,12,ASCII,1,0'
dhtadm -A -s SsysidCF -d 'Vendor=SUNW.i86pc,13,ASCII,1,0'
dhtadm -A -s SjumpsCF -d 'Vendor=SUNW.i86pc,14,ASCII,1,0'
dhtadm -A -s SbootURI -d 'Vendor=SUNW.i86pc,16,ASCII,1,0'

echo "Adding PXE info"
echo ""
dhtadm -A -m PXEClient:Arch:00000:UNDI:002001 -d (Command continued on next line)
':BootFile="pxegrub.I86PC.Solaris_10-1":BootSrvA=192.168.70.35:'


Example 1–16 Example Client Script to Support Network Installation


#!/bin/sh

echo "Add install client"
echo ""
cd /export/home/sol10_18b/Solaris_10/Tools
./add_install_client -d -e 0:11:25:9b:9c:98 i86pc


echo "Creating client ID and association of macros"
echo ""
dhtadm -A -m 010011259B9C98 -d ':SinstPTH="/export/home/sol10_18b":'
dhtadm -M -m 010011259B9C98 -e 'SrootPTH="/export/home/sol10_18b/Solaris_10/Tools/Boot"'
dhtadm -M -m 010011259B9C98 -e 'SrootNM="sun10hw1"'
dhtadm -M -m 010011259B9C98 -e 'SrootIP4=192.168.70.35'
dhtadm -M -m 010011259B9C98 -e 'SinstIP4=192.168.70.35'
dhtadm -M -m 010011259B9C98 -e 'SinstNM="sun10hw1"'
dhtadm -M -m 010011259B9C98 -e 'BootSrvA=192.168.70.35'
dhtadm -M -m 010011259B9C98 -e 'SbootURI=tftp://192.168.70.35/inetboot.I86PC.Solaris_10-1'
dhtadm -M -m 010011259B9C98 -e 'SjumpsCF=192.168.70.35:/export/home/sol10_18b'
dhtadm -M -m 010011259B9C98 -e 'SsysidCF=192.168.70.35:/export/home/sol10_18b'


pntadm -A 192.168.70.44 -c sunblade1 -f PERMANENT -m (Command continued on next line)
010011259B9C98 -h sunblade1 -i 010011259B9C98 -s 192.168.70.35 192.168.70.0

As superuser, execute the dhtadm command 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, you would type the following command:


# dhtadm -B netinstalloptions

Clients that have vendor client classes listed in the Vendor= string can now use DHCP for installing over the network.

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

Using DHCP Manager to Create Installation Options and Macros

This section includes two procedures for creating installation options and macros by using DHCP Manager. The first procedure describes how to create installation options with DHCP Manager. The second procedure describes how to create installation macros with DHCP Manager.

ProcedureHow to Create Options to Support a Solaris Installation (DHCP Manager)

Before You Begin

Perform the following tasks before you create DHCP options for your installation.

  1. On the DHCP server, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Start DHCP Manager.


    # /usr/sadm/admin/bin/dhcpmgr &
    

    The DHCP Manager window is displayed.

  3. Select the Options tab.

  4. Choose Create from the Edit menu.

    The Create Option dialog box opens.

  5. Type the option name for the first option, then type values appropriate for that option.

    Use the output of the add_install_client command , and the information in the tables in this section to check the option names and values for options that you must create. Notice that the vendor client classes are only suggested values. See Table 1–7. Create classes to indicate the actual client types that need to obtain Solaris installation parameters from the DHCP service. 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.

  6. Click OK after you have typed all the values.

  7. In the Options tab, select the option that you just created.

  8. Select Duplicate from the Edit menu.

    The Duplicate Option dialog box opens.

  9. Type the name of another option, then modify other values appropriately.

    The values for code, data type, granularity, and maximum are most likely to need modification. See Table 1–6.

  10. Repeat Step 7 through Step 9 until you have created all the options.

    You can now create macros to pass the options to network installation clients, as explained in the following procedure.


    Note –

    You do not need to add these options to a Solaris client's /etc/dhcp/inittab file because they are already included in that file.


ProcedureHow to Create Macros to Support a Solaris Installation (DHCP Manager)

Before You Begin

Perform the following tasks before you create DHCP macros for your installation:

  1. On the DHCP server, become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  2. Start DHCP Manager.


    # /usr/sadm/admin/bin/dhcpmgr &
    

    The DHCP Manager window is displayed.

  3. Select the Macros tab.

  4. Choose Create from the Edit menu.

    The Create Macro dialog box opens.

  5. Type the name of a macro.

  6. Click the Select button.

    The Select Option dialog box opens.

  7. Select Vendor in the Category list.

    The Vendor options that you created previously are listed.

  8. Select an option that you want to add to the macro , and click OK.

  9. Type a value for the option.

    See Creating DHCP Options and Macros for Solaris Installation Parametersfor the option's data type and refer to the information that add_install_client -d reports.

  10. Repeat Step 6 through Step 7 for each option you want to include.

    To include another macro, type Include as the option name and type the macro name as the option value.

  11. Click OK when the macro is complete.