电脑技术学习

Jumpstart安装实例

dn001
又被mmmmn“出卖”,不过也好,我也该发推荐贴了,箱子见底了:(
用途不太广泛,对有些需要的朋友有帮助的话就没白忙活:)
如果还有人说照着这个还装不出来的话!
我就!!!@#$^@$%^&#$%&$%&
==================================================================

Jumpstart安装实例(作者:bear)

一、正常用CD-ROM手工安装一台机器(以下称Install_sever),准备将其配置成Install Server
;<过程省略>
二、按照用户分配的IP地址、规划的hostname,和需要利用网络安装的主机的Ethernet Address
;修改Server的/etc/hosts和/etc/ethers
;例如:/etc/hosts中加入以下行
; ; ; ;129.148.94.6 ; ; Client1
129.148.94.7 ; ; Client2
.
.
; ; ; ;/etc/ethers中加入以下行
8:0:20:30:6:9a ; Client1
8:0:20:30:6:83 ; Client2
.
.

三、制作Solaris OS Image
;1、在Install_sever的CD-ROM中放入Solaris 8 Software 1 of 2光盘
;2、运行以下命令:
; ; # cd /cdrom/cdrom0/s0/Solaris_8/Tools
; ; # ./setup_install_server /export/install
; ; (其中/export/install所在的分区必须有足够的空间,至少800M以上,建议1G
; ; ;如果/分区空间不够,可选用其他目录,只要于以后使用该目录时保持一致即可
; ; ;如可以使用/export/home/install)
;3、等待程序运行完成以后,运行以下命令取出Solaris 8 Software 1 of 2光盘
; ; 并放入Solaris 8 Software 2 of 2光盘
; ; # cd /
; ; # eject
;4、运行以下命令:
; ; # cd /cdrom/cdrom0/Solaris_8/Tools
; ; # ./add_to_install_server /export/install
;5、等待程序运行完成以后,运行以下命令取出Solaris 8 Software 2 of 2光盘
; ; 并放入Solaris 8 Language 光盘
; ; # cd /
; ; # eject
;6、运行以下命令:
; ; # cd /cdrom/cdrom0/Tools
; ; # ./add_to_install_server -s /export/install
; ; 按照系统提示选择"Simplified Chinese"(简体中文)选项,安装相应软件包
;7、等待程序运行完成以后,运行以下命令取出Solaris 8 Language 光盘
; ; # cd /
; ; # eject

;至此制作Solaris OS Image的工作完成
四、配置jumpstart相关信息
;1、运行以下命令
; ; # mkdir /jumpstart
; ; # cp -r /export/install/Solaris_8/Misc/jumpstart_sample/* /jumpstart
;2、用ftp将事先制作好的以下几个文件上传至/jumpstart中(ftp上传时请用ascii码格式)
; ; (用vi看一下文件的内容,如果文本行结尾有多余的^M,请将文件中的^M全部删除,或用
; ; ;命令dos2unix转换)
; ; sysidcfg
; ; rules
; ; test_prof_18G
; ; test_prof_36G
;3、按照用户设置的netmask(网络掩码)修改sysidcfg文件中network_interface的相关参数
; ; 例如:
; ; 原条目:network_interface=primary {netmask=255.255.255.0 protocol_ipv6=no}

; ; 修改成:network_interface=primary {netmask=255.255.252.0 protocol_ipv6=no}
; ; 保存文件
;4、运行以下命令:
; ; # cd /jumpstart
; ; # ./check<---检查rules文件语法,并生成rules.ok文件
; ; 此时可以查看一下rules.ok文件是否生成

五、共享必要的目录
;1、编辑/etc/dfs/dfstab文件加入以下行
; ; share -F nfs -o ro,anon=0 /jumpstart
;2、运行以下命令:
; ; # /usr/lib/nfs/nfsd -a 16
; ; # /usr/lib/nfs/mountd
; ; # share /jumpstart
; ; # shareall
; ; (用以下命令查看/jumpstart是否share出来了,如果有以下输出表示share正常)
; ; # dfshares Install_sever
; ; ;RESOURCE ; ; ; SERVERACCESSTRSPOT
; ; ; ;Install_sever:/jumpstart Install_sever--

