In this article Setup Jumpstart with DHCP on an Solaris 11 machine (1/3): setup Jumpstart server we setup a Jumpstart server with DHCP on an Solaris 11 (11.2) box. Now we are creating client data for an x86 client. Mac address of this client is, say, 08:00:27:82:9D:49,

1. put a file sysidcfg to a directory, I will use /work/jumpstart/config/sysidcfg/08:00:27:82:9D:49/my-first-project in this example,

# mkdir -p /work/jumpstart/config/sysidcfg/08:00:27:82:9D:49/my-first-project

then add a file /work/jumpstart/config/sysidcfg/08:00:27:82:9D:49/my-first-project/sysidcfg
(you can refer to http://docs.oracle.com/cd/E26505_01/html/E28037/preconsysid-55534.html for details of sysidcfg)

—– begin of sysidcfg —–
name_service=NONE
network_interface=PRIMARY {
      dhcp
        protocol_ipv6=no
}
system_locale=C
timezone=Asia/Taipei
root_password=yyPLbpUHu9bRc
security_policy=NONE
nfs4_domain=dynamic
timeserver=localhost
terminal=vt100
auto_reg=none
—– end of sysidcfg —–

some notes:
“timezone=<timezone name>” specify a timezone that can be modified to yours 
“timeserver=<ip address>” let the x86 client to synchronize time from other server during Jumpstart installation is take place
“timeserver=localhost” keeps this client to use its own time.
root_password contains an encrypted password which can be obtained from /etc/shadow

2.  put these files “profile”, “rules”, “begin_script” (optional), “finish_script” (optional) to a directory, I will use /work/jumpstart/config/profile/my-first-project in this example,

# mkdir -p /work/jumpstart/config/profile/my-first-project
# cd /work/jumpstart/config/profile/my-first-project

then add files profile, rules, begin_script, finish_script
   (profile you can refer to http://docs.oracle.com/cd/E26505_01/html/E28039/preparecustom-24696.html for more profile configurations)

—– begin of profile —–
install_type    initial_install
cluster         SUNWCXall
locale          C
geo             C_America
geo             N_America
geo             S_America
geo             Ausi
geo             C_Europe
geo             E_Europe
geo             N_Europe
geo             S_Europe
geo             W_Europe
geo             N_Africa
geo             S_Africa
geo             Asia
geo             M_East
system_type     standalone
partitioning    explicit
pool rpool auto auto auto any
—– end of profile —–


—– begin of rules —–
any –   begin_script    profile finish_script
—– end of rules —–


—– begin of begin_script —–
#!/bin/sh
echo “begin_script is beginning at `date`”

(do what you want or empty here)

echo “begin_script is ending at `date`”
—– end of begin_script —–


—– begin of finish_script —–
#!/bin/sh
echo “finish_script is beginning at `date`”

(do what you want, such as changing sshd configuration to allow root ssh login, changing root’s shell, installing recommended patches,….. As root file system is mounted under /a during jumpstart installation, remember to write scripts to make any modification with files under /a. you can leave here empty if no customization is required.)

echo “finish_script is ending at `date`”
—– end of finish_script —–


3. go to profile directory /work/jumpstart/config/profile/my-first-project and run /work/jumpstart/os-image/Install-i386-10-u11_2013.01/Solaris_10/Misc/jumpstart_sample/check

# cd /work/jumpstart/config/profile/my-first-project
# /work/jumpstart/os-image/Install-i386-10-u11_2013.01/Solaris_10/Misc/jumpstart_sample/check
Validating rules…
Validating profile profile…
The custom JumpStart configuration is ok.

You will see a file rules.ok generated from rules.

Be noted: in Solaris 11.1 we need to change the first line of /work/jumpstart/os-image/Install-i386-10-u11_2013.01/Solaris_10/Misc/jumpstart_sample/check from  #!/bin/sh to #!/usr/sunos/bin/sh, but this step is not necessary in Solaris 11.2.


4. run add_install_client to add client information,

# /work/jumpstart/os-image/Install-i386-10-u11_2013.01/Solaris_10/Tools/add_install_client \
-c 192.168.1.115:/work/jumpstart/config/profile/my-first-script \
-p 192.168.1.115:/work/jumpstart/config/sysidcfg/my-first-script/08:00:27:82:9D:49 \
-d -e 08:00:27:82:9D:49 i86pc
/work/jumpstart is already shared.
However, the zfs file system /work/jumpstart must be shared
read-only with root access.  Use the “zfs set” command to
set the sharenfs property for file system /work/jumpstart as follows:
Use ro and anon=0 for /work/jumpstart.  This must be
fixed and /work/jumpstart shared before 08:00:27:82:9D:49 can boot.
/work/jumpstart is already shared.
However, the zfs file system /work/jumpstart must be shared
read-only with root access.  Use the “zfs set” command to
set the sharenfs property for file system /work/jumpstart as follows:
Use ro and anon=0 for /work/jumpstart.  This must be
fixed and /work/jumpstart shared before 08:00:27:82:9D:49 can boot.
cleaning up preexisting install client “08:00:27:82:9D:49”
To disable 08:00:27:82:9D:49 in the DHCP server,
  remove the entry with Client ID 01080027829D49

If not already configured, enable PXE boot by creating
a macro named 01080027829D49 with:
  Boot server IP (BootSrvA) : 127.0.0.1
  Boot file      (BootFile) : 01080027829D49


5. add the following lines to the end of /etc/inet/dhcpd4.conf (make sure no duplication of this MAC address)
host 080027829D49 {
    hardware ethernet 08:00:27:82:9D:49;
    filename “01080027829D49“;
}

then refresh DHCP service by

svcadm refresh dhcp/server:ipv4


6. edit the file /tftpboot/menu.lst.01080027829D49

change
      kernel$ /I86PC.Solaris_10-1/multiboot kernel/$ISADIR/unix -B

to
        kernel$ /I86PC.Solaris_10-1/multiboot kernel/$ISADIR/unix – install dhcp nowin -B


7. boot up this x86 client from network (PXE boot)