|jflaster on ZFS on Linux emergency Boot…|
|HarusKG on ZFS on Linux emergency Boot…|
|jflaster on Customizing Your Solaris 11 Au…|
|Raymond on Customizing Your Solaris 11 Au…|
|jflaster on Minding your ZFS pool and file…|
A place for Unix Thoughts and Ideas
Jumpstarting to sparc servers with bootp on Solaris 10 was very simple and straight forward, especially for those who didn’t or couldn’t run DHCP on their server networks.
However with Solaris 11, if you want to use auto-installer, you will need to setup or configure DHCP to hand out addresses to your Solaris hosts.
Here is a straight forward method for managing a DHCP server that functions similar to Bootp, with it only handing out address to your Auto Install Clients.
What I will be demonstrating is installing and configuring the dhcp-server and adding a network with and then adding a permanent address entry for a specific MAC address.
1. Install DHCP server
on Solaris 11:
# pkg install pkg:/service/network/dhcp/isc-dhcp
The server can also be existing and/or on run on Solaris 10.
2. Configure the DHCP Server
I was fortunate to have no conflicting DHCP servers on my subnet, if there was and that server is not allowing enough time for my auto installer DHCP server to respond, I would have kindly ask the dhcp server admistrator to insert a delay in the server.
We will be booting a server that is on the 10.0.10.0 network, we are going to configure the DHCP server to use local files. Note that the dhcp server seems to need the network entry in /etc/netmasks to be present. On Solaris 11 this file by default has no entries in it.
/usr/sbin/dhcpconfig -D -r SUNWfiles -p /var/dhcp echo “10.0.10.0 255.255.255.0” >> /etc/netmasks dhcpconfig -N 10.0.10.0 -m 255.255.255.0 -t 10.0.0.1 -g pntadm -C 10.0.10.0
3. Add client entry.
When adding the mac address to the server you want to make sure that there is 12 characters in the mac address (2 chars for each part of the address).
If you copied and pasted it from ifconfig or the lom, you may have to a add a zero to 1 or more of the fields. Additionally you’ll want to have a 01 in front and make sure it is in all CAPs and has none of the colons.
The client I’m adding is name test-ai-client and has the mac address 0:50:56:B0:0:D6, I will be specifying this as 01005056B000D6
# installadm create-client -e 01005056B000D6 -n s11-sparc No local DHCP configuration found. If not already configured, the following should be added to the DHCP configuration: Boot server IP : 10.0.3.72 Boot file : 01005056B000D6 Note: determined more than one IP address configured for use with AI. Please ensure the above 'Boot server IP' is correct.
For my infrastructure my build scripts create a macro in the dhcp server for each client which is the hostname (test-ai-client):
#dhtadm -A -m test-ai-client -d ":Subnet=255.255.255.0:Router=10.0.10.1:Broadcst=10.0.10.255:BootSrvA=10.0.3.72:BootFile=01005056B000D6:DNSdmain="testdomain.com":DNSserv=10.0.0.12 10.0.0.13" # dhtadm -P Name Type Value ================================================== test-ai-client Macro :Subnet=255.255.255.0:Router=10.0.10.1:Broadcst=10.0.10.255.255:BootSrvA=10.0.3.72:BootFile=01005056B000D6:DNSdmain=testdomain.com:DNSserv=10.0.0.12 10.0.0.13: 10.0.10.0 Macro :Subnet=255.255.255.0:Router=10.0.10.1:Broadcst=10.0.10.255.255: aidhcpserver Macro :Include=Locale:Timeserv=10.0.10.239:LeaseTim=86400:LeaseNeg:DNSdmain="testdomain.com":DNSserv=10.0.0.12 10.0.0.13: Locale Macro :UTCoffst=0:
Now adding the dhcp entry:
# pntadm -A test-ai-client -c "test-ai-client" -s `hostname | cut -d. -f1` -m test-ai-client -f "PERMANENT+MANUAL" -h test-ai-client -i 01005056B000D6 10.0.10.0 pntadm: Warning - No hosts resource value found in DHCP configuration file. Operation succeeded, but hosts table was not updated. # pntadm -P 10.0.10.0 Client ID Flags Client IP Server IP Lease Expiration Macro Comment 01005056B000D6 03 10.0.10.242 10.0.10.239 Forever test-ai-client test-ai-client
Of note in the command is the -s option which set the server option for the entry, you’ll want it to be the local dhcp servername.
If you are booting a sparc host, you dhcp macro entry will look like:
# dhtadm -A -m "denpdapsunadm1" -d ":Subnet=255.255.252.0:Router=10.0.10.1:Broadcst=10.0.10.255:BootFile=\"http://10.0.3.72:5555/cgi-bin/wanboot-cgi\":DNSdmain=testdomain.com:DNSserv=10.0.0.12 10.0.0.13:" # dhtadm -P Name Type Value ================================================== test-ai-client Macro :Subnet=255.255.255.0:Router=10.0.10.1:Broadcst=10.0.10.255:BootFile="http://10.0.3.72:5555/cgi-bin/wanboot-cgi":DNSdmain=testdomain.com:DNSserv=10.0.0.12 10.0.0.13: 10.0.10.0 Macro :Subnet=255.255.255.0:Router=10.0.10.1:Broadcst=10.0.10.255: aidhcpserver Macro :Include=Locale:Timeserv=10.0.10.239:LeaseTim=86400:LeaseNeg:DNSdmain="testdomain.com":DNSserv=10.0.0.12 10.0.0.13: Locale Macro :UTCoffst=0:
Now this has been added to the server, you can now network boot your client server.
If you run into issues with your configuration not working, you can easily debug the dhcp server through the following:
svcadm disable dhcp-server