solaris 11-11 AI安装过程
本帖最后由 3sun 于 2012-02-25 08:15 编辑在论坛里学到不少东西,今天也尝试去写一写。 辛苦测试结果 。申请精华阿 :)
正题:
测试环境 M5000(domain0 ,domain1) M5000firmwareupdate to 1100
domain0 text-install 介质光盘引导安装, 安装过程略。。。。
domain0: hostname(solaris11-1) ip:192.168.0.1
domain1进行网络AI安装
一 domain0 建立IPS Repo URI 模式
root@solaris11-1:~#zfs create rpool/export/repoSolaris11
****为IPS repo 创建zfs文件系统及目录***
root@solaris11-1:~# zfs set atime=off rpool/export/repoSolaris11
****atime 属性控制是否在读取文件时更新文件的访问时间。关闭此属性可避免在读取文件时生成写入流量。*****
下载IPS软件库 iso文件传到服务器目录
两个文件:
sol-11-1111-repo-full-iso-a.zip
sol-11-1111-repo-full-iso-b.zip
Unzip 两个文件后
sol-11-1111-repo-full.iso-a
sol-11-1111-repo-full.iso-b
合并为一个文件
root@solaris11-1:/export/repoSolaris11# cat sol-11-1111-repo-full.iso-a sol-11-1111-repo-full.iso-b > sol-11-1111-repo-full.iso
root@solaris11-1:/export/repoSolaris11# mkdir /repo
root@solaris11-1:/export/repoSolaris11# lofiadm -a /export/repoSolaris11/sol-11-1111-repo-full.iso
/dev/lofi/1
root@solaris11-1:/export/repoSolaris11# mount -F hsfs /dev/lofi/1 /repo
root@solaris11-1:/export/repoSolaris11#cd /repo; tar cf - . | (cd /export/repoSolaris11; tar xfp -)
将系统信息库从 lofi 已挂载文件系统移动到 ZFS 文件系统。
root@solaris11-1:/export/repoSolaris11# pkgrepo -s /export/repoSolaris11 refresh
Initiating repository refresh.
缺省情况下,系统信息库创建命令不会构建搜索索引。要使客户机能够在本地系统信息库中搜索软件包,使用以下命令在系统信息库中为软件包编写目录并更新搜索索引。
root@solaris11-1:/export/repoSolaris11# pkg set-publisher -G '*' -g /export/repoSolaris11/repo solaris
-G '*'删除 solaris 发布者的所有现有源。
-g 将新建的本地系统信息库的 URI 添加为 solaris 发布者的新源
root@solaris11-1:/export/repoSolaris11# pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online file:///export/repoSolaris11/repo/
检查发布者的内容
root@solaris11-1:# svccfg -s application/pkg/server setprop pkg/inst_root=/export/repoSolaris11/repo
root@solaris11-1:# svccfg -s application/pkg/server setprop pkg/readonly=true
root@solaris11-1:# svcadm refresh application/pkg/server
root@solaris11-1:# svcadm enable application/pkg/server
建立URI发布地址
浏览器http://192.168.0.1:80 测试 是否可以访问到 IPS Repo页面
二创建AI服务器及AI安装domain1
检查建立AI安装服务器需要的包installadm:
root@solaris11-1:/export/repoSolaris11# pkg info installadm
Name: install/installadm
Summary: installadm utility
Description: Automatic Installation Server Setup Tools
Category: System/Administration and Configuration
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.0.0.0.2.1482
Packaging Date: October 19, 2011 12:26:24 PM
Size: 1.04 MB
FMRI: pkg://solaris/install/installadm@0.5.11,5.11-0.175.0.0.0.2.1482:20111019T122624Z
root@solaris11-1:/export/repoSolaris11# svcs system/install/server
STATE STIME FMRI
online 11:18:10 svc:/system/install/server:default
建立AI安装服务
这里采用使用 ISO 文件中的网络映像为 SPARC 客户机创建 AI 安装服务方法,不用建立DHCP服务器。
***下载sol-11-1111-ai-sparc.iso文件上传到本地目录/home/test/image-s11***
root@solaris11-1:/home/test/image-s11# ls
osc4.0-repo-full.iso sol-11-1111-ai-sparc.iso
root@solaris11-1:/home/test/image-s11#installadm create-service -n s11-sparc -s /home/test/image-s11/sol-11-1111-ai-sparc.iso -d /install/images/s11-sparc
执行上述 installadm create-service 命令后会执行以下操作。
1. 将安装服务命名为 s11-sparc。
2. 创建安装服务目标目录 /install/images/s11-sparc。
3. 将 ISO 文件/home/test/image-s11/ sol-11-1111-ai-sparc.iso 解压缩到网络映像位置 /install/images/s11-sparc。
4. 在 /install/images/s11-sparc/wanboot.conf 处生成此服务的 wanboot.conf 文件。
5. 刷新 AI SMF 服务 system/install/server,将 /install/images/s11-sparc 挂载为 /etc/netboot/s11-sparc。
6. 因为这是在此安装服务器上创建的第一个 SPARC 安装服务,因此将自动创建 default-sparc 服务别名。别名将使用 s11-sparc 中的映像,因此 /install/images/s11-sparc 也挂载为 /etc/netboot/default-sparc。
7. 将配置文件 /etc/netboot/wanboot.conf 以符号形式链接到 /etc/netboot/default-sparc/wanboot.conf。将配置文件 /etc/netboot/system.conf 以符号形式链接到 /etc/netboot/default-sparc/system.conf。
8. 提供 DHCP 配置所需的引导文件 http:// 192.168.0.1:5555/cgi-bin/wanboot-cgi。
root@solaris11-1:/home/test/image-s11# installadm list
Service NameAlias OfStatusArch Image Path
------------------------------ ----------
default-sparc s11-sparc on Sparc/install/images/s11-sparc
s11-sparc - on Sparc/install/images/s11-sparc
root@solaris11-1:/home/test/image-s11# installadm create-client -e 0:21:28:af:55:2c -n s11-sparc
***将 domain1的MAC地址加入到s11-sparc安装服务***
root@solaris11-1:/home/guo/image-s11#installadm list –m
Service Name Manifest Status
------------ -------- ------
default-sparcorig_defaultDefault
s11-sparc orig_defaultDefault
****查看已有的安装服务及AI清单****
这里我不做特殊设置,使用默认的AI清单。只需要将默认AI清单中 软件发布者地址更换成domain0的发布地址。
root@solaris11-1:/var/ai/service/default-sparc/AI_data# vi orig_default 修改默认AI清单
将此行<origin name="http://pkg.oracle.com/solaris/release"/>
*****改为<origin name="http://192.168.0.1:80>******
domian 1 网络启动:
0} ok boot net:dhcp - install
Boot device: /pci@0,600000/pci@0/pci@8/pci@0/network@2:dhcpFile and args: - install
1000 Mbps full duplexLink up
Timed out waiting for BOOTP/DHCP reply
<time unavailable> wanboot info: WAN boot messages->console
<time unavailable> wanboot info: configuring /pci@0,600000/pci@0/pci@8/pci@0/network@2:dhcp
1000 Mbps full duplexLink up
<time unavailable> wanboot info: Starting DHCP configuration
<time unavailable> wanboot info: DHCP configuration succeeded
<time unavailable> wanboot progress: wanbootfs: Read 368 of 368 kB (100%)
<time unavailable> wanboot info: wanbootfs: Download complete
Thu Feb 23 05:40:15 wanboot progress: miniroot: Read 213735 of 213735 kB (100%)
Thu Feb 23 05:40:16 wanboot info: miniroot: Download complete
SunOS Release 5.11 Version 11.0 64-bit
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Remounting root read/write
Probing for device nodes ...
Preparing network image for use
Downloading solaris.zlib
--2012-02-23 06:06:45--http://192.168.0.1:5555/export/auto_install/s11-sparc//solaris.zlib
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 126752256 (121M)
Saving to: `/tmp/solaris.zlib'
100%[======================================>] 126,752,256 80.1M/s in 1.5s
2012-02-23 06:06:47 (80.1 MB/s) - `/tmp/solaris.zlib' saved
Downloading solarismisc.zlib
--2012-02-23 06:06:47--http://192.168.0.1:5555/export/auto_install/s11-sparc//solarismisc.zlib
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20636672 (20M)
Saving to: `/tmp/solarismisc.zlib'
100%[======================================>] 20,636,67276.8M/s in 0.3s
2012-02-23 06:06:47 (76.8 MB/s) - `/tmp/solarismisc.zlib' saved
Downloading .image_info
--2012-02-23 06:06:47--http://192.168.0.1:5555/export/auto_install/s11-sparc//.image_info
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65
Saving to: `/tmp/.image_info'
100%[======================================>] 65 --.-K/s in 0s
2012-02-23 06:06:47 (8.73 MB/s) - `/tmp/.image_info' saved
Done mounting image
Configuring devices.
Hostname: solaris
Service discovery phase initiated
Service name to look up: default-sparc
Service discovery finished successfully
Process of obtaining install manifest initiated
Using the install manifest obtained via service discovery
solaris console login:
Automated Installation started
The progress of the Automated Installation will be output to the console
Detailed logging is in the logfile at /system/volatile/install_log
Press RETURN to get a login prompt at any time.
06:07:03 Install Log: /system/volatile/install_log
06:07:03 Using XML Manifest: /system/volatile/ai.xml
06:07:03 Using profile specification: /system/volatile/profile
06:07:03 Using service list file: /var/run/service_list
06:07:03 Starting installation.
06:07:03 0% Preparing for Installation
06:07:03 100% manifest-parser completed.
06:07:03 0% Preparing for Installation
06:07:04 0% Preparing for Installation
06:07:04 0% Preparing for Installation
06:07:04 0% Preparing for Installation
06:07:04 1% Preparing for Installation
06:07:04 1% Preparing for Installation
06:07:04 1% Preparing for Installation
06:07:04 2% Preparing for Installation
06:07:04 2% Preparing for Installation
06:07:04 2% Preparing for Installation
06:07:04 3% Preparing for Installation
06:07:04 3% Preparing for Installation
06:07:04 3% Preparing for Installation
06:07:04 4% Preparing for Installation
06:07:04 4% Preparing for Installation
06:07:04 4% Preparing for Installation
06:07:08 7% target-discovery completed.
06:07:08 === Executing Target Selection Checkpoint ==
06:07:08 Selected Disk(s) : c2t0d0
06:07:08 13% target-selection completed.
06:07:08 17% ai-configuration completed.
06:07:09 19% var-shared-dataset completed.
06:07:20 21% target-instantiation completed.
06:07:21 21% Beginning IPS transfer
06:07:21 Creating IPS image
06:07:24 Installing packages from:
06:07:24 solaris
06:07:24 origin:http://192.168.0.1:80/
06:16:06 23% generated-transfer-848-1 completed.
06:16:06 25% initialize-smf completed.
06:16:08 Installing SPARC bootblk to root pool devices: ['/dev/rdsk/c2t0d0s0']
06:16:08 Setting openprom boot-device
06:16:09 35% boot-configuration completed.
06:16:09 37% update-dump-adm completed.
06:16:09 40% setup-swap completed.
06:16:10 42% device-config completed.
06:16:10 44% apply-sysconfig completed.
06:16:10 46% transfer-zpool-cache completed.
06:16:18 87% boot-archive completed.
06:16:18 89% transfer-ai-files completed.
06:16:18 99% create-snapshot completed.
06:16:18 Automated Installation succeeded.
06:16:18 You may wish to reboot the system at this time.
Automated Installation finished successfully
The system can be rebooted now
Please refer to the /system/volatile/install_log file for details
After reboot it will be located at /var/sadm/system/logs/install_log
安装完毕
root@solaris11-2:~# zfs list
NAME USEDAVAILREFERMOUNTPOINT
rpool 72.0G 202G73.5K/rpool
rpool/ROOT 1.83G 202G 31Klegacy
rpool/ROOT/test 62K 202G1.46G/
rpool/ROOT/test/var 1K 202G 344M/var
rpool/ROOT/solaris 1.83G 202G1.47G/
rpool/ROOT/solaris/var 348M 202G 344M/var
rpool/dump 66.0G 204G64.0G-
rpool/export 98K 202G 32K/export
rpool/export/home 66K 202G 32K/export/home
rpool/export/home/test 34K 202G 34K/export/home/test
rpool/swap 4.13G 202G4.00G-
root@solaris11-2:~# pkg publisher
PUBLISHER TYPE STATUS URI
solaris origin online http://192.168.0.1:80/
本帖最后由 东方蜘蛛 于 2012-02-24 15:57 编辑
板凳啊,支持精华:victory: 这个帖子内容还是比较新的呵呵! 都是Solaris 11的新内容,非常好。支持一个。 good 绝对支持!!!! 这样的贴子应该 多点才好.... 嗯,....用错帐号上了..... 支持精华 支持啊。。。正好学习下关于solaris11 收藏。。。。。。