Wednesday 1 October 2008

How to jumpstart Solaris 10 (Part 2)

Adding Client
Step to adding a Client
1. Create Client profile
2. Create pre- and post-install script
3. Update /export/Config/rules
4. Run check script
5. Add ethers and hosts information
6. Run add_install_client script
7. Reboot client machine

Step 1: The Client Profile
Edit file profile1 in /export/Config
# cd /export/Config
# vi profile1
# install_type MUST be first
install_type initial_install

# start with the minimal required number of packages
cluster SUNWCXall
package SUNWaccr add

# format the entire disk for Solaris WARNING: This line for X86 only
fdisk all solaris all

#define how the disk is partitioned
partitioning explicit
filesys rootdisk.s0 free /
filesys rootdisk.s1 4096 swap

# install systems as server
system_type server

Step 2: Pre- and Post-install script (optional)
Careful! New system's disks are mounted on /a during jumpstart
begin1 script example:
# vi begin1
#!/bin/sh
echo "Begin Script for JumpStart RFATEST178..."
finish1 script example:
# vi finish1
#!/bin/sh
echo "Finish Script for JumpStart RFATEST178..."
echo "Get rid if the nfs prompt during the initial boot"
touch /a/etc/.NFS4inst_state.domain

Step 3: The rules file
Format of entries are:
[match rule] [pre-install] [profile] [post-install]

Sample file:
# vi rules
hostname RFATEST178 begin1 profile1 finish1

note : profile1 from step 1 ,begin1 and finish1 from step 2
use : hostname RFATEST178 - profile1 -,If you skip step 2

Step 4:Run check script
Run this script each time that rules file is updated.It will check the syntax of profile and verifies that script exist.After that It will create rules.ok file for jumpstart process.
# ./check

--Now you should have files in /export/Config follow this:
# ls -l
-rwxr-xr-x 1 root root 59701 Jan 8 10:16 check
-rw-r--r-- 1 root root 232 Jan 8 10:14 profile1
-rw-r--r-- 1 root root 32 Jan 8 10:15 rules
-rw-r--r-- 1 root root 57 Jan 8 10:16 rules.ok
-rw-r--r-- 1 root root 278 Jan 8 09:33 sysidcfg
Note : begin1 and finish1 is option

Step 5: Update hosts info
Update file /etc/ethers that should contain the MAC address of the client.Make sure the jumpstart server can resolve the name of the client.
# cd /etc
# vi ethers
0a:3b:ba:f5:d1:e6 [client hostname]

# vi hosts
[ip.address.for.client] [client hostname]

Step 6: add_install_client
you run the following commands from your installation image, not from the CD.
# cd /export/Install/Solaris_10/Tools
# ./add_install_client \
-e 0a:3b:ba:f5:d1:e6 \
-s :/export/Install \
-c :/export/Config \
-p :/export/Config [client hostname] sun4u

PS. -e specifies the MAC address of the client.
-s specifies the location of the server's installation files.
-c specifies the Solaris JumpStart configuration location.
-p specifies the sysidcfg file's location.
sun4u specifies the architecture of the client.

Step 7:Reboot Client
Boot up the client and have it find the server.
On the client, be at the OpenBoot OK prompt and run the following command:
ok> boot net - install
or
# reboot -- 'net - install'
the client connected to server, downloaded the OS, and commenced installing it.

NOTE : Ensure that nsswitch.conf which hosts ,ether and bootparams has 'files' is the first parameter.

reference : http://www.sun.com/bigadmin/content/submitted/jumpstart_zfs.jsp