六、授权Clients安装
;运行以下命令:
;# cd /export/install/Solaris_8/Tools
;# ./add_install_client -c Install_sever:/jumpstart -p Install_sever:/jumpstart Client1 sun4u
;# ./add_install_client -c Install_sever:/jumpstart -p Install_sever:/jumpstart Client2 sun4u
.
.
.
;以上命令要逐个授权在/etc/hosts中加入的每一个需要利用网络安装的主机

七、引导Client机器,利用网络安装操作系统
;1、检查网络连接是否正确
;2、Client开机后用Stop+A将机器控制在OK提示符下
;3、键入以下命令利用网络安装操作系统:
; ; ok boot net - install


附录1:例子文件及相关解释:

sysidcfg 文件内容


name_service=NONE#指定名服务为NONE
network_interface=primary {netmask=255.255.252.0 protocol_ipv6=no}#设置网络相关参数
security_policy=NONE#设置安全策略为NONE
terminal=dtterm#设置终端类型为dtterm
timezone=PRC#设置时区信息为PRC
system_locale=zh#设置本地信息为zh(中文)
timeserver=localhost#设置时钟信息为localhost(本机)

rules 文件内容
# rule keywords and rule valuess begin script profile finish script
# ----------------------------- ------------ -------- -------------
disksize c0t0d0 15000-20000- test_prof_18G-
disksize c0t0d0 30000-40000- test_prof_36G-

第一行设置磁盘大小在15G-20G(18G硬盘)的用 test_prof_18G 配置文件
第一行设置磁盘大小在30G-40G(36G硬盘)的用 test_prof_36G 配置文件

test_prof_18G 文件内容

install_type initial_install#指定安装类型为 initial
usedisk c0t0d0#指定系统选择的硬盘为 c0t0d0
boot_device c0t0d0s0 update#设置root文件系统及引导设备位置,并更新EEPROM 中的参数。
root_device c0t0d0s0#设置root文件系统位置为 c0t0d0s0
cluster SUNWCXall#设置系统软件安装类别为Entire Distribution Plus OEM Support
system_type standalone#设置系统类型为 standalone
partitioning explicit#指定硬盘分区方式(explicit 表示使用filesys 定义的结构)
filesys c0t0d0s0 2000 / -
filesys c0t0d0s1 1500 /var - |
filesys c0t0d0s3 2500 swap |
filesys c0t0d0s5 3000 /opt - }-> 具体每一个分区的信息(大小为兆字节)
filesys c0t0d0s6 2000 /usr - |
filesys c0t0d0s4 15 ; unnamed |
filesys c0t0d0s7 free /export/home -/
geo Asia#指定地理区域
locale zh#指定本地化语言包
isa_bits 64#计算位长(64 或32)

配置注意事项:
1、install_type 必须写在第1行
2、标记为容量为“free”的分区如“filesys c0t0d0s7 free /export/home -”
必须写在所有“filesys”定义的最后一个

test_prof_36G 文件内容

相应的解释与test_prof_18G 文件相同
区别只在“filesys”的分区大小定义不同
install_type initial_install
usedisk c0t0d0
boot_device c0t0d0s0 update
root_device c0t0d0s0
cluster SUNWCXall
system_type standalone
partitioning explicit
filesys c0t0d0s0 3000 / -
filesys c0t0d0s1 3000 /var -
filesys c0t0d0s3 3000 swap
filesys c0t0d0s5 5000 /opt -
filesys c0t0d0s6 3000 /usr -
filesys c0t0d0s4 15 ; unnamed
filesys c0t0d0s7 free /export/home -
geo Asia
locale zh
isa_bits 64


如果有其他特殊需求请参照:“Solaris 8 Advanced Installation Guide”
; ; ; ; ; ; ; ; ; ; ; ;(Part Number:806–0957–10)

附例:JumpStart Install Server 安装过程:

附录1:实例安装记录
;此例中:
;JumpStart Install_Server的信息如下:
; ; Hostame: jumptest
IP: 10.11.147.60

;2个Install Client信息如下
;Client1:
Hostame: test-1
IP: 10.11.147.38
Ethernet: 8:0:20:ce:ec:d6
c0t0d0: 18G

;Client2:
Hostame: test-2
IP: 10.11.147.39
Ethernet: 8:0:20:ce:ec:ae
c0t0d0: 18G

root@jumptest # cd /cdrom/sol_8_sparc/s0/Solaris_8/Tools
root@jumptest # ./setup_install_server /export/home/install
Verifying target directory...
Calculating the required disk space for the Solaris_8 product
Copying the CD image to disk...
Install Server setup complete
root@jumptest # cd /
root@jumptest # eject
root@jumptest # cd /cdrom/sol_8_sparc_2/Solaris_8/Tools
root@jumptest # ./add_to_install_server /export/home/install

The following Products will be copied to /export/home/install/Solaris_8/Product:

Solaris_2_of_2

If only a subset of products is needed enter Control-C
and invoke ./add_to_install_server with the -s option.

Checking required disk space...

Copying the Early Access products...
41990 块

Processing completed successfully.
root@jumptest # cd /
root@jumptest # eject
root@jumptest # cd /cdrom/sol_8_lang_sparc/Tools
root@jumptest # ./add_to_install_server -s /export/install /export/home/install

Enter the number of the product(s) you want to add
to /export/home/install/Solaris_8/Product or 'all' for all products.

The following are valid products:

; 1Simplified_Chinese
; 2French
; 3German
; 4Italian
; 5Japanese
; 6Korean
; 7Spanish
; 8Swedish
; 9Traditional_Chinese
;10shared

1

Checking required disk space...

Copying SimplifiedChinese packages...

Processing completed successfully.
root@jumptest # cd /
root@jumptest # eject
root@jumptest # cd /jumpstart
root@jumptest # ./check
Validating rules...
Validating profile test_prof_18G...
Validating profile test_prof_36G...
The custom JumpStart configuration is ok.
root@jumptest # ls
any_machine ; ; net924_sun4c ; ;rules ; ; ; ; ; sysidcfg ; ; ; ;x86-begin.conf
check ; ; ; ; ; test_prof_18G ; ;rules.ok ; ; ; ;upgrade ; ; ; ; x86-class
host_class ; ; ;test_prof_36G ; ;set_root_pw ; ; x86-begin
root@jumptest # /usr/lib/nfs/nfsd -a 16
root@jumptest # /usr/lib/nfs/mountd
root@jumptest # share /jumpstart
root@jumptest # shareall
root@jumptest # dfshares jumptest
RESOURCE ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;SERVER ACCESS ; ;TRANSPORT
jumptest:/jumpstart ; ; ; ; ; ; ; ; ; ;jumptest ;- ; ; ; ; -
root@jumptest # cd /export/home/install/Solaris_8/Tools
root@jumptest # ./add_install_client -c jumptest:/jumpstart -p jumptest:/jumpstart test-1 sun4u
saving original /etc/dfs/dfstab in /etc/dfs/dfstab.orig
Adding "share -F nfs -o ro,anon=0 /export/home/install" to /etc/dfs/dfstab
updating /etc/bootparams
copying inetboot to /tftpboot
root@jumptest # ./add_install_client -c jumptest:/jumpstart -p jumptest:/jumpstart test-2 sun4u
updating /etc/bootparams
root@jumptest #

备注:例子中会有目录不同的情况
; 如不是/cdrom/cdrom0,而是/cdrom/sol_8_sparc/、/cdrom/sol_8_sparc_2
; 或/cdrom/sol_8_lang_sparc,其实/cdrom/cdrom0是指向这些目录的连接,没有问题

(bear:2002/6/13 下午于chinaunix.net)

标签: