Jumpstart makes the life of a system admin easy by automating the installation of Solaris operating system. With jumpstart you can do an unattended solaris installation with unbundled softwares.
How jumpstart works
1. When you run “boot net -v – install” command at OK prompt, the client starts looking for the jumpstart server.
2. Jumpstart server responds to the RARP (Reverse Address Resolution Protocol) request by using the rarpd daemon (in.rarpd). The jumpstarts server uses the /etc/ethers and /etc/hosts files to find the IP address of the client and communicate the hostname, IP address to the client.
3. After getting this information, jumpstart client downloads the minimal kernel(miniroot) using tftp protocol from the JumpStart server (from the /tftpboot directory), and loads it into the memory.
4. Once the client is booted from the miniroot, rules.ok file is checked to confirm that the client matches one of the rules in it.
5. Once the match is found, the start script in executed. Then the corresponding profile is installed and finally the finish script is executed.
Jumpstart files
The important jumpstart files and their purpose :
2. rules and rules.ok – defines rules to match a particular profile for the client.
3. Start and Finish scripts – script to be run before and after installation of client
4. sysidcfg – Client Configuration information such as hostname, IP address etc.. about client
5. /etc/bootparams – file used by jumpstart clients to boot. When you run the add_install_client script, this file gets updated with the client info.
6. /etc/ethers – Contains the MAC address mappings of the Jumpstart clients.
Setting up the Jumpstart server
The setup details for this post are as shown in the diagram :
Setting up the OS image directory
I will be using a Solaris 10 iso image to setup the OS image directory. First mount the Solaris 10 image and then copy the Solaris 10 OS image into the /export/install directory.
jumpstart # mkdir /export/install jumpstart # mount -F hsfs -o ro `lofiadm -a /path/to/image.iso` /mnt jumpstart # cd /mnt/Solaris_10/Tools/ jumpstart # ./setup_install_server /export/install/ 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
Creating the configuration directory
We need to create the configuration directory on the jumpstart server. This directory contains the configuration files and profiles which are used to automate the installation. We would copy the sample files from the Solaris 10 DVD into /export/config directory.
jumpstart # mkdir /export/config jumpstart # cp -r /mnt/Solaris_10/Misc/jumpstart_sample/* /export/config/ jumpstart # ls -lrt /export/config jumpstart # ls -lrt /export/config/ total 152 -r--r--r-- 1 root root 182 Jan 13 10:45 any_machine -r-xr-xr-x 1 root root 64357 Jan 13 10:45 check -r--r--r-- 1 root root 243 Jan 13 10:45 host_class -r--r--r-- 1 root root 227 Jan 13 10:45 net924_sun4c -r--r--r-- 1 root root 4884 Jan 13 10:45 rules -r--r--r-- 1 root root 24 Jan 13 10:45 upgrade -r--r--r-- 1 root root 685 Jan 13 10:45 x86-begin dr-xr-xr-x 2 root root 512 Jan 13 10:45 x86-begin.conf -r--r--r-- 1 root root 267 Jan 13 10:45 x86-class -r--r--r-- 1 root root 896 Jan 13 10:45 zfsrootsimple
Create profile for the client
– The profile file contains the information about which software cluster to install in client. It also explicitly supplies the disk partitioning parameters.
– You can also specify SVM mirrored root disk in the profile. I would be using a simple disk partition for this example.
– The OS will be installed with c0t0d0s0 slice with 1 GB swap and rest space for the root slice.
jumpstart # cd /export/config jumpstart # vi profile install_type initial_install system_type standalone partitioning explicit cluster SUNWCXall filesys c0t0d0s0 free / filesys c0t0d0s1 1024 swap
– You can also explicitly specify packages to be added or removed.
Create the sysidcfg
The sysidcfg file is used for configuring the client and contains information like IP address, hostname, time zone etc. The minimum information required for an automated install is :
Host Name IP address system locale time zone netmask IPv6 terminal type security policy name service timeserver
A common sysidcfg file would look like below :
jumpstart # vi sysidcfg system_locale=C timezone=US/Eastern timeserver=192.168.1.30 network_interface=primary {ip_address=192.168.1.20 protocol_ipv6=no netmask=255.255.255.0 default_route=NONE} terminal=xterm root_password='9RVWhgjsPHWhkY' name_service=NONE security_policy=NONE
Edit the rules file
– The rules file is used to create the rules.ok file
– It contains one or more rules, to define how clients are installed depending on their system attributes.
jumpstart # cat /export/config/rules # rules keyword & values begin script profile finish script #----------------------------------------------------------------------- any - - profile -
Check the rules file
Run the check script in the config directory to check the syntax of the rules file.
jumpstart # cd /export/config jumpstart # ./check Validating rules... Validating profile any_machine... The custom Jumpstart configuration is ok.
Check for any unwanted lines in the rules.ok file
jumpstart # cat rules.ok any - - profile -
NFS sharing the jupstart directories
Make sure you add the config and install directories to the dfstab for NFS sharing them.
jumpstart # cat /etc/dfs/dfstab share -F nfs -o ro,anon=0 /export/install share -F nfs -o ro,anon=0 /export/config
Use shareall to share the entries mentioned in the /etc/dfs/dfstab
jumpstart # shareall
Setting up the Jumpstart client
After we have done with the jumpstart server setup, we need to add the details of the client in files /etc/ethers, /etc/hosts etc..
Add the client MAC address and hostname in Jumpstart server
jumpstart # vi /etc/hosts 192.168.1.20 geeklab
jumpstart # vi /etc/ethers 0:c:29:f6:ef:7b geeklab
Adding the jumpstart client
Now we can start setting up the jumpstart client using the add_install_client script.
jumpstart # cd /export/install jumpstart # ./add_install_client -e 8:0:20:ab:cd:ef -i 192.168.1.20 -s jumpstart:/export/install -c jumpstart:/export/config -p jumpstart:/export/config geeklab sun4u
The various parameters and their meanings :
-e --> add the client system's MAC address to /etc/etheres file -i --> adds the clients info in /etc/hosts file -s --> the NFS path to OS image (/export/install on jumpstart server) -c --> the path to configuration files (/export/config on jumpstart server) -p --> the path to the profile file (/export/config on jumpstart server) geeklab --> name of the jumpstart client sun4u --> architecture type of the client system
Installing the client
Finally, we can start installing the client system. For this run the command from OK prompt :
ok> boot net -v - install