Upload
scott-mcdermott
View
277
Download
0
Embed Size (px)
DESCRIPTION
These are the slides from a presentation I gave in 1999 at the Seattle Area System Administrators Guild monthly meeting. I haven't done this in a while, so I can't say how much of this is no longer valid, but it may prove useful to someone as a reference.
Citation preview
Introduction to Solaris Introduction to Solaris JumpStartJumpStart
By Scott [email protected]
http://www.octaldream.com/scottm/talks/jsintro
What is JumpStart?What is JumpStart?JumpStart is the installation facility for Solaris 2
Allows unattended installation based on the application of various rules and scripts.
What can JumpStart do for me?Simplify InstallsFaster than CD installationAllows unattended installationSimilar machines need only one configuration rule
Network Boot ProcessNetwork Boot ProcessBoot client from the network
go> boot net - installNew machines will net boot at power on
Client & Boot Server InteractionClient & Boot Server InteractionClient performs RARP request
Server in.rarpd responds with client's IP addressIP is determined via /etc/ethers and /etc/hosts
Client uses TFTP to download a client stubClient requests boot parametersThe server's rpc.bootparamd responds
Uses /etc/bootparamsBoot parameters consist of NFS mount pointsClient mounts filesystem, boots, runs install scripts
Configuring a JumpStart ServerConfiguring a JumpStart ServerFrom the Solaris media in Solaris_2.6/Tools
./setup_install_server <install hierarchy>Use the -b switch to do installs from the CDExport the installation hierarchy via NFS
From the Solaris media in Solaris_2.6/Misc/jumpstart_sample
Copy files to your configurarion hierarchyie. cp -r * /export/install/js
Adding a JumpStart ClientAdding a JumpStart ClientAdd clients using the add_install_client script
./add_install_client -e 08:00:20:23:74:95 \-i 192.168.0.1 -s install:/export/install/Solaris \-c install:/export/install/js \-p install:/export/install/js foobar sun4u-e MAC address-i IP Address-s Server & path for Solaris media-c Server & path for configuration files-p Server & path to the sysidcfg fileHost must be in /etc/hosts
The sysidcfg FileThe sysidcfg FileProvides automatic system identification
Name serverNetwork interfaceHostname root passwordLanguage (locale)Terminal typeTimezoneTimeserver (not NTP!)
Syntax of the sysidcfg FileSyntax of the sysidcfg FileKeywordname_service
network_interface
system_locale
install_locale
timezone
timeserver
Valid Argumentsnis, nis+, other, NONE {domain_name=<domain> name_server=<name server IP>}
none, default(2.6), primary(2.7)
Standard locale names
Standard local names
Standard timezones
<timeserver hostname or IP>
Example sysidcfg FileExample sysidcfg File system_local=en_US install_locale=en_US timezone=US/Pacific network_interface=default{netmask=255.255.255.0} name_service=NONE timeserver=localhost
The rules FileThe rules FileSelects machines based on a variety of criteria
ArchitectureNIS domain nameDisk sizeHostnameInstalled version of SolarisKernel architecture
Memory sizeHardware modelNetworkTotal disk spaceLogical AND/NOT of any criteria
rules File Syntaxrules File Syntax <rule> <begin sh script> <profile> <finish sh script>
Example:any - defprofile -Matches from the top of the rules file down
Takes first matchSeperated by whitespaceFor no script use '-'A profile of '=' uses ${SI_PROFILE}
Begin script can generate the profile and save it in ${SI_PROFILE}
Some Rule Matching ExamplesSome Rule Matching Examples any
Matches any machine hostname foobar
Matches the host 'foobar' network 192.168.0.0 && karch sun4c
Matches any sun4c on the 192.168.0.0 network arch sparc && disksize c0t3d0 400-600 && installed c0t0d0s0 solaris_2.1 && !modal SUNW,SPARCclassicMatches any sparc with a 400-600MB disk that has Solaris
2.1 installed and isn't a SPARCclassic
Server & Install Profile Server & Install Profile KeywordsKeywordsKeywordinstall_type
system_type
num_clients
client_swap
client_arch
Valid Argumentsinitial_install, upgrade
standalone, dataless, server
<# of clients> (5)
<Swap size> (24)
sun4c, sun4d, sun4m, sun4u, sun4u1, tadpole4m (2.6 only), sun4us (64-bit Solaris 7 only)
Disk Profile KeywordsDisk Profile KeywordsKeywordpartitioning
usedisk
dontuse
filesys
device
size
fs
opt params
Valid Argumentsdefault, existing, explicit
<disk device>
<disk device>
<device> <size> <fs> <opt params>
any, cntndnsn, rootdisk.sn, server:path
size, existing, auto, all, free, start:size, ip_address, - (dataless,NFS)
mount_point, swap (optional)
preserve, nosuid, quota, etc...
Package Profile KeywordsPackage Profile KeywordsKeywordcluster
package
Valid Argumentscluster add, delete
package add, delete
Example:cluster SUNWCreq addpackage SUNWsregu delete
List of clusters and packages located on the Solaris media in Solaris_2.x/Product/ .clustertoc .packagetoc
Main Cluster GroupsMain Cluster GroupsSUNWCreq
Bare minimumSUNWCuser
Typical user, OpenWindowsSUNWCprog
Programming toolsSUNWCall
All Sun Microsystems packagesSUNWCXall
OEM packages
Sample Host ProfileSample Host Profile install_type initial_install system_type standalone partitioning explicit filesys rootdisk.s0 100 / filesys rootdisk.s1 512 swap filesys rootdisk.s3 2000 /ftp filesys rootdisk.s4 1000 /opt filesys rootdisk.s5 1000 /var filesys rootdisk.s6 700 /usr filesys rootdisk.s7 free /staff cluster SUNWCprog add # Developer base package SUNWxwdxm add # DPS Motif libraries cluster SUNWCkcms delete # Color management bloat package SUNWsregu delete # User registration annoyance cluster SUNWCsea delete # Evil SNMP stuff package SUNWsutl add # Static utils cluster SUNWCacc add # Accounting package SUNWsadml add # Required by Solastice Disk Suite cluster SUNWCjv delete # We don't need no steenking Java cluster SUNWCnis delete # We don't run NIS cluster SUNWCpcmc delete # We have no PCMCIA ports
rules File Examplerules File Example hostname foobar - prof/foobar set_root_pw any - prof/any -
To install the rules file./check
Creates rules.ok Finds syntax errorsEnsures referenced files exist
If this is successful, try an install
Begin & Finish ScriptsBegin & Finish ScriptsEnvironment variables of note
${SI_CONFIG_DIR}Points to the directory with your config files
${SI_PROFILE}The profile that's being used to configure this machineGood for advanced begin scriptThe default is /tmp/install.input
Subject to change without noticeThe root directory for the machine being installed is
mounted on /a.
Sample Begin ScriptSample Begin Script #!/bin/sh echo "install_type initial_install" > ${SI_PROFILE} echo "system_type standalone" >> ${SI_PROFILE} echo "partitioning default" >> ${SI_PROFILE} echo "cluster SUNWCprog add" >> ${SI_PROFILE} echo "package SUNWman delete" >> ${SI_PROFILE} echo "package SUNWolman delete" >> ${SI_PROFILE} echo "package SUNWxwman delete" >> ${SI_PROFILE}
Sample Finish ScriptSample Finish Script #!/bin/sh BASE=/a MNT=/a/mnt ADMIN_FILE=/a/tmp/admin
mkdir ${MNT} mount -f nfs sherlock:/export/package ${MNT} cat >${ADMIN_FILE} <<DONT_ASK mail=root instance=overwrite partial=nocheck runlevel=nocheck idepend=nocheck rdepend=nocheck space=ask setuid=nocheck conflict=nocheck action=nocheck basedir=default DONT_ASK
/usr/sbin/pkgadd -a ${ADMIN_FILE} -d ${MNT} -R ${BASE} SUNWxyz umount ${MNT} rmdir ${MNT}
DocumentationDocumentationMan pages
sysidcfg(4)sysidtool(1M)install_scripts(1M)bootparams(4)
Solaris Advanced Installation Guide at docs.sun.com in the Solaris 2.6 System Administration Collection I and the Solaris 7 Installation Collection
Automating Solaris Installations: A Custom Jumpstart Guide by Paul Anthony Kasper and Alan L. McClellan, published by Prentice Hall