In this article I want to setup a Jumpstart server using DHCP on an Solaris 11.2 machine.


Jumpstart is the automation installation of Solaris 10 so that we can install Solaris 10 easily with prepared configuration. Normally a Jumpstart server is installing on a Solaris 10 server and consists of below sub-servers,
  1. RARP server: provides MAC address (Ethernet address) to IP service
  2. Boot parameter server: provides server information to client
  3. DHCP server: RARP and Boot parameter servers can be substituted by DHCP server.
  4. Boot server: provides mini boot image via tftp to boot up clients
  5. Install package server: provides software packages to client via NFS
  6. System Identity (sysidcfg) server: provides information of ip address, time zone, default locale, root password…
  7. Profile server: provides software configuration (what to install) and disk layout of this client.

In an extreme case we can divide all the services into 7 different servers, but for management consideration we often integrate all of them into one. Similarly, for management purpose we may want to integrate both Jumpstart and AI servers onto the same box, yes, that’s why we have this article.


One advantage of Jumpstart on Solaris 11.2 box is Solaris 11’s ISC DHCP, which can boot up x86 client since PXE boot up doesn’t support RARP, it supports DHCP only. I will not talk about RARP and boot parameter servers here, only DHCP will be introduced. So please prepare an Solaris 11.2 machine with this group package solaris-large-server installed and let’s start,


1. prepare a file /etc/inet/dhcpd4.conf


(my server ip: 192.168.1.115, netmask: 255.255.255.0, defaultrouter: 192.168.1.1, broadcast: 192.168.1.255,
my server will provide 192.168.1.200 – 192.168.1.220 to DHCP clients)


——————- begin of dhcpd4.conf ——————-
# dhcpd.conf

#

# Sample configuration file for ISC dhcpd

#


# option definitions common to all supported networks…

#option domain-name “example.org”;

#option domain-name-servers ns1.example.org, ns2.example.org;


default-lease-time 600;

max-lease-time 7200;


# Use this to enble / disable dynamic dns updates globally.

#ddns-update-style none;


# If this DHCP server is the official DHCP server for the local

# network, the authoritative directive should be uncommented.

#authoritative;


# Use this to send dhcp log messages to a different log file (you also

# have to hack syslog.conf to complete the redirection).

log-facility local7;


# For Sparc clients

option space SUNW;

option SUNW.SrootIP4   code 2 = ip-address;

option SUNW.SrootNM    code 3 = text;

option SUNW.SrootPTH   code 4 = text;

option SUNW.SinstIP4   code 10 = ip-address;

option SUNW.SinstNM    code 11 = text;

option SUNW.SinstPTH   code 12 = text;

option SUNW.SbootURI   code 16 = text;

option SUNW.SjumpsCF   code 14 = text;

option SUNW.SsysidCF   code 13 = text;



# No service will be given on this subnet, but declaring it helps the

# DHCP server to understand the network topology.


subnet 192.168.1.0 netmask 255.255.255.0 {

  range 192.168.1.200 192.168.1.220;

  option broadcast-address 192.168.1.255;

  option routers 192.168.1.1;

  next-server 192.168.1.115;


   on commit {

      log(“=============[ START COMMIT ]================”);

      log(“The host name is:”);

      log(host-decl-name);

      set ClientIP = binary-to-ascii(10, 8, “.”, leased-address);

      set ClientMac = binary-to-ascii(16, 8, “:”, substring(hardware, 1, 6));

      log(concat(“Commit: IP: ” , ClientIP, ” Mac: “, ClientMac, ” Hostname: ” , host-decl-name));

      log(“============[ END COMMIT ]==================”);

   }

}


——————- end of dhcpd4.conf ——————-


then enable dhcp service by running


svcadm enable dhcp/server:ipv4


and make sure dhcp is online by


# svcs dhcp/server:ipv4

STATE          STIME    FMRI

online          9:43:25 svc:/network/dhcp/server:ipv4


