Solaris Jumpstart Cheat Sheet



Solaris Jumpstart Cheat Sheet
For more details please refer to the sun documentation regarding on how to install, configure
and implement Solaris Jumpstart

Create the directory structure mkdir -p /export/jumpstart/Solaris_8
mkdir /export/jumpstart/Solaris_10
mkdir /export/jumpstart/config
mkdir /export/jumpstart/boot
Share out directories # edit the /etc/dfs/dfstab file
share -F nfs -o ro,anon=0 /export/jumpstart/
Create Install server # Obtain the Solaris 8 CD's
setup-install-server /export/jumpstart/Solaris_8

# Obtain the Solaris 10 CD's or DVD
setup-install-server /export/jumpstart/Solaris_10
Add additional software # Solaris normally comes on multiple CD's
add-to-install-server /export/jumpstart/Solaris_8
# Solaris normally comes on multiple CD's
add-to-install-server /export/jumpstart/Solaris_10
Copy the configuration and example scripts The samples can be find in and should be copied to /export/jumpstart/config

/Misc/jumpstart_sample
Create boot Servers # If additonal boot servers are required
setup-install-server -b /export/jumpstart/boot
Setup automatic system config create the sysidcfg information in the /export/jumpstart/config directory (can use sysidconfig from other servers)
Example sysidcfg file
---------------------------------------------------------------------------------------
timezone=GB
timeserver=localhost
network_interface=primary {netmask=255.255.240.0 protocol_ipv6=no}
terminal=vt100
security_policy=NONE
name_service=NONE
Create profiles # There are various examples on the CD's (directory)
# profile keywords profile values
# ----------------- -----------------
  install_type initial_install
  system_type standalone
  partitioning default
  filesys c0t0d0s0 4000 /
  filesys c0t0d0s1 1000 swap
  filesys c0t0d0s3 1000 /var
  cluster SUNWcuser
  cluster SUNWCacc
  package SUNWman delete
see link for more profile exmaples, you have used the SUNWcall cluster package for everything
Create Begin & Finish scripts The scripts can be shell, perl, etc
Create rules file The rules are based on keywords with values, begin script, profile, finish script
hostname vclus1   -   cluster_profile  -
Check rules file # Run the check script within the config directory, a file will be created called "rules.ok"
check
Setup clients
# add_install_client is in Solaris_10/Tools directory

./add_install_client
-e 8:0:20:7a:22:7e 

-i 192.168.0.1
-t jump1:/export/jumpstart/Solaris_10/Tools/Boot
-p jump1:/export/jumpstart/config
-c jump1:/export/jumpstart/config
-s jump1:/export/jumpstart/Solaris_10
newserver1
sun4u
-e client ethernet address
-i IP address of client
-t install boot image path
-p Profile Server:
-c Configuration Server:
-s Install Server:
you could have obmitted the -e and -i options if you add them to /etc/ethers and /etc/hosts files
Other useful options
---------------------------------------------------------------------
-d specify as a DHCP client


check boot server ## to make sure that a boot server is on the network, yo can use the command
rpcinfo -b bootparam 1
Jumpstart Process
Jumpstart Server/Client Process
  • Client sends a RARP for its IP address 
  • The Boot Server responds via RARPD (in.rarpd) with the IP address in /etc/ethers or the ethers NIS/NIS+ map depending on the ethers setting in /etc/nsswitch.conf
  • The client sends a tftp request for a bootimage
  • The server starts in.tftp from inetd and sends the small net kernel image
  • The client then starts bootparams client and requests boot info
  • The server responds with the clients entry from /etc/bootparams
  • The client NFS mount it’s root partition from the install server
  • The client then mounts the configuration server (/jumpstart) and runs “sysidtool”. 
  • It then mounts the install image and runs Suninstall to begin the install process.
Daemons used
Daemons Used mountd
nfsd
rpc.bootparamd
in.rarpd
in.tftpd
rpld (x86)

Files Used
Files Used /tftpboot
/rplboot
/etc/inetd.conf
/etc/ethers
/etc/hosts
/etc/bootparams

SVM - Fast Resync mirror volume

RAID 1 volumes (mirroring) can benefit from increased sync buffer size to 1M (2048 512 blocks). To experiment use metasync -r 2048 command. For permanent changes:
  • On the Solaris 10 systems added the following line to /etc/system. set md_mirror:md_resync_bufsz = 2048
     
  • For Solaris 9 edit the S95svm.sync file to include the "2048" buffer size.
  • Tips and Tricks:

    By default the system will not boot without one more than half the total metadb replicas. I suggest you put extra copies of the metadb on some of your non-system disks. If you only have two disks (IE: the system disks) I suggest you add this entry to your /etc/system file:
    set md:mirrored_root_flag=1
    
    This will allow you to boot with only one metadb, if one of you disk drives fails.
    Also, you might want to add:
    set md_mirror:md_resync_bufsz = 2048
    
    to /etc/system as well. This greatly speeds up resyncs of failed mirror components by using 2 meg buffers instead of the default 128k. On one of our SunFire V215 machines, this increased the resync speed from 8-9 MB/second to 36-37 MB/second.
    The default maximum number of devices is 128. IE: creating a metadevice named "d129" will fail with an error. You can increase this by changing:
    nmd=128 
    
    to
    nmd=400
    
    in /kernel/drv/md.conf. This required a "boot -r" to take effect.

