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:
Write a script that creates the options and macros by using the dhtadm command. See Writing a Script That Uses dhtadm to Create Options and Macros.
Create the options and macros with DHCP Manager. See How to Create Options to Support a Solaris Installation (DHCP Manager) and How to Create Macros to Support a Solaris Installation (DHCP Manager).
Class-specific installations – You can instruct the DHCP service to perform a network installation for all clients of a specific class. For example, you can define a DHCP macro that performs the same installation on all Sun Blade systems on the network. Use the output of the add_install_client -d script to set up a class-specific installation.
Network-specific installations – You can instruct the DHCP service to perform a network installation for all clients on a specific network. For example, you can define a DHCP macro that performs the same installation on all systems in the 192.168.2.1 network.
Client-specific installations – You can instruct the DHCP service to perform a network installation for a client with a specific Ethernet address. For example, you can define a DHCP macro that performs a specific installation on the client with the Ethernet address 00:07:e9:04:4a:bf. Use the output of the add_install_client -d -e ethernet-address command to set up a client-specific installation.
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 |
1 |
1 |
Path to the client's boot file |
BootSrvA |
N/A |
IP address |
1 |
1 |
IP address of boot server |
DNSdmain |
15 |
ASCII |
1 |
0 |
DNS domain name |
DNSserv |
6 |
IP address |
1 |
0 |
List of DNS name servers |
NISdmain |
40 |
ASCII |
1 |
0 |
NIS domain name |
NISservs |
41 |
IP address |
1 |
0 |
IP address of NIS server |
NIS+dom |
64 |
ASCII |
1 |
0 |
NIS+ domain name |
NIS+serv |
65 |
IP address |
1 |
0 |
IP address of NIS+ server |
Router |
3 |
IP address |
1 |
0 |
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.
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.
#!/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:' |
#!/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.
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.
Perform the following tasks before you create DHCP options for your installation.
Add the clients that you want to install with DHCP as installation clients of your network installation server. For more information, see How to Add Systems to Be Installed From the Network With add_install_client.
Configure your DHCP server, if it has not already been configured. For more information, see Configuring and Unconfiguring a DHCP Server Using DHCP Manager in System Administration Guide: IP Services and Configuring and Unconfiguring a DHCP Server Using dhcpconfig Commands in System Administration Guide: IP Services.
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.
Start DHCP Manager.
# /usr/sadm/admin/bin/dhcpmgr & |
The DHCP Manager window is displayed.
Select the Options tab.
Choose Create from the Edit menu.
The Create Option dialog box opens.
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.
Click OK after you have typed all the values.
In the Options tab, select the option that you just created.
Select Duplicate from the Edit menu.
The Duplicate Option dialog box opens.
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.
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.
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.
Perform the following tasks before you create DHCP macros for your installation:
Add the clients that you want to install with DHCP as installation clients of your network installation server. For more information, see How to Add Systems to Be Installed From the Network With add_install_client.
Configure your DHCP server, if it has not already been configured. For more information, see Configuring and Unconfiguring a DHCP Server Using DHCP Manager in System Administration Guide: IP Services and Configuring and Unconfiguring a DHCP Server Using dhcpconfig Commands in System Administration Guide: IP Services.
Create the DHCP options that you want to use in your macro. See Creating DHCP Options and Macros for Solaris Installation Parameters.
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.
Start DHCP Manager.
# /usr/sadm/admin/bin/dhcpmgr & |
The DHCP Manager window is displayed.
Select the Macros tab.
Choose Create from the Edit menu.
The Create Macro dialog box opens.
Type the name of a macro.
Click the Select button.
The Select Option dialog box opens.
Select Vendor in the Category list.
The Vendor options that you created previously are listed.
Select an option that you want to add to the macro , and click OK.
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.
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.
Click OK when the macro is complete.