2. add this line to the end of /etc/syslog.conf


local7.debug                                    /var/adm/dhcpd.log


(Be noted to put Tab’s between local7.debug and /var/adm/dhcpd.log, you will get error if Space is used.)


then run


svcadm refresh /system/system-log



so that this server can keep dhcp logs in /var/adm/dhcpd.log. You can make sure system-log is running by

# svcs /system/system-log

STATE STIME FMRI

online 13:31:24 svc:/system/system-log:default

If STATE of system-log is maintenance please check syslog.conf again to see if you use SPACE in that line


3. download Solaris 10 iso image at http://www.oracle.com/technetwork/server-storage/solaris10/downloads/index.html


for instance, sol-10-u11-ga-x86-dvd.iso is the iso image of Solaris 10 u11 for x86, then


# mount -F hsfs /root/sol-10-u11-ga-x86-dvd.iso /mnt

# cd /mnt

# ls

Copyright                         Solaris_10                        installer

Offer_to_Provide_Source_Code.txt  boot


# mkdir -p /work/jumpstart/os-image/Install-i386-10-u11_2013.01/

# find . |cpio -pud /work/jumpstart/os-image/Install-i386-10-u11_2013.01/

# ls /work/jumpstart/os-image/Install-i386-10-u11_2013.01/

Copyright                          boot/                              Offer_to_Provide_Source_Code.txt

Solaris_10/                        installer*

# umount /mnt


With above commands we put contents of this iso image to the directory /work/jumpstart/os-image/Install-i386-10-u11_2013.01/


4. retrieve /usr/sbin/install.d/chkprobe from Solaris 10 os image,


# cd /tmp

# 7z x /work/jumpstart/os-image/Install-i386-10-u11_2013.01/Solaris_10/Product/SUNWinst/archive/none.7z

# cpio -id < none

# ls /tmp/usr/sbin/install.d

chkprobe*    findcd*      get_mntpnt*  pfinstall*   profetch*    profind*     set_mntpnt*  stubboot*

# mkdir /usr/sbin/install.d

# cp /tmp/usr/sbin/install.d/chkprobe /usr/sbin/install.d


5. NFS share our jumpstart directory with the option ro,anon=0


on my server rpool/work/jumpstart is an ZFS dataset


# zfs list rpool/work/jumpstart

NAME                  USED  AVAIL  REFER  MOUNTPOINT

rpool/work/jumpstart  184G   619G   176G  /work/jumpstart


so I just share it by these commands,


zfs set share=name=jumpstart,path=/work/jumpstart,prot=nfs,anon=0,sec=sys,ro=* rpool/work/jumpstart

zfs set sharenfs=on rpool/work/jumpstart


then use ‘share’ to make sure jumpstart server has been shared correctly,


# share

jumpstart    /work/jumpstart nfs     anon=0,sec=sys,ro

IPC$            smb     –       Remote IPC


You may have to share the directory with other similar commands based on your scenario.


6. to integrate AI and Jumpstart into one server, combine /etc/netboot and /tftpboot as one,


# mkdir -m 755 /etc/netboot

# ln -s /etc/netboot /tftpboot


(this is because of that AI uses /etc/netboot for tftp transfer but Jumpstart uses /tftpboot )


7. install package pkg:/system/boot/network to get RARP and boot parameter support although these two will not be discussed in this article,
pkg install pkg:/system/boot/network 

8. (optional) in case you wanna jumpstart clients to synchronize time with this server during jumpstart, run these two commands,

svcadm enable time:stream

svcadm enable time:dgram



Jumpstart server has been setup well at this stage. It’s time to setup client data and boot up the client for auto installation, see the other parts of this series,

x86 client -> Setup Jumpstart with DHCP on an Solaris 11 machine (2/3): setup x86 client
Sparc client -> Setup Jumpstart with DHCP on an Solaris 11 machine (3/3): setup Sparc client