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.