没见什么DX们出来很久了,想来都是忙的很。菜鸟我就不客气发发经验帖啦,还望各位DX出来的时候指正一二,多谢。
具体还请参照Sun Solaris Advance Installation Guide,也希望对你们有帮助,在jumpstart安装时多一个范例参照。感谢同事Peggylam巨大的帮助。
A Simple JumpStart Installation Guide
– Solaris 8
Author: Peggylam Illusion
1) Aims and Limitation of this document:
I) Create a server to remotely install Solaris 8 and avoid being prompted for information every time install Solaris
II) Use server and the server that need install is on the same subnet
III) Use sysidcfg file instead of name service to pre-configuring system information
IV) We only put one Solaris 8 cd images on install server
V) Only for initial installation
VI) For detailed info, please refer to “Advanced Installation Guide”
VII) Only used CD: Solaris 8 software 1 of 2, Solaris 8 software 2 of 2
2) Example information
Below is the information that I will use as an example for the following sections:
I) Install and profile server
i) hostname : test01
ii) ip address : 192.168.8.16
iii) software image directory : /opt/Solaris_8
iv) jumpstart profile file directory : /opt/jumpstart
v) name server : not using
II) client that need to install Solaris 8
i) hostname : test
ii) ip address : 192.168.8.76
iii) hardware address : 8:0:20:21:8c:4f
iv) Platform Group : sun4m
v) Disk : c0t0d0 2.1G, c0t1d0 2.1G
III) Installation option
i) Set root password
ii) Disable power management
iii) Disable console login
3) Steps Overview:
- create a install server
- create a boot server
- create a profile server
- create a rule file
- create a profile
- create the begin and end scripts
- pre-configure system configuration information
- setup systems to be installed over the network
- begin client installation
- check log and confirm
4) Create a server to perform jumpstart installation
I) Create an install server
i) A install server is a system that provides Solaris 8 cd images from which you can install Solaris 8 on another system on the network. It also enable a single install server to provide Solaris 8 cd images for multiple release.
ii) Details of the network install command definition is on P.214
iii) Steps to create an install server
a) Make a directory to put the cd image, needs at 800MB.
b) Copy image Solaris 8 cd software 1 of 2 to install server by using setup_install_server command
¨ Command: ./setup_install_server install-path
¨ Eg. Cd /cdrom/sol_8_1000_sparc/s0/Solaris_8/Tools
¨ /setup_install_server /opt/Solaris_8
¨ it needs 539587 K space
c) Copy cd Software 2 of 2 to install path
¨ Command: ./add_to_install_server installpath
¨ Eg. Cd /cdrom/sol_8_1000_sparc_2/s0/Solaris_8/Tools
Steps d) to f) is optional
d) If you want to install the Language cd, also use add_to_install_server command
e) If you want to use solaris web start to install server , then
¨ Insert cd Solaris 8 installation English / Solaris 8 installation multilingual sparc platform edition
¨ Cd /cdrom/en_icd_sol_8_sparc/s0
¨ Modify_install_server install_dir_path installer_miniroot_path (cdrom path)
¨ Eg. Modify_install_server /opt/Solaris_8 /cdrom/en_icd_sol_8_sparc/s0
f) If you want to add patches to the files located in the miniroot
¨ Solaris_8/Tools/boot on the images
¨ Patchadd –C net_install_image
5) Create a boot server -- optional
a) Boot server is need when the install server is on another subnet from the install client
b) Details please read Advanced installation guide p. 219 to 222
c) Command ./setup_install_server –b boot_dir_path
6) Create a Profile server
a) Advanced installation guide p.132 to p.136
b) Steps:
i. Create a jumpstart directory
¨ Mkdir –m 755 /opt/jumpstart
ii. Edit /etc/dfs/dfstab
¨ Share –F nfs –o ro,anon=0 /opt/jumpstart
iii. Share the jumpstart dir out
◆ Shareall
◆ dfshares Install_server
iv. Copy the examples of custom jumpstart files from cd to jumpstart dir, those examples were useful
¨ Solaris 8 software 1 of 2 cd
¨ Cp –r /cdrom/cdrom0/s0/Solaris_8/Misc/jumpstart_sample/* /opt/jumpstart
v. Allow all system access the profile server
1. Option one : use wildcard in /etc/bootparms, make sure this file is not using NIS and NIS+ database (see p.135 for name server)
¨ Add following entry in /etc/bootparams
¨ * install_config=server:jumpstart_dir_path
¨ server means profile server
¨ * means all system can access
¨ Eg. * install_config=test01:/opt/jumpstart
2. Option two : everytime when you add a system for network installation
¨ Command : use option –c with add_install_client command
It will update some contents of /etc/bootparms also.
vi. Beside the profile server, it can create a profile diskette if it is not connected to the network, but we will not mention in this doc
7) Create a rules file
a) It is a text file that contains a rule for each group of system and it links each group to a profile and the profile will defines how the Solaris software is to be installed on each system on the group.
For details , please read Advanced installation guide P.141
b) Create a rules file
i. Create a file name “rules” on jumpstart directory
ii. Set the permission to 644 and own by root
iii. Syntax : [!] rule_keyword rule_value [&& [!] rule_keyword rule_value] .. begin profile finish
iv. Rules keyword details on P.148
v. Example rules :
¨ Arch sparc – sparc sparc_finish_script
¨ any - - ufamsdm_pro ufamsdm_finish_script
¨ #rule keywords and rule valuess begin script profile finish script
#------------------------------ ------------ ------- -------------
disksize c0t1d0 3500-4500 - test_pro_4G -
c) Verify the rules files:
i. Run the check script on the jumpstart directory to vertify if the set up is correct, if it is correct a rules.ok file will create
ii. Syntax : ./check [-path] [-r file_name]
Create a profile
a) It is a text file that defines how to install the solaris software on a system
b) Syntax details is on Advanced installation guide P.150
c) Steps to create a profile
i. Create a text file, same profile name specify in rules file
ii. Permission 644 root
d) i) Example profile file 1:
install_type initial_install
system_type server
cluster SUNWCXall
#num_clients 5(default 5)
client_root 100(default 15)
client_swap 200(default 32)
filesys c0t0d0s0 100 /
filesys c0t0d0s1 200 swap
filesys c0t0d0s3 auto /var
filesys c0t0d0s4 auto /opt
filesys c0t1d0s0 auto /usr
The file sytem that create by the above profile are as followings :
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 96031 21045 65383 25% /
/dev/dsk/c0t1d0s0 803294 597828 149236 81% /usr
/proc 0 0 0 0% /proc
fd 0 0 0 0% /dev/fd
mnttab 0 0 0 0% /etc/mnttab
/dev/dsk/c0t0d0s3 29719 6150 20598 23% /var
swap 273560 0 273560 0% /var/run
/dev/dsk/c0t0d0s5 645527 11 587419 1% /export
swap 274484 924 273560 1% /tmp
/dev/dsk/c0t0d0s4 24399 1993 19967 10% /opt
/dev/dsk/c0t0d0s7 961822 9 904104 1% /export/home
/dev/dsk/c0t1d0s4 1183711 9 1124517 1% /export/swap
ii) Example profile file 2:
install_type initial_install
system_type standalone
usedisk c0t1d0
boot_device c0t1d0s0 update
root_device c0t1d0s0
partitioning explicit
filesys c0t1d0s0 512 /
filesys c0t1d0s1 512 swap
filesys c0t1d0s3 1500 /usr
filesys c0t1d0s4 1000 /var
filesys c0t1d0s5 auto /opt
e) If use Software group Entire Distribution Plus OEM support (SUNWCXall) and server type , it will also create /export, /export/home(for client /) and /export/swap(for client swap) directory for client using.
f) Verify a profile
i. Command : pfinstall
ii. If you want to text Solaris 8 initial installation profile, you have to run pfinstall on system running solaris 8.
iii. Syntax : /usr/sbin/install.d/pfinstall disk_configuration [-c path] profile
iv. Steps :
1. Cd /opt/jumpstart
2. Put software 1 of 2 in cdrom drive
3. /usr/sbin/install.d/pfinstall –D –c /cdrom/sol_8_1000_sparc/s0 sparc
9) Begin and End Scripts -- optional P. 183
Out put of these scripts goes to /var/adm/begin.log and finish.log.
These should be owned by the root with permission 644
a) Begin script
i. It is a user defined Bourne shell script , specified within the rules file, that performs tasks before the Solaris software is installed on a system, or can be used for creating dynamic derived profiles or backing up files before upgrading.
ii. Possible uses
1. Creating derived profiles
2. Backup files before upgrading
b) End script
Performs tasks after Solaris software is installed on a system but before the system boots. These can be used to customize root environment , adding patches , files etc.
i. These scripts can not be checked by the check script so it must be accurate.
ii. Possible use
1. Adding files
2. Adding individual packages or patches
3. Customizing the root environment(enable telnet)
4. Setting/Changing the system’s root password
iii. The Solaris 8 interactive installation programs mounts the system’s file sytems onto /a, the file systems remain mounted on /a until the system boots. Therefore, you can use the finish script to add , change or remove files to /a.
iv. Output of the finish script is on /var/sadm/finish.log , pemission 644.
v. Put it on the jumpstart directory
vi. Example : The part of the change password is copy form jumpstart example set_root_pw
1. If want to disable the power management, touch a file in /a/noautoshutdown
-------------------------------------------------------------------------------------------------------------------------
#!/bin/sh
#
# @(#)set_root_pw 1.6 97/02/26 SMI
#
# This is an example bourne shell script to be run after installation.
# It sets the system's root password to the entry defined in PASSWD.
# The encrypted password is obtained from an existing root password entry.
# It should be as same as the entries in /etc/shadow from a installed machine.
# For example,
# If bigmac’s root password is “Hpthiaob”, its encrypted password in /etc/shadow is
# “IC8oJY378DobY”.
# Set “PASSWD= IC8oJY378DobY”
# Then the client’s root password should be as same as bigmac, “Hpthiaob”.
echo "setting password for root"
# set the root password
PASSWD=yC81aB/fPGM5E
# create a temporary input file
cp /a/etc/shadow /a/etc/shadow.orig
nawk -F: '{
if ( $1 == "root" 
printf"%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1,passwd,$3,$4,$5,$6,$7,$8,$9
else
printf"%s:%s:%s:%s:%s:%s:%s:%s:%s\n",$1,$2,$3,$4,$5,$6,$7,$8,$9
}' passwd="$PASSWD" /a/etc/shadow.orig > /a/etc/shadow
# reset the permissions on the new /etc/shadow file to whatever is was
# set to during the install
perm=`grep '^/etc/shadow e' /a/var/sadm/install/contents | (read f1 f2 f3 f4 f5 ; echo $f4)`
chmod $perm /a/etc/shadow
# remove the temporary file
rm -f /a/etc/shadow.orig
# set the flag so sysidroot won't prompt for the root password
sed -e 's/0 # root/1 # root/' ${SI_SYS_STATE} > /tmp/state.$$
mv /tmp/state.$$ ${SI_SYS_STATE}
echo "power management information"
touch /a/noautoshutdown
# Enable root telnet
echo "edit /etc/default/login"
mv /a/etc/default/login /a/etc/default/login.org
sed "s/^CONSOLE/#CONSOLE/g" /a/etc/default/login.org > /a/etc/default/login
10) Preconfiguring system configuration information – sysincfg file
a) For details check Advanced installation guide chapter 4
b) There are two ways :
i. Sysincfg file
ii. Name server
c) You can create several sysincfg file but need to put them in different directory
d) Keyword of the sysincfg file P.43
e) How to specify sysidcfg file, use –p when run add_install_client command
f) Example sysidcfg file 1:
system_locale=en_US
timezone=Hongkong
timeserver=192.168.8.16
name_service=NONE
network_interface=primary {hostname=test ip_address=192.168.8.76 netmask=255.255.255.0 protocol_ipv6=no}
security_policy=NONE
Example sysidcfg file 2:
system_locale=en_US
timezone=MET
timeserver=192.168.101.254
name_service=NONE
network_interface=primary {hostname=ufamsdm ip_address=192.168.101.252 netmask=255.255.255.0 protocol_ipv6=no}
security_policy=NONE
rootpassword=HPthiaob
11) Setting up systems to be installed over the network
a) Details are on Advanced installation guide p.233
b) Things need to know :
i. Install server name and directory
ii. Jumpstart directory
iii. Ethernet address of the client
c) Things need to set before add the client
i. Edit /etc/hosts file to add the client name and ip address
ii. Edit /etc/ethers file to add client Ethernet address and client name
8:0:20:21:8c:4f test
d) Command : ./add_install_client [-d] [-c server:jumpstart_dir_path] [-s install_server:install_dir_path] [-p server:path] hostname platform_group
i. –d specify the client use DHCP
ii. –c server that have jumpstart directory for custom jumpstart installation
iii. –s specify the install server (software path)
iv. –p sysidcfg file for preconfiguring system sysidcfg locate path
v. platform group can find in Appendix A
e) Steps to add the client
i. Cd Tools directory in cdrom or software image directory
Eg. Cd /opt/Solaris_8/Solaris_8/Tools
ii. ./add_install_client –c test01:/opt/jumpstart –s test01:/opt/Solaris_8 –p test01:/opt/jumpstart test sun4m
12) Client side
a) In ok prompt : boot net – install
13) Log file location
a) Before boot : /a/var/sdm/system/logs/install_log
b) After boot : /var/sdm/system/logs/install_log
14) Trouble shooting
The following are a few of the common errors encountered in jumpstart.
Error : unknown client "client host name"
Source : add_install_client
Cause : host name can't be resolved . check host entry is there in /etc/ethers or in nis/nis+ maps .
File just loaded does not appear to be executable .
Source : Solaris booting process
Cause : Improper media . Make sure proper media is available through disk image or CD in the install server . Also see that the rules point to valid media type.
Warning : getfile:RPC failed : error 5 (RPC timed out)
Source: Client boot requests
Cause : Muliple entries for a client in different servers. There should not be multiple entries in different install server's /etc/bootparams , /tftpboot or /rplboot . These causes a hang situation when all of them try to answer.
No network boot server .Unable to install the system. See installation instructions
Source : Client boot request.
Cause : Installation is not proper. Check the boot server installation again for any error in command or file .
Timeout waiting for ARP/RARP packet …
Source : Client boot request .
Cause : No server is answering its request for booting .Probably they don't know about this client . See the proper entries are there in /etc/bootparams or nis maps with proper entries in nsswitch.conf . add_install_client is responsible for adding client information in jumpstart server so check the command and its option.
race 回复于:2003-11-03 20:17:42 |
谢谢 |
race 回复于:2003-11-04 07:36:40 |
如果想了解jumpstart更多的资料可以去下载Solaris 8 Advance Installation Guide。9的安装手册已经是中文版的了,方法和8类似,里面也有各种平台或介质的安装办法,还有新增的flash安装(整个操作系统克隆)和LIVE UPGRADE的详细资料。感兴趣的可以下载放在手边参考。下载地址:
http://docs.sun.com/db/coll/287.11?l=zh http://docs.sun.com/db/coll/287.6?l=zh |
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/