Back to the main page

Jumpstart server setup - for x86 client

Note again: this is only if you want to configure Jumpstart server for x86 clients. 

So let's first do quick introduction about JumpStart Server. 

It consists of three servers (yes, all can be in one machine): 

1.  Boot  (provides RARP, TFTP and bootparam services)
2.  Configuration  (specifies client's profile, list of software, begin and finish scripts)
3.  Install Server  (provides OS/software to be installed on a client) 

Basically next tasks are necessary for setting up jumpstart server: 

1. Installing Solaris OS distribution 
2. Setup configuration server with configuration files, and verify them (config file syntax) 
3. Share installation directories (NFS server is running, right?) 
4. Make sure client has access  

 Installing OS distribution 

Mount Solaris OS DVD ISO image,  see how .

And install the server (yes in designated location, like /jumpstart/server/x86). 

# /mnt/Solaris_10/Tools> ./setup_install_server /jumpstart/server/x86 
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Calculating space required for the installation boot image
Copying the CD image to disk...
Copying Install Boot Image hierarchy...
Copying /boot netboot hierarchy...
Install Server setup complete
Making Configuration server You need: 1. profile text file (defines software to be installed) 2. rules text file (defines rules/steps for install) 3. scripts for pre and post install tasks 4. sysidcfg (configuration information) Note: Sun provides 'check' script that you run to verify rule file, if everything okay, script will generate rules.ok file. Basically this works like: 1. Jumpstart reads rules.ok file 2. Jumpstart finds profile in rules.ok and use it for installation 3. If rule(s) doesn't match, regular interactive installation occurs. Profile file This file defines how to install software. Check Sun docs for many profiles' keywords/values. Example of profile with comments:
# keyword		value
# ============================

# Keyword install_type is MANDATORY
install_type    initial_install

# If system_type omitted, standalone will be also used
system_type     standalone

# Cluster is collection of packages that makes functional unit. 
# Meta-cluster is collection of clusters and packages that creates configuration.
# They are listed in /mnt/Solaris_10/Product/.clustertoc file.
# If add/delete is not specified, add is used 
cluster SUNWCreq
cluster	SUNWCdhcp       add
cluster SUNWC-name      add  nfs server:/servername/path

# fdisk directive is MUST for x86 client !!!!
fdisk          all     solaris all

# partitioning - Defines how disk is divided in slices
# Must be combined with keyword filesys
partitioning    explicit
filesys         rootdisk.s0     4096    /
filesys         rootdisk.s1     4096    swap
filesys         rootdisk.s3     4096    /var
filesys         rootdisk.s4     4096   /usr
filesys         rootdisk.s5     free    /backup
filesys         rootdisk.s7     256
Notes about fdisk directive in profile file (only for x86 client): The fdisk is partition of the disk that is dedicated to particular OS. It must be at least one fdisk partition on x86 system for Solaris to be installed. The x86 system allows max 4 fdisk partitions. But only one Solaris fdisk partition can be per physical disk. So what fdisk all solaris all does? fdisk = defines how fdisk partitions are setup on x86 system all = this should be disk name, so do it on all disks solaris = this is type of OS all = this is size, so fdisk partition will take whole disk Rules file Example of the file, use && (logical AND) to join keywords/values in same rule:
# rules keyword & values   begin script  profile    finish script
hostname unixlab && arch i386   -    profile     finish_script
And verify the rules file:
/jumpstart/config/client_hostname # ./check
Validating rules...
Validating profile profile...
The custom JumpStart configuration is ok.
Note: check Sun docs for other rule's keywords/values. Begin (Bourne shell) script Here you place action to be performed before Solaris software is installed. After installation, logs will be in /var/sadm/system/logs/begin.log Finish (Bourne shell) script This performs action after Solaris software is installed but before system reboots. It's ideal for installing third party software, setting root's password, etc. After installation, logs will be in /var/sadm/system/logs/finish.log Note that file system remains mounted on /a until system reboots. File sysidcfg The sysidcfg file defines system identification, like system locale, time zone, terminal, nameservices, net interface, root password, etc. See 'man sysidcfg'. Share installation directories Add line to /etc/dfs/dfstab file
share -F nfs -o ro,anon=0 -d "Jumpstart_Share" /jumpstart
Share directory:
# shareall
Check results:
# showmount -e localhost
export list for localhost:
/jumpstart (everyone)
Secure client's access Have client's hostname and IP in /etc/hosts file. Add client (run command without arguments to see help output)
# /jumpstart/server/x86/Solaris_10/Tools> ./add_install_client
ERROR: Either client name or client platform group is not specified.
Usage: ./add_install_client [-i ipaddr] [-e ethernetid] [-s server:path]
                [-c server:path] [-p server:path]
                [-n [name_server]:name_service[(netmask)]]
                [-t install boot image path] client_name platform_group

DHCP clients:
       ./add_install_client -d [-s server:path] [-c server:path]
                [-p server:path] [-t install boot image path]
                [-f boot file name] platform_name platform_group
       ./add_install_client -d -e ethernetid [-s server:path]
                [-b "property=value"] (i86pc platform only)
                [-c server:path] [-p server:path]
                [-t install boot image path] [-f boot file name]
Example (DHCP client):
./add_install_client -d -e xx:xx:xx:xx:xx:xx \  (-d = client will use DHCP)
-s servername:/jumpstart/server/x86/5.10 \	(-s = location of distribution)
-c servername:/jumpstart/config/clientname \	(-c = location of client's configuration directory)
-p servername:/jumpstart/config/clientname \	(-p = location of client's sysidcfg file)
i86pc						(i86pc = correct, this is platform group)
Expect similar output:
If not already configured, enable PXE boot by creating
a macro named 0100144F017EE8 with:    (macro name is 01+Client_MAC, which is 00:14:4F:01:7E:E8) 
  Boot server IP (BootSrvA) : 192.168.etc.etc   (IP of my jumpstart server) 
  Boot file      (BootFile) : 0100144F017EE8
Next files appear in /tftpboot directory:
rm.0100144F017EE8 (shell script - cleanup file for 00:14:4F:01:7E:E8)
menu.lst.0100144F017EE8 (check this ascii file)
nbp.0100144F017EE8 -> pxegrub.I86PC.Solaris_10-1
0100144F017EE8 -> pxegrub.I86PC.Solaris_10-1
pxegrub.I86PC.Solaris_10-1 (this is "inetboot" file for x86 client)
The file menu.lst.0100144F017EE8 needs verification and maybe some additional editing. It looks like:
title Solaris_10 Jumpstart for your_hostname!
        kernel /I86PC.Solaris_10-1/multiboot kernel/unix - install dhcp -B console=ttya,install_config=192.168.x.x:/jumpstart/config/your_hostname,sysid_config=192.168.x.x:/jumpstart/config/your_hostname,install_media=192.168.x.x:/jumpstart/distrib/x86/5.10,install_boot=192.168.28.x:/jumpstart/distrib/x86/5.10/boot
        module /I86PC.Solaris_10-1/x86.miniroot
The important thing here is to verify that you have - install dhcp after kernel/unix and console=ttya, right in front of install_config.

DHCP and Jump Start

Okay, since we are installing OS on x86 client, we'll have to bring DHCP server into the game. 

Client get network configuration from DHCP server during booting.

DHCP (or jumpstart server) doesn't need to be on same subnet as client, since client doesn't send RARP request for IP. 
Instead it is broadcasting dhcpdiscover request and yes, modern routers support dhcp relays. 

My jumpstart/dhcp server is Solaris 10. 

DHCP server macros are group of options having info like boot server name, path to boot and install image, etc. 
This is stored in  /var/dhcp/SUNWfiles1_dhcptab  file.  Use command  dhtadm  to edit this file. 

Information with clients IP/MAC, etc (all clients in one subnet) is stored in  /var/dhcp/SUNWfiles1_xxx_xxx_xxx_xxx  file (something like SUNWfiles1_192_168_15_0).  
Use command  pntadm  to edit this file. 

Start DHCP:

#svcadm -v enable svc:/network/dhcp-server:default
svc:/network/dhcp-server:default enabled.
Also check file /etc/inet/dhcpsvc.conf
INTERFACE=eri0  (make sure this is your interface to listen dhcp requests to)
VERBOSE=TRUE (set to TRUE to get error messages in case of debugging)
Let's configure DHCP using configuration tool dhcpconfig
# dhcpconfig -D -r SUNWfiles -p /var/dhcp
dhcpconfig: Error - DHCP service is already configured on this server.
Right, it's configured from before, but if not this command will create directory /var/dhcp and populate with files like .SUNWfiles1_dhcptab.lock and SUNWfiles1_dhcptab. The file /etc/inet/dhcpsvc.conf is created and DHCP service started. Example follows.
# dhcpconfig -D -r SUNWfiles -p /var/dhcp
Created DHCP configuration file.
Created dhcptab.
Added "Locale" macro to dhcptab.
Added server macro to dhcptab - servername.
DHCP server started.
-D = configure DHCP -r = specify data resource (SUNWfiles stored data in ASCII files, but hand-editing is still discouraged) -p = specify path where to store config files Check status of DHCP service
# dhcpconfig -S -q
DHCP server enabled.
DHCP server running.
In case you need to add additional subnet:
# dhcpconfig -N -t
Added network macro to dhcptab -
Created network table.
-t = specifies Router for subnet This will create new file /var/dhcp/SUNWfiles1_192_168_28_0 and update SUNWfiles1_dhcptab. Another command for adding new subnet:
# pntadm -C
To list DHCP network tables:
#  pntadm -L
Finally ready to add a client (check man pntadm)
# pntadm -A 192.168.xx.xx -c X4200 -e 01/01/2010 -f 00 -h client_hostname -i 01XXXXXXXXXXXX -m macroname -s dhcp_server network
-A = add client with IP -c = comment -e = absolute lease mm/dd/yyyy, some day in future -f = flag value, say 00 -h = client hostname -i = client ID, 01MAC (MAC must be CAPITAL letters) -m = macro name, say same as hostname -s = server's IP network = subnet where installation is happening My example:
# pntadm -A -c X4200 -e 01/01/2100 -f 00 -h gita -i 0100144F017EE8 -m gita -s
pntadm: Warning - No hosts resource value found in DHCP configuration file.
Operation succeeded, but hosts table was not updated.

# echo $?
3 (this is Non-critical error)
File /var/dhcp/ SUNWfiles1_192_168_24_0 got below line.|0100144F017EE8|00||4102473600|8320118836590280705|gita|X4200
Check how table looks with new client for specific subnet.
# pntadm -P
Client ID       Flags   Client IP       Server IP       Lease Expiration                Macro           Comment
0100144F017EE8  00  Forever                         gita            X4200
We also need macro about client to be added in dhcptab table.
# dhtadm -A -m gita -d ":BootSrvA="
-A = add macro -m = macro name, say same as hostname -d = must be between ", like "symbol=value:symbol=value:" Note: command add_install_client created boot file (pxegrub.I86PC.Solaris_10-1) I am using now. Client gets this file from TFTP server and executes by Preboot eXecution Environment (PXE). The file /var/dhcp/SUNWfiles1_dhcptab got below line:
Let's display dhcptab
# dhtadm -P
Name            Type            Value
gita            Macro   :BootSrvA=    Macro   :Subnet=
unixlab         Macro   :Include=Locale:Timeserv=xx.xx.xx.xx:LeaseTim=86400:LeaseNeg:DNSdmain="":DNSserv=xx.xx.xx.xx:
Locale          Macro   :UTCoffst=-28800:

Preboot eXecution Environment

The x86 system can boot directly from NIC using PXE. This works like: 

1. After POST (Power on Self test), PXE session starts 
2. Client (with PXE-capable NIC) sends DHCPDISCOVER request (port 67) looking for IP and other network stuff
3. Client also gets information (DHCPOFFER port 68) about TFTP server (has  Network Bootstrap Program - boot file)
4. Now client can configure its own IP and start TFTP transfer (port 69) of boot file (and store it in client's RAM)
5. Previous is possible since client got BootSrvA and BootFile info from DHCP 
6. Client executes boot file (NBP) 
7. NBP  loads the kernel into the memory  

Example  - Sun Fire X4200

Turn on X4200, press  Ctrl + N  (for network boot) and you should see below stuff (I guess you have console access) 

GNU GRUB  version 0.95  (615K lower / 4062144K upper memory)
	* Solaris_10 Jumpstart                    *
	*                                         *
      	Use the * and * keys to select which entry is highlighted.
      	Press enter to boot the selected OS, 'e' to edit the
      	commands before booting, or 'c' for a command-line.
   	The highlighted entry will be booted automatically in 24 seconds.
You are good to go now.
Back to the main page