Friday, August 24, 2012

Custom JumpStart rules & profiles

Assume that the setup is according to Custom JumpStart framework installation.
Another important part of Custom JumpStart is the install rules and profiles files.
The rules selects which clients qualify and which profiles are used in each case.

All of the following is done in the /jumpstart directory:

# cd /jumpstart 

The syntax of the rules files is reasonably flexible to get the job done.
As an example, let's show one that distinguishes between X86 and SPARC clients.
 
# cat rules

# keyword & value                     begin profile       finish
# ----------------------------------- ----- ------------- ------
  karch i86pc && memsize 1024-8192    -     profile_x86_s -
  karch i86pc && memsize 8193-65536   -     profile_x86_m -
  karch i86pc && memsize 65537-524288 -     profile_x86_l -
  karch sparc                         -     profile_sparc -
    
Edit each referenced profile accordingly.
Assume 192.168.0.12 as the IP address of the X86 Custom JumpStart server.
The difference between X86 and SPARC profiles are patch numbers and server IP.
I also assume at least an available pair of disks equal or close in size.
Instead of letting the installer compute the swap size (auto) I've chosen to have 4g.
   
# cat profile_x86_s
#
# keyword          value
# ---------------  ----------------------
  install_type     initial_install
  system_type      server
  cluster          SUNWCXall

  pool             rpool auto 4g auto mirror any any
  bootenv          installbe bename JumpStart dataset /var

  locale           en_US.UTF-8
  geo              N_America

  package          SFWncur        add nfs 192.168.0.12:/package
  package          SFWvim         add nfs 192.168.0.12:/package
  package          SFWscrn        add nfs 192.168.0.12:/package
  package          AZ-first-boot  add nfs 192.168.0.12:/package

  patch            121119-20          nfs 192.168.0.12:/patch
  patch            121431-84          nfs 192.168.0.12:/patch
  patch            123896-50          nfs 192.168.0.12:/patch
  patch            119789-11          nfs 192.168.0.12:/patch 

      
Finally, verify if everything is OK, generating the rules.ok file.
 
# cp -p  /install/Solaris_10/Misc/jumpstart_sample/check .
# ./check
Validating rules...
Validating profile profile_x86_s...
Validating profile profile_x86_m...
Validating profile profile_x86_l... 
Validating profile profile_sparc...
The custom JumpStart configuration is ok.
 
# ll rules*
...