Ldom Guest Domain Check to Control/Main Domain

LDOM guest domains currently have no way to gather information about their control domain.

For asset/inventory and health check tools it would be very useful if there was a Solaris tool that could be run on the guest domain to list relevant information about the control domain.

Hostname, hostid, IP addresses, serial number, mac addresses of parent would all be useful ways to tie an LDOM to its physical hardware.

The command would also be used to simply ask am I a guest LDOM,similar to clinfo Solaris command which asks am I a member of a cluster.

$ ldominfo
Host is running in guest LDOM

$ ldominfo -p
Host is running in a guest LDOM
Control hostname is: foobar
Control hostid is: 831d34656
Control mac address is: 00:14:g7:12:j8:56
..

$ ldominfo
Host is running in control LDOM

$ ldominfo
Host is not running in an LDOM

Exit status would be 0 if a host is an LDOM similar to clinfo.

Without this command administrators must grovel around in /devices,look at network interface or disk names, look for SUNWldm package, ..to try and guess if a machine is a guest or control LDOM.

Network statistics for Solaris OS

netstat displays the contents of various network-related data structures in depending on the options selected.

Syntax

netstat
multiple options can be given at one time.

Options
-a – displays the state of all sockets.
-r – shows the system routing tables
-i – gives statistics on a per-interface basis.
-m – displays information from the network memory buffers. On Solaris, this shows statistics
for STREAMS
-p [proto] – retrieves statistics for the specified protocol
-s – shows per-protocol statistics. (some implementations allow -ss to remove fileds with a value of 0 (zero) from the display.)
-D – display the status of DHCP configured interfaces.
-n do not lookup hostnames, display only IP addresses.
-d (with -i) displays dropped packets per interface.
-I [interface] retrieve information about only the specified interface.
-v be verbose

interval – number for continuous display of statictics.

Example
$netstat -rn

Routing Table: IPv4
    Destination           Gateway               Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.1.0         192.168.1.11          U        1   1444      le0
224.0.0.0           192.168.1.11          U        1   0            le0
default             192.168.1.1           UG       1   68276
127.0.0.1           127.0.0.1             UH       1   10497     lo0This shows the output on a Solaris machine who’s IP address is 192.168.1.11 with a default router at 192.168.1.1

Results and Solutions

A.) Network availability
The command as above is mostly useful in troubleshooting network accessibility issues . When outside network is not accessible from a machine check the following

1. if the default router ip address is correct
2. you can ping it from your machine.
3. If router address is incorrect it can be changed with route add command. See man route for more information.

route command examples
$route add default
$route add 192.0.2.32

If the router address is correct but still you can’t ping it there may be some network cable /hub/switch problem and you have to try and eliminate the faulty component .

B.) Network Response
$ netstat -i

Name Mtu     Net/Dest Address     Ipkts     Ierrs     Opkts Oerrs     Collis     Queue
lo0 8232     loopback localhost     77814     0     77814     0     0     0
hme0 1500     server1 server1     10658     3     48325     0     279257     0This option is used to diagnose the network problems when the connectivity is there but it is slow in response .

Values to look at:

* Collisions (Collis)
* Output packets (Opkts)
* Input errors (Ierrs)
* Input packets (Ipkts)

The above values will give information to workout

i. Network collision rate as follows :

Network collision rate = Output collision counts / Output packets

Network-wide collision rate greater than 10 percent will indicate

* Overloaded network,
* Poorly configured network,
* Hardware problems.

ii. Input packet error rate as follows :

Input Packet Error Rate = Ierrs / Ipkts.

If the input error rate is high (over 0.25 percent), the host is dropping packets. Hub/switch cables etc needs to be checked for potential problems.

C. Network socket & TCP Connection state

Netstat gives important information about network socket and tcp state . This is very useful in
finding out the open , closed and waiting network tcp connection .

Network states returned by netstat are following

CLOSED       ----  Closed.  The socket  is  not  being used.
LISTEN       ----  Listening for incoming connections.
SYN_SENT     ----  Actively trying to  establish  connection.
SYN_RECEIVED ---- Initial synchronization of the connection under way.
ESTABLISHED  ----  Connection has been established.
CLOSE_WAIT   ----  Remote shut down; waiting  for  the socket to close.
FIN_WAIT_1   ----  Socket closed; shutting  down  connection.
CLOSING      ----  Closed,
then   remote   shutdown; awaiting acknowledgement.
LAST_ACK     ----   Remote  shut  down,  then   closed ;awaiting acknowledgement.
FIN_WAIT_2   ----  Socket closed; waiting for shutdown from remote.
TIME_WAIT    ----  Wait after close for  remote  shutdown retransmission..Example

#netstat -a

Local Address     Remote Address     Swind       Send-Q     Rwind     Recv-Q     State
*.*     *.*     0     0     24576     0     IDLE
*.22     *.*     0     0     24576     0     LISTEN
*.22     *.*     0     0     24576     0     LISTEN
*.*     *.*     0     0     24576     0     IDLE
*.32771     *.*     0     0     24576     0     LISTEN
*.4045     *.*     0     0     24576     0     LISTEN
*.25     *.*     0     0     24576     0     LISTEN
*.5987     *.*     0     0     24576     0     LISTEN
*.898     *.*     0     0     24576     0     LISTEN
*.32772     *.*     0     0     24576     0     LISTEN
*.32775     *.*     0     0     24576     0     LISTEN
*.32776     *.*     0     0     24576     0     LISTEN
*.*     *.*     0     0     24576     0     IDLE
192.168.1.184.22     192.168.1.186.50457     41992     0     24616     0     ESTABLISHED
192.168.1.184.22     192.168.1.186.56806     38912     0     24616     0     ESTABLISHED
192.168.1.184.22     192.168.1.183.58672     18048     0     24616     0     ESTABLISHED if you see a lots of connections in FIN_WAIT state tcp/ip parameters have to be tuned because the
connections are not being closed and they gets accumulating . After some time system may run out of
resource . TCP parameter can be tuned to define a time out so that connections can be released and used by new connection.

Collect Sun Explorer from Network

Explorer for Sun systems and Solaris OS

The Below configuration and paths  are used to run the explorer  from single source point. I Used NFS automount for Path Availability.So solaris systems  can execute the command  to collect the Explorer. and maintain the output in one location.

Explorer version  6.5.
Installed  path =  /home/rvinayag/ 6.5ins/

Output files Path =  /home/rvinayag/6.5ins/opt/SUNWexplo/output/

Binary Path for explorer =  /home/rvinayag/6.5ins/opt/SUNWexplo/bin
Server configuration files at =  /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/

***********************************************

1, Login to any solaris system to run the explorer
Ex: Host1 is my test machine.

host1 #  cd /home/rvinayag/6.5ins/opt/SUNWexplo/bin
host1 # ./explorer -d /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/host1 -w default

WARNING: EXP_REPLY not set!

1 warnings found in /home/nynfs01/rvasag/6.5ins/etc/opt/SUNWexplo/default/host1


Sep 14 04:11:47 host1[4087] explorer: explorer ID: explorer.83868387.host1-2011.09.14.08.11

Sep 14 04:11:49 host1[4087] ilomsnapshot_start: RUNNING
Sep 14 04:11:50 host1[4087] patch: RUNNING 



Once it completed the Explorer file available in output folder as below. 

-rw-r--r--   1 admin  admin  4688789 Sep  14 06:16 explorer.83868387.host1-2011.09.14.11.11.tar.gz

#####################
2,  When you run first time explorer as below syntax, you may encounter error for default settings.

host1 abash-3.1# pwd
/home/rvinayag/6.5ins/opt/SUNWexplo/bin
host1 # ./explorer -d /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/host1 -w default


WARNING: EXP_SERIAL_8323ee7f not set!
WARNING: EXP_REPLY not set!

2 warnings found in /home/nynfs01/rvasag/6.5ins/etc/opt/SUNWexplo/default/host1

ATTENTION: Are you using Oracle Explorer Data Collector to help in the resolution
of an issue on a Sun product? In some cases, remote collaboration tools such
as Oracle Shared Shell can accelerate issue resolution.  Ask your Service
representative about Shared Shell or visit http://www.sun.com/sharedshell.
It's secure, safe, and easy to use.

### Dont run the "explorer –g" to update explorer default file. Refer Troubleshooting steps below

This error is common for running explorer for new system, follow few steps to update repository to get rid of this error


  Trouble shooting :

Sun Explorer : Follow the below instructions

host1 abash-3.1# cd /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default
host1 abash-3.1# cp explorer host1              <<<<<< copy a default file and name it as hostname for easy reference

host1 abash-3.1# hostid   
              <<<<<< get hostid to update default file
83868387

host1 abash-3.1# vi host1  
              <<<<<< now edit and modify as mentioned

Modify the lines :

# Serial number for hostid 83868387
EXP_SERIAL_83868387="host1"

######### Update the above two lines with new  host id for host1 ############

# Serial number for hostid
83868387        >>>>>>>>> this line is not mandatory, but don’t leave as it is.

EXP_SERIAL_
83868387="host1"

######### Update host id for  below lines##########

# Platform name for hostid
83868387                >>>>>>>>> this line is not mandatory, but don’t leave as it is.
EXP_PLATFORM_NAME_
83868387 =""


Save the file  and go to bin directory, and execute the explorer command again with below syntax

#explorer -d /Path_to_explorer_config_files/host1 -w  default


Now this will run without any errors.



#### In my Case ####
# explorer -d /home/rvinayag/6.5ins/etc/opt/SUNWexplo/default/host1 -w default


The Explorer will run without any errors. and collect from output directory.
###############################################################