Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->Linux技术 ->Linux安全 ->正文

使用JumpStart快速安装Solaris

来源:linux.chinaunix.net 作者:sun.com  时间:2007-04-22 点击: [收藏] [投稿]

A JumpStart client looks for a file named sysidcfg before the OS installation begins. This file must be named "sysidcfg", so in order to have multiple versions of the file, each sysidcfg file must reside in a separate directory. Each client can have its own sysidcfg file, or multiple clients can use the same sysidcfg file. The sysidcfg file is assigned to a client by the add_install_client command. The following shows the creation of two sysidcfg files:

  # cd /export/config
  # mkdir sysidcfg1
  # cd sysidcfg1
  # vi sysidcfg

  system_locale=en_US.ISO8859-1
  timezone=US/Pacific
  timeserver=localhost
  terminal=vt100
  name_service=NONE
  security_policy=NONE
  root_password=<encrypted from /etc/shadow>
  network_interface=bge0 {hostname=client1
                          netmask=255.255.255.0
                          protocol_ipv6=no
                          default_route=172.16.64.1}

  :wq

  # cd ../
  # mkdir sysidcfg2
  # cd sysidcfg2
  # vi sysidcfg

  system_locale=en_US.ISO8859-1
  timezone=US/Pacific
  timeserver=localhost
  terminal=vt100
  name_service=NONE
  security_policy=NONE
  root_password=<encrypted from /etc/shadow>
  network_interface=bge0 {hostname=client2
                          netmask=255.255.255.0
                          protocol_ipv6=no
                          default_route=172.16.64.1}

  :wq

c. Create the rules file:

The next file to create is the rules file. This is a text file that contains a rule for each client or group of clients on which the Solaris OS will be installed. Each line of the rules file tells JumpStart which begin, profile, and finish files to use for each client or group of clients.

There is only one rules file. It can contain multiple lines depending upon how many unique configurations are needed. The following shows the contents of a rules file that contains information for two separate clients:

  # cd /export/config
  # vi rules

  hostname client1 begin1 profile1 finish1
  hostname client2 begin2 profile2 finish2

  :wq

The rules file is used by the check script when it creates the rules.ok file. Successful creation of the rules.ok file is required for custom JumpStart installations.

d. Create the begin file:

The begin file is a user-defined Bourne shell script that is used to perform tasks on the client before the installation of the Solaris OS begins. Typical tasks include creating derived profiles and the backing up of files before upgrading.

Multiple begin files can be used if desired. The following shows the creation of two begin files:

  # cd /export/config
  # vi begin1

  #!/bin/sh
  echo "Begin Script for JumpStart client1..."

  :wq

  # vi begin2

  #!/bin/sh
  echo "Begin Script for JumpStart client2..."

  :wq

  # chmod 755 begin*

During installation on the client, output from the begin file is written to /tmp/begin.log. After the installation is done, the log file can be found in /var/sadm/system/logs/begin.log.

The Solaris 10 Installation Guide includes a Custom JumpStart Environment Variables section that describes variables you can use in begin scripts.

e. Create the finish file:

The finish file is a user-defined Bourne shell script that is used to perform tasks on the client after the installation of the Solaris OS has completed. This script is typically used to add additional files, add packages and patches, customize the root environment, and install additional software.

Multiple finish files can be used if desired. The following shows the creation of two finish files:

  # cd /export/config
  # vi finish1

  #!/bin/sh
  echo "Finish Script for JumpStart client1..."
  echo "Get rid of the nfs prompt during the initial boot"
  touch /a/etc/.NFS4inst_state.domain

  :wq

  # vi finish2

  #!/bin/sh
  echo "Finish Script for JumpStart client2..."
  echo "Get rid of the nfs prompt during the initial boot"
  touch /a/etc/.NFS4inst_state.domain

  :wq

  

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:linux环境变量设置及保存地点   下一篇:避其锋芒 Linux操作系统入侵实例

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号