免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5037 | 回复: 1
打印 上一主题 下一主题

利用jumpstart网络安装solaris 10 sparc u4 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-04-23 15:43 |只看该作者 |倒序浏览

准备:sol-10-u4-ga-sparc-dvd.iso
      e450-1做客户机  计算机名:e450-1 IP:218.6.172.58
      e450-2做服务器  计算机名:e450-2 IP:218.6.172.60

a 建立文件服务器
            
lofiadm -a /opt/sou/sol-10-u4-ga-sparc-dvd.iso /dev/lofi/1   #使用iso文件做安装源
mount -F hsfs -o ro /dev/lofi/1 /opt/sou/iso1
vi /etc/rc3.d/S55isomount                #为了重复使用该资源,将该共享写成启动运行
#!/sbin/sh
svcadm disable svc:/network/nfs/server:default
lofiadm -a /opt/sou/sol-10-u4-ga-sparc-dvd.iso /dev/lofi/1   
mount -F hsfs -o ro /dev/lofi/1 /opt/sou/iso1
svcadm enable svc:/network/nfs/server:default
mkdir -p /opt/sparcinstall               #安装需要的文件服务所在位置,空间要求>4G  
cd /opt/sou/iso1/Solaris_10/Tools/       #复制要安装的系统源文件到文件服务器目录
./setup_install_server /opt/sparcinstall                                                
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...
Install Server setup complete

b 设置客户机系统配置文件
vi /etc/hosts                    #建立宿主主机和客户机的对应关系
::1     localhost                           
127.0.0.1       localhost                  
218.6.172.58    e450-1             #e450-1是客户机
218.6.172.60    e450-2  loghost    #e450-2是宿主服务器主机
:wq
mkdir -p /jumpstart                #复制配置文件服务器的范例文件到文件服务器目录
cd /jumpstart
cp -rf /opt/sou/iso1/Solaris_10/Misc/jumpstart_sample/check .
vi sysidcfg                        #建立客户机安装os使用的配置文件
system_locale=en_US.ISO8859-1
timezone=Asia/Shanghai
terminal=vt100
name_service=DNS {domain_name=ns.westidc.com.cn
             name_server=221.236.9.9, 210.77.146.30, 61.139.2.69
             search= mydomain.com }       #最好使用none,简单
root_password=Els7v.cLie0DM               #root的密码是:1qaz~!@ #root_password=
network_interface=hme0 {hostname=e450-1
                  ip_address=218.6.172.58
                  netmask=255.255.255.0
                  default_route=218.6.172.1
                  protocol_ipv6=no}
security_policy=none
      :wq

c 设置客户机系统属性文件                             
vi rules                               #定制配置规则文件,创建check脚本
hostname e450-1    -   e450-1_prof  -  #指定客户机e450-2使用的属性文件是e450-1_prof
:wq
vi e450-1_prof                 #创建客户机的profile文件e450-1_prof,定义其安装参数     
install_type   initial_install             #初始化安装                           
system_type    standalone                  #独立系统            
partitioning   explicit                    #分区如下                              
filesys        c0t0d0s0 10000 /            #/分区10G
filesys        c0t0d0s1 1024  swap         #swap分区
filesys        c0t0d0s3 free  /w           #剩下的全给/w私有分区
cluster        SUNWCXall                   #安装OEM Solaris OS 群集
                                           #cluster  SUNWCprog安装开发软件   
./check                                    #检查配置规则文件正确性
Validating rules...
Validating profile e450-1_prof...
The custom JumpStart configuration is ok.

d 设置nfs共享
share -F nfs -o ro,anon=0 /opt/sparcinstall
share -F nfs -o ro,anon=0 /jumpstart
shareall

e 运行add_install_client脚本为客户机找到add_install_client脚本的位置,设置客户机的参数
cd /opt/sou/iso1/Solaris_10/Tools                    
./add_install_client -c e450-2:/jumpstart -p e450-2:/jumpstart -s e450-2:/opt/sparcinstall -e 0:3:ba:11:2e:ed e450-1 sun4u
Adding Ethernet number for e450-1 to /etc/ethers
saving original /etc/dfs/dfstab in /etc/dfs/dfstab.orig
Adding "share -F nfs -o ro,anon=0 /opt/sparcinstall" to /etc/dfs/dfstab
Adding "share -F nfs -o ro,anon=0 /opt/sou/iso1/Solaris_10/Tools/Boot" to /etc/dfs/dfstab
making /tftpboot
enabling tftp in /etc/inetd.conf
Converting /etc/inetd.conf
enabling network/tftp/udp6 service
enabling network/rarp service
enabling network/rpc/bootparams service
updating /etc/bootparams
copying boot file to /tftpboot/inetboot.SUN4U.Solaris_10-1
#用法实例,/opt/sou/iso1/Solaris_10/Tools/add_install_client -h
#Usage: /opt/sou/iso1/Solaris_10/Tools/add_install_client
        [-i ipaddr] [-e ethernetid] [-s server:path]
                [-c server:path] [-p server:path]
                [-n [name_server]:name_service[(netmask)]]
                [-t install boot image path] client_name platform_group
#增加客户机:
-c指定客户机系统配置文件hosts和sysidcfg在安装服务器e450-2上的目录/jumpstart,
-p指定客户机系统属性文件rules和prof在安装服务器e450-2上的目录/jumpstart,
-p选项指定了安装 Solaris 10 os软件时,系统可以找到 sysidcfg 文件的位置。
-s指定客户机的安装文件服务器e450-2和solaris10软件的位置/opt/sparcinstall,
-e指定客户机e450-1的mac

share                                  #确认nfs share的目录
-               /jumpstart   ro,anon=0   ""  
-               /opt/sparcinstall   ro,anon=0   ""  
-               /opt/sou/iso1/Solaris_10/Tools/Boot   ro,anon=0   ""
生成文件在/etc/bootparams验证:
cat /etc/ethers                        #确认客户机的mac已经加入
cat /etc/bootparams                    #生成的启动参数
   
f  客户机上进行os安装
ok boot net - install


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14639/showart_574053.html

论坛徽章:
0
2 [报告]
发表于 2009-08-04 23:31 |只看该作者
楼主辛苦了,好东西不能沉了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP