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 a Sparc client. Mac address of this client is, say, 08:00:27:13:14:20,
1. put a file sysidcfg to a directory, I will use /work/jumpstart/config/sysidcfg/08:00:27:13:14:20/my-second-project in this example,
# mkdir -p /work/jumpstart/config/sysidcfg/08:00:27:13:14:20/my-second-project
then add a file /work/jumpstart/config/sysidcfg/08:00:27:13:14:20/my-second-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
“timezone=<timezone name>” specify a timezone that can be modified to yours
“timeserver=<ip address>” let the Sparc 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-second-project in this example,
# mkdir -p /work/jumpstart/config/profile/my-second-project
# cd /work/jumpstart/config/profile/my-second-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-second-project and run /work/jumpstart/os-image/Install-sparc-10-u11_2013.01/Solaris_10/Misc/jumpstart_sample/check
# cd /work/jumpstart/config/profile/my-second-project
# /work/jumpstart/os-image/Install-sparc-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-sparc-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, (the last argument is sun4u or sun4v, based on your hardware type)
# /work/jumpstart/os-image/Install-sparc-10-u11_2013.01/Solaris_10/Tools/add_install_client \
-c 192.168.1.115:/work/jumpstart/config/profile/my-second-project \
-p 192.168.1.115:/work/jumpstart/config/sysidcfg/my-second-project/08:00:27:13:14:20 \
-d -e 08:00:27:13:14:20 sun4u
/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:13:14:20 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:13:14:20 can boot.
To enable 01080027131420 in the DHCP server, ensure that
the following Sun vendor-specific options are defined
(SinstNM, SinstIP4, SinstPTH, SrootNM, SrootIP4,
SrootPTH, and optionally SbootURI, SjumpCF and SsysidCF),
and add a macro to the server named 01080027131420,
containing the following option values:
Install server (SinstNM) : vbox
Install server IP (SinstIP4) : 127.0.0.1
Install server path (SinstPTH) : /work/jumpstart/os-image/Install-sparc-10-u11_2013.01
Root server name (SrootNM) : vbox
Root server IP (SrootIP4) : 127.0.0.1
Root server path (SrootPTH) : /work/jumpstart/os-image/Install-sparc-10-u11_2013.01/Solaris_10/Tools/Boot
Boot file (BootFile) : 01080027131420
Profile location (SjumpsCF) : 192.168.1.115:/work/jumpstart/config/profile/my-second-project
sysidcfg location (SsysidCF) : 192.168.1.115:/work/jumpstart/config/sysidcfg/my-second-project/08:00:27:13:14:20
5. add the following lines to the end of /etc/inet/dhcpd4.conf based on above command output, replace 127.0.0.1 and my hostname vbox with real ip address, in this article, it’s 192.168.1.115. (make sure no duplication of this MAC address)
host 080027131420 {
hardware ethernet 08:00:27:13:14:20;
filename “01080027131420“;
option SUNW.SinstNM “192.168.1.115”;
option SUNW.SinstIP4 192.168.1.115;
option SUNW.SinstPTH “/work/jumpstart/os-image/Install-sparc-10-u11_2013.01”;
option SUNW.SrootNM “192.168.1.115”;
option SUNW.SrootIP4 192.168.1.115;
option SUNW.SrootPTH “/work/jumpstart/os-image/Install-sparc-10-u11_2013.01/Solaris_10/Tools/Boot”;
option SUNW.SjumpsCF “192.168.1.115:/work/jumpstart/config/profile/my-second-project”;
option SUNW.SsysidCF “192.168.1.115:/work/jumpstart/config/sysidcfg/my-second-project/08:00:27:13:14:20”;
}
then refresh DHCP service by
svcadm refresh dhcp/server:ipv4
6. boot up this Sparc client from ok prompt with
boot net:dhcp – install