How to Configure a DHCP + JumpStart Server
DHCP Server Configuration
Configure the DHCP server by using the service configuration utility
# dhcpconfig -D -r SUNWbinfiles -p /var/dhcp -a 192.168.4.1 -d data -l 84600 -h dns -y data
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - cerebro-sm.
DHCP server started.
where
-D: configuring DHCP service
-r: data storage module type
-p: DHCP directory path
-a: DNS server IP
-d: DNS domain name
-l: lease length used for address
-hresource in which to place host data, i.e., NIS or DNS
-y: DNS or NIS domain server
Configure the network for DHCP service and create the corresponding macro for that network
# dhcpconfig -N 192.168.0.0 -t 192.168.7.254
Added network macro to dhcptab - 192.168.0.0.
Created network table.
where
-N: network IP
-t: router
Add the PXE client macros to the DHCP configuration, by including vendor options
# dhtadm -A -m PXEClient:Arch:00000:UNDI:002001 -d ':BootSrvA=192.168.4.4:'
# 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 SinstIP4 -d 'Vendor=SUNW.i86pc,10,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 SrootIP4 -d 'Vendor=SUNW.i86pc,2,IP,1,1'
# dhtadm -A -s SjumpsCF -d 'Vendor=SUNW.i86pc,14,ASCII,1,0'
# dhtadm -A -s SsysidCF -d 'Vendor=SUNW.i86pc,13,ASCII,1,0'
# dhtadm -A -s SbootURI -d 'Vendor=SUNW.i86pc,16,ASCII,1,0'
# dhtadm -M -m 192.168.0.0 -e 'SinstNM="cerebro-sm"'
# dhtadm -M -m 192.168.0.0 -e 'SinstPTH="/export/install/x86_10"'
# dhtadm -M -m 192.168.0.0 -e 'SinstIP4=192.168.4.4'
# dhtadm -M -m 192.168.0.0 -e 'SrootNM="cerebro-sm"'
# dhtadm -M -m 192.168.0.0 -e 'SrootPTH="/export/install/x86_10/Tools/Boot"'
# dhtadm -M -m 192.168.0.0 -e 'SrootIP4=192.168.4.4'
# dhtadm -M -m 192.168.0.0 -e 'BootFile=nbp.SUNW.i86pc'
# dhtadm -M -m 192.168.0.0 -e ':Subnet=255.255.252.0:'
# dhtadm -M -m 192.168.0.0 -d ':Subnet=255.255.252.0:
Router=192.168.7.254:Broadcst=192.168.0.255:NISdmain="loni":
NISservs=192.168.4.2:SinstNM="cerebro-sm":SinstPTH="/export/install/x86_10":
SinstIP4=192.168.4.4:SrootNM="cerebro-sm":SrootPTH="/export/install/x86_10/Tools/Boot":
SrootIP4=192.168.4.4:BootFile="nbp.SUNW.i86pc":DNSdmain="data":DNSserv=192.168.4.1:' (all in a single line)
# dhtadm -M -m cerebro-sm -d ':Include=Locale:Timeserv=192.168.4.4:
LeaseTim=84600:LeaseNeg:DNSdmain="data":DNSserv=192.168.4.1:
SinstNM="cerebro-sm":SinstPTH="/export/install/x86_10":SinstIP4=192.168.4.4:
SrootNM="cerebro-sm":SrootPTH="/export/install/x86_10/Tools/Boot":
SrootIP4=192.168.4.4:BootFile="nbp.SUNW.i86pc":NISdmain="loni":
NISservs=192.168.4.2:' (all in a single line)
BootSrvA: the IP address of the boot (TFTP) server
"Vendor" refers to vendor related options
"Sinst" refers to the JumpStart installing directory
"Sroot" refers to the JumpStart booting directory
BootFile: the filename of the NBP executable located into the boot server, executed by the PXE
To print the macro
# dhtadm -P
Now, verify if the DHCP daemon is running and the service is enabled
# ps -efl | grep -i dhcp
0 S root 1855 1 0 40 20 ? 1612 ? 17:42:56 ? 0:01 /usr/lib/inet/in.dhcpd
# svcs -a | grep dhcp
Create the named table
# pntadm -C 192.168.4.0
List the coonfigured DHCP networks
# pntadm -L
192.168.0.0
192.168.4.0
Add the clients into the DHCP server
# pntadm -A 192.168.5.56 -c cerebro-B-056 -f PERMANENT -i 0100093D118F85 -m 192.168.0.0 192.168.4.0
Here, we are adding node 'cerebro-B-056' as a DHCP client.
-A: IP of the node
-c: name of the node
-f: dynamic or static IP (PERMANENT is for static)
-i: Mac Address (there is a 01 before to the mac address; exclude the ":")
-m: macro (192.168.0.0) + subnet (192.168.4.0)
To check if the machine is already a DHCP client.
# pntadm -P 192.168.4.0 | grep -i b-056
0100093D118F85 01 192.168.5.56 192.168.4.4 Forever 192.168.0.0 cerebro-B-056
If you would like to use dynamic IPs
# pntadm -A 192.168.5.56 -c cerebro-B-056 -f DYNAMIC -i 0100093D118F85 -m 192.168.0.0 192.168.4.0
Add the corresponding entries in the /etc/ethers file. Declare the following variables into the /etc/inet/dhcpsvc.conf file
# echo "INTERFACES=bge0" >> /etc/inet/dhcpsvc.conf
# echo "HOSTS_RESOURCE=dns" >> /etc/inet/dhcpsvc.conf
# echo "HOSTS_DOMAIN=data" >> /etc/inet/dhcpsvc.conf
# echo "ICMP_VERIFY=TRUE" >> /etc/inet/dhcpsvc.conf
# echo "RESCAN_INTERVAL=15" >> /etc/inet/dhcpsvc.conf
# echo "UPDATE_TIMEOUT" >> /etc/inet/dhcpsvc.conf
# echo "BOOTP_COMPAT=automatic" >> /etc/inet/dhcpsvc.conf
Restart the DHCP daemon
# pkill -HUP in.dhcpd
To list the configured DHCP networks
# pntadm -L
JumpStart Server Configuration
First, let's load the Solaris OS distribution into the server. Create the parent install directory
# mkdir /export/install
Create a subdirectory for the Solaris OS distribution
# mkdir /export/install/x86_10
Mount the Solaris OS distribution. In this procedure, we assume an image of the OS is stored on disk. Copy the Solaris OS distribution into the created installation directory
# mount -F hsfs -o ro `lofiadm -a /path_to_isoImage` /mount_point_path
# cd /mount_point_path/Solaris_10/Tools
# ./setup_install_server -b /export/install/x86_10
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the DVD image to disk...
Copying Install Boot Image hierarchy...
Install Server setup complete
the -b option specifies that the server is both, installing and boot servers. Now, create the configuration server directory
# mkdir /export/install/jumpstart
# cd /mount_point_path/Solaris_10/Misc/jumpstart_sample
# cp check /export/install/jumpstart
# cd /export/install/jumpstart
# cat > rules
| # rule_keyword |
rule_value |
begin |
profile |
finish |
| any |
- |
preInstall |
cerebroData |
postInstall |
Configure preInstall and postInstall scripts, the corresponding profile (cerebroData) as well as the jumpstart configuration script, sysidcfg. Then, verify the configuration file syntax
# ./check
Validating rules...
Validating profile cerebroData...
The custom
JumpStart configuration is ok.
Now, share the installation directory and check if the NFS service is running
# cat >> /etc/dfs/dfstab
share -F nfs -o ro,anon=0 -d "Install Server" /export/install
# /etc/init.d/nfs.server start (or)
# svcadm enable -s svc:/network/nfs/server:default
# showmount -e localhost
export list for localhost:
/export/install (everyone)
# shareall
# share
- /export/install ro,anon=0 "Install Server"
Next step is to configure client access
# cd /export/install/x86_10/Solaris_10/Tools
# ./add_install_client -d -s cerebro-sm:/export/install/x86_10 -c cerebro-sm:/export/install/jumpstart -p cerebro-sm:/export/install/jumpstart -b "output-device=ttya" -b "input-device=ttya" SUNW.i86pc i86pc