System sends out a RARP request to figure out who it is.
This is where the /etc/ethers file comes into play.
BOOTPARAM
System sends out a BOOTPARAM request to find its root file
system. This is where the /etc/bootparams file comes
into play.
KERNEL
System mounts root directory, and loads kernel.
SYSTEM CONFIG
System looks for a sysidcfg file and sets
information from this file. If any information is missing,
the user is queried.
RULES
System looks for a rules.ok file and a matching
rule.
BEGIN
The BEGIN script is run.
PROFILE
The PROFILE file is read.
Solaris Install
Disks are partitioned and Solaris is installed according to
the information in the PROFILE file.
FINISH
The FINISH script is run.
REBOOT
The system is rebooted.
Install Solaris 8 Jumpstart Software
The Jumpstart server in this example is named
axi. Important directories to define:
Jumpstart Root -- This is where the Solaris software is
installed. For this example, I will be using the
/fs1/js directory.
Sysid Config Directory -- This is where the
sysidcfg file goes. For this example, I am
using the /fs1/js/sysid_config directory.
Installation Configuration Directory -- This is where the
rules files resides, as well as the BEGIN, PROFILE,
and FINISH scripts. For this example, I am using the
/fs1/js/config directory.
Detailed instructions for this step are avaialable on the Sun
site. Here's what I did for this demonstration:
Installing Solaris Jumpstart Software from CD
(insert Solaris 8 SOFTWARE Disk 1)
# cd /cdrom/sol_8_1001_sparc/s0/Solaris_8/Tools
# ./install_server /fs1/js
# eject cdrom
(insert Solaris 8 SOFTWARE Disk 2)
# cd /cdrom/sol_8_1001_sparc_2/Solaris_8/Tools
# ./add_to_install_server /fs1/js
# cd /fs1/js/Solaris_8/Tools
Add a Solaris 8 client
After installing the Solaris 8 Jumpstart software, you will want
to tell the Jumpstart system about a client you wish to
install. You do this by the following steps:
Update the /etc/hosts file with the information for
the new host. The hostname I'm using for this demonstration
is js1.
Gather the MAC address (from th PROM screen) and
architecture type (uname -m) of the client.
Run the add_install_client script.
For this demonstration, I ran the following command:
This script does many things to prepare your Jumpstart server
Results of Running add_install_client script
File Updated
Description
/etc/ethers
This file is updated so that RARP will respond with the
proper IP address for the requested MAC address. If
rarpd was not configured to run at boot time,
it is now.
8:0:20:a8:d7:9c js1.willingminds.com
/etc/bootparams
Updates the file with the information on the command
line. If bootparamd was not configured to run
at boot time, it is now. The bootparams file
listed here has been split for readability:
Installs a bootstrap file and symlinks in the
/tftpboot directory.
The bootstrap file is for the machine type specified on
the command line. The symlinks are a HEX representation
of the IP address of the client. In this example, the
symlink filenames are C0A801DC and C0A801DC.SUN4U.
A "remove" script (rm.192.168.1.220) is also
installed to remove the symlinks (and possibly bootstrap
file) at a later time.
If tftpd was not configured to run from
inetd, it is now:
If the Jumpstart Root directory (-s flag) was not
exported via NFS, it is now:
share -F nfs -o ro,anon=0 /fs1/js
Create sysidcfg file
The sysidcfg contains system information about a
host. During a normal install, these are the questions asked
before the disk/software configuration questions are asked.
The filename containing the answers to these questions MUST be
named sysidcfg and must reside in the Sysid
Config Directory defined above. Here is the file being
used in this demonstration:
The rules file is located in the Installation
Configuration Directory defined above
(/fs1/js/config). The rules file tells the
Jumpstart software which BEGIN script to run, which PROFILE file
is appropriate for the client, and which FINISH script to run
after software installation. A simple file looks like this:
/fs1/js/config/rules file
# keyword value begin-script profile finish-script
#=============================================================================
any - - any_machine -
BEGIN scripts
A BEGIN script is run before anything else. Some possibilities
for BEGIN scripts include:
do a backup before an upgrade
check bootparams entries
dd an image onto the hard drive and reboot
We have specified no BEGIN script in our example above.
PROFILE files
The syntax of the PROFILE file is detailed on the Sun doc site.
Here is the file used for this demonstration:
The FINISH script is run after the main Solaris installation.
Examples of what might go into a FINISH script include:
code to install patches
code to install third-party software
code to update root password
Note -
The root filesystem of the client is mounted
under the /a directory. Make sure that all third-party
packages you install (via pkgadd -R /a PKGNAME have
pre-install or post-install scripts use $PKG_INSTALL_ROOT
as the root prefix when updating files.
We have specified no FINISH script in our example above.
Check rules file
Now that the BEGIN, PROFILE, and FINISH files are configured, we
need to run the check file to generate the
rules.ok file. This script will check the
rules file for syntax correctness and will check to
make sure that the BEGIN script, PROFILE file, and FINISH
scripts are actually available.
The Jumpstart server is now configured and ready to go.
Advanced rules file
There are advanced things you can do in the rules file. Let's
examine by column:
Keyword/Value
Table 28-1 in the Solaris 8 Advanced Installation
Guide outlines the keywords and their appropriate
values. Some examples of keywords include arch,
disksize, and hostname. The
hostname keyword is nice, but what if you're
setting up 100 web servers all named web00-web99? It would
be nice if hostname allowed regular expressions
in the Value column. It doesn't, though.
This is where the custom_probes file comes in.
In this file, you can create your own keyword by creating a
function called cmp_new_keyword. In this
example, I have created a rehostname to be a
regular-expression aware version of the hostname
keyword:
custom_probes file
# purpose: match using somewhat regular expressions
# syntax: rehostname
cmp_rehostname () {
probe_hostname
expr "${SI_HOSTNAME}" : "$1" >/dev/null
}
Begin Script
This is simply the name of the BEGIN script to run. The
BEGIN script can be used to create a DERIVED PROFILE by
printing profile information out to the file
$SI_PROFILE.
Profile
There are three possible values for the PROFILE column.
Values for PROFILE Column
Value
Description
filename
The name of the file that contains profile information.
-
If a single hyphen is used for the profile, then only
the BEGIN and FINISH scripts are used to do
installation. You would use this if you were doing
the dd method of installation.
=
If the PROFILE column contains an equals sign, then
the BEGIN script is expected to generate a
Derived Profile into the file ${SI_PROFILE}.
Here is an example of a begin script that generates a
profile:
BEGIN file Generating a Derived Profile
#!/bin/ksh
#
# Figure out which jumpstart group we're in by grabbing the name of this script
JSGRP=`basename ${SI_BEGIN}`
export JSGRP
JSMACH=`uname -m`
JSNODE=`uname -n`
{
# every profile needs this
/bin/ksh ${SI_CONFIG_DIR}/profile/header
#
# generate the disk information
/bin/ksh ${SI_CONFIG_DIR}/profile/$JSGRP.disk
#
# generate the software information
/bin/ksh ${SI_CONFIG_DIR}/profile/$JSGRP.software
test -f ${SI_CONFIG_DIR}/profile/SOFTWARE.$JSMACH && /bin/sh ${SI_CONFIG_DIR}/profile/SOFTWARE.$JSMACH
#
# Finally, look for a host-specific file.
test -f ${SI_CONFIG_DIR}/begin/$JSNODE && /bin/sh ${SI_CONFIG_DIR}/begin/$JSNODE
} > ${SI_PROFILE}
$SI_CONFIG_DIR/profile/header file
# keywords values
# ====================
echo "install_type initial_install"
echo "system_type standalone" ;# it has a disk