To set up a Jump Start server using the Solaris 10 OS, you must have access to both slice 0 and slice 1 on the CDs. If you use a physical CD, no problem occurs -- vold will automatically mount both of the required slices, or if you are not using vold, you can mount the slices manually.
However, problems can result if you try to use an ISO image that is mounted using the "lofi" driver because lofi is not VTOC aware, which means that lofi cannot recognize that slice 1 exists and, therefore, cannot access it. An error message similar to the following will probably appear:
# ./setup_install_server dest_dir
ERROR: Install boot image /cd/s0/Solaris_10/Tools/Boot does not exist
Check that boot image exists, or use [-t] to specify a valid boot image elsewhere.
To fix the problem, split the contents of slice 1 into its own image file and then mount this image separately using lofi. The following procedure describes how to do this.
Resolution:
It is presumed that the ISO images for Solaris OS have already been downloaded and unzipped. Two files which are similar to the following should be present:
# ls -l sol-10*
-rw-r--r-- 1 root root 576364544 Jan 1 11:16 sol-10-u1-sparc-v1.iso
-rw-r--r-- 1 root root 291962880 Jan 1 21:42 sol-10-u1-sparc-v2.iso
(The exact names and sizes will vary, depending on what version of the Solaris 10 OS they are.)
Of sole interest is the first image, "CD 1 of 2". The others ("CD 2 of 2" or the "Languages CD") do not require that multiple slices need to be mounted and do not require special consideration.
Step 1:
Get a copy of the VTOC (Virtual Table of Contents) from the ISO image:
# dd if=sol-10-u1-sparc-v1.iso of=vtoc bs=512 count=1
1+0 records in
1+0 records out
Step 2:
Now that the VTOC is present, find out where Slice 1 starts in the image and how long it is. The starting cylinder for slice 1 is located at offset 452 (decimal) into the VTOC; the length in blocks is at offset 456, with both being 4 bytes long. This can be determined by using the following:
# od -D -j 452 -N 8 < vtoc
0000000 0000000888 0000546560
0000010
Slice 1 starts on cylinder 888 , and is 546,560 blocks long. The CDs for the Solaris OS always have a fixed 640 blocks per cylinder, which means that one can calculate the starting block of slice 1 using the following:
# echo 888*640 | bc
568320
Slice one starts at block 568320 and is 546560 blocks long.
Step 3:
Copy slice one into a separate file:
# dd if=sol-10-u1-sparc-v1.iso of=sol-10-u1-sparc-v1-s1.iso bs=512 skip=568320 count=546560
546560+0 records in
546560+0 records out
Step 4:
Mount both slice 0 (that is, the original ISO) and slice 1. The setup_install_server script expects to find these two mounted beside each other, with slice 1 in a directory called "s1" (as vold does it), although you can mount the slices wherever they are needed using the "-t" option to setup_install_server.
# mkdir /cd
# mkdir /cd/s0
# mkdir /cd/s1
# lofiadm -a /path_to/sol-10-u1-sparc-v1.iso
/dev/lofi/1
# lofiadm -a /path_to/sol-10-u1-sparc-v1-s1.iso
/dev/lofi/2
When you mount slice 1, remember that it is a UFS partition, not HSFS as you would normally expect on a CD-ROM:
# mount -F hsfs -o ro /dev/lofi/1 /cd/s0
# mount -F ufs -o ro /dev/lofi/2 /cd/s1
# cd /cd/s0/Solaris_10/Tools/
# ./setup_install_server /destination_dir
If the error "ERROR: Copy of CD image failed," appears, check your messages file for an entry such as "NOTICE: hsfs: hsnode table full, 356 nodes allocated," and then apply patch 109764.
Step 5:
The second ISO image (sol-10-u1-sparc-v2.iso) is equivalent to Software CD 2 of 2 and also needs to be mounted as a lofi device in order to run add_to_install_server:
# lofiadm -a /path_to/sol-10-u1-sparc-v2.iso
/dev/lofi/3
# mount -F hsfs -o ro /dev/lofi/3 /mnt
# cd /mnt/Solaris_10/Tools
# ls
Installers add_to_install_server
# ./add_to_install_server /destination_dir
Thursday, June 2, 2011
Wednesday, May 20, 2009
Solaris Jumpstart Automated Installation
Abstract
What is Jump start?
The Jump start feature is an automatic installation process available in the Solaris operating environment. It allows system administrators to categorize machines on their network and automatically install systems based on the category to which a system belongs.
Reasons to Automate:
This is an introduction to custom automated installation in a Solaris environment. It is an overview of the necessary systems, services, and configurations needed for easy client integration into existing corporate environments.
What is Jump start?
The Jump start feature is an automatic installation process available in the Solaris operating environment. It allows system administrators to categorize machines on their network and automatically install systems based on the category to which a system belongs.
Reasons to Automate:
- Simplifies installations
- Speed - Faster then CD-ROM installation
- Allows unattended installation
- Replication - same systems across the enterprise
All Solaris base installations require some basic configuration. With Jumpstart, Sun has enabled the system administrator to avoid repetitive tasks associated with bringing a sun system online.
Prerequisites:
- A boot server on the same ethernet segment
- An install server with the Solaris OS
- A Jumpstart configuration server that defines rules and profiles.
- Client sends a RARP for its IP
- 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.
- The client sends a tftp request for a
- The server starts in.tftp from inetd and sends the small net kernel
- The client then sends out a bootp request
- The server responds with the clients entry from /etc/
- The client NFS mount it’s root partition from the install
- 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.
Boot Server:
The boot server is composed of rarpd (in.rarpd), bootp (in.bootparamd), and tftp (in.tftpd) servers for solaris systems and rplboot for x86 architecture. The Boot server must be on the client’s local network due to the fact that rarp packets will not be forwarded across a router.
Server Files:
Install Server:
Configuration Server:
The configuration Sever is comprised of the rules file, profiles, and sysidcfg. It allows the administrator to have available different custom jumpstart configurations based on rule sets. This is very helpful when different groups within an organization require different system configurations.
Rules File:
The rules file is a text file used to create the rules.ok file. The rules file is a look-up table consisting of one or more rules that define matches between system attributes and profiles. For example, the rule
"karch sun4c - basic_prof – " matches a system with a sun4c platform name to the basic_prof profile, which the Solaris installation program would use to install the system.
During a custom Jumpstart installation, the Solaris installation program attempts to match the rules in the rules.ok file in order: first rule through the last rule. A rule match occurs when the system being installed matches any of the values in the rule. As soon as a system matches a rule, the Solaris installation program stops reading the rules.ok file and begins to install the system as defined by the matched rule's profile. This allows a fine grain control over different configuration clusters
Validating the rules file:
Before the profile server is able to function the jumpstart share must have a rules.ok file. The check script validates the rules file and creates the rules.ok file.
Sysidtool Suite:
When you boot Solaris, a set of programs called sysidtool configures your system, prompting for information needed such as the client’s host name and IP address, the local date and time, the time zone and the netmask. NIS or NIS+ can provide this information, otherwise you have to enter it manually before JumpStart can install the OS and packages. It is also possible to create a sysidcfg file, which must be on either local media or a nfs exported filesystem.
The sysidcfg file is a file where, starting with Solaris 2.6, all the configuration information required during an OS installation can be specified. A change needed to be made to the sysidcfg provided as part of the Jumpstart package in order for the process to work on your local network.
Default values needed:
Begin/Finish Scripts:
A begin/finish script is a user-defined Bourne shell script, specified within the rules file, which performs tasks after the Solaris software is installed on the system.
Begin/Finish details:
Configuration Steps:
Server
Server Files:
- /etc/ethers = Entry for install clients ethernet address
- /etc/bootparams = Contains NFS share parameters for installation & configuration
- /tftpboot = Houses the small net kernel used for bootstrapping
- /rpldboot = Used in x86 installs (tftp equivalent)
Install Server:
The install server supplies the client with the Solaris OS. It is an NFS share with the Solaris install image. Any OS able to export NFS shares is able to serve as a Jumpstart Install Server.
Configuration Server:
The configuration Sever is comprised of the rules file, profiles, and sysidcfg. It allows the administrator to have available different custom jumpstart configurations based on rule sets. This is very helpful when different groups within an organization require different system configurations.
Rules File:
The rules file is a text file used to create the rules.ok file. The rules file is a look-up table consisting of one or more rules that define matches between system attributes and profiles. For example, the rule
"karch sun4c - basic_prof – " matches a system with a sun4c platform name to the basic_prof profile, which the Solaris installation program would use to install the system.
During a custom Jumpstart installation, the Solaris installation program attempts to match the rules in the rules.ok file in order: first rule through the last rule. A rule match occurs when the system being installed matches any of the values in the rule. As soon as a system matches a rule, the Solaris installation program stops reading the rules.ok file and begins to install the system as defined by the matched rule's profile. This allows a fine grain control over different configuration clusters
Validating the rules file:
Before the profile server is able to function the jumpstart share must have a rules.ok file. The check script validates the rules file and creates the rules.ok file.
Sysidtool Suite:
When you boot Solaris, a set of programs called sysidtool configures your system, prompting for information needed such as the client’s host name and IP address, the local date and time, the time zone and the netmask. NIS or NIS+ can provide this information, otherwise you have to enter it manually before JumpStart can install the OS and packages. It is also possible to create a sysidcfg file, which must be on either local media or a nfs exported filesystem.
The sysidcfg file is a file where, starting with Solaris 2.6, all the configuration information required during an OS installation can be specified. A change needed to be made to the sysidcfg provided as part of the Jumpstart package in order for the process to work on your local network.
Default values needed:
- date & time
- time zone
- site netmask
- language options
Begin/Finish Scripts:
A begin/finish script is a user-defined Bourne shell script, specified within the rules file, which performs tasks after the Solaris software is installed on the system.
Begin/Finish details:
The Solaris installation program mounts the system's file systems onto /a. The file systems remain mounted on /a until the system reboots. Therefore, you can use the finish script to add, change, or remove files from the newly installed file system hierarchy by modifying the file systems respective to /a. Output from the finish script goes to /var/sadm/finish.log.Finish scripts should be owned by root and have permissions equal to 644.
Configuration Steps:
Server
- Create install server(s).
- Create a profile server
- Create profiles
- Create begin and finish scripts
- Create and check rules file
- Add Client(s)
- Boot Client(s)
- The first step copies the Solaris CD to the disk. You will need around 450Mb of free space in this directory.
# cd /cdrom/cdrom0/s0/Solaris_10/Tools
# ./setup_install_server /export/Solaris_10
Verifying target directory...
Calculating the required disk space for the Solaris_10 product
Copying the CD image to disk...
Install Server setup complete
#
Note: for Solaris 8 if you would like to include CD 2 (Supplemental), insert CD 2 and run
# cd /cdrom/cdrom0/s0/Solaris_8/Tools
#./add_to_install_server /export/Solaris_2.6
- Creating a Profile server
#cp -r /cdrom/cdrom0/s2/Solaris_10/Misc/jumpstart_sample/* /jumpstart
#share -F nfs -o ro,anon=0 /jumpstart
#shareall
- Create profiles (Reference Profiles)
- Copy profile into /jumpstart directory
- Create begin and finish scripts (Reference begin/finish scripts) into /jumpstart directory
- Create and check rules file (Reference Rules)
#cd /jumpstart
#./check
# cd /jumpstart
# ./check
Validating rules...
Validating profile any_machine...
The custom JumpStart configuration is ok.
# cat rules.ok
any - - any_machine -
- Adding the Install Client
#vi /etc/hosts
127.0.0.1 localhost
127.0.0.2 129.151.29.1 boot_svr loghost
127.0.0.3 129.151.29.10 client_name
- Add the client information to the server
# cd /jumpstart/Solaris_10/ToolsClient Setup:
# ./add_install_client \
-e 8:0:20:7a:22:7e \
-t /jumpstart/Solaris_10/Tools/Boot \
-p server.rainmonkey.org:/jumpstart \
-c server.rainmonkey.org:/jumpstart \
-s server.rainmonkey.org:/export/Solaris_10 \
client.rainmonkey.org \
sun4u
Note: There must be an entry in the /etc/hosts for client.rainmonkey.org and server.rainmonkey.
- Booting the Jumpstart Client
At the OpenBoot prompt enter
#reboot "net - install"
Subscribe to:
Posts (Atom)