Chinaunix

标题: solaris 11-11 AI安装过程 [打印本页]

作者: 3sun    时间: 2012-02-24 15:39
标题: solaris 11-11 AI安装过程
本帖最后由 3sun 于 2012-02-25 08:15 编辑

在论坛里学到不少东西,今天也尝试去写一写。 辛苦测试结果 。申请精华阿 :)

正题:

测试环境 M5000  (domain0 ,domain1)                M5000  firmware  update 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 Name  Alias Of  Status  Arch   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-sparc  orig_default  Default
s11-sparc      orig_default  Default
****查看已有的安装服务及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:dhcp  File and args: - install
1000 Mbps full duplex  Link 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 duplex  Link 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/a ... sparc//solaris.zlib
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 126752256 (121M) [text/plain]
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 [126752256/126752256]

Downloading solarismisc.zlib
--2012-02-23 06:06:47--  http://192.168.0.1:5555/export/a ... c//solarismisc.zlib
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20636672 (20M) [text/plain]
Saving to: `/tmp/solarismisc.zlib'

100%[======================================>] 20,636,672  76.8M/s   in 0.3s   

2012-02-23 06:06:47 (76.8 MB/s) - `/tmp/solarismisc.zlib' saved [20636672/20636672]

Downloading .image_info
--2012-02-23 06:06:47--  http://192.168.0.1:5555/export/a ... -sparc//.image_info
Connecting to 192.168.0.1:5555... connected.
HTTP request sent, awaiting response... 200 OK
Length: 65 [text/plain]
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 [65/65]

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                     USED  AVAIL  REFER  MOUNTPOINT
rpool                   72.0G   202G  73.5K  /rpool
rpool/ROOT              1.83G   202G    31K  legacy
rpool/ROOT/test           62K   202G  1.46G  /
rpool/ROOT/test/var         1K   202G   344M  /var
rpool/ROOT/solaris      1.83G   202G  1.47G  /
rpool/ROOT/solaris/var   348M   202G   344M  /var
rpool/dump              66.0G   204G  64.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   202G  4.00G  -

root@solaris11-2:~# pkg publisher
PUBLISHER                             TYPE     STATUS   URI
solaris                               origin   online   http://192.168.0.1:80/




作者: 东方蜘蛛    时间: 2012-02-24 15:57
本帖最后由 东方蜘蛛 于 2012-02-24 15:57 编辑

板凳啊,支持精华
作者: king2007    时间: 2012-02-25 11:23
这个帖子内容还是比较新的  呵呵!
作者: cwnlinux    时间: 2012-02-26 21:15
都是Solaris 11的新内容,非常好。支持一个。
作者: chnvip001    时间: 2012-02-26 21:20
good 绝对支持!!!!
作者: 燕子回旋    时间: 2012-02-27 00:24
这样的贴子应该 多点才好....
作者: 非凡公子    时间: 2012-02-27 00:25
嗯,....用错帐号上了.....
作者: simonzh    时间: 2012-02-27 11:26
支持精华
作者: zhangyudong1987    时间: 2012-02-27 11:58
支持啊。。。正好学习下关于solaris11
作者: guoguo9903    时间: 2012-02-28 11:59
收藏。。。。。。
作者: 798683133    时间: 2012-03-02 13:24
顶下!
作者: pinke8    时间: 2012-03-03 23:21
认真的学习了,果然是很好很详细的
作者: pitonas    时间: 2012-03-05 00:43
果然是很好很详细
作者: milujite    时间: 2012-03-06 09:03
M5000装SOLARIS11,好新,顶
羡慕啊,至今还在虚拟机折腾的路过。
作者: napoleon516    时间: 2012-04-05 14:41
很好很详细,非常支持!
作者: sw3439    时间: 2012-05-10 14:53
提示: 作者被禁止或删除 内容自动屏蔽
作者: nimysun    时间: 2012-06-05 13:42
已经看不懂了~~
作者: Cleo_Z    时间: 2012-06-11 15:55
敬爱的楼主
我在客户端安装时,出现了如下错误
这个是为啥啊?
Rebooting with command: boot net:dhcp
Boot device: /pci@22,600000/network@0:dhcp  File and args:
100 Mbps full duplex  Link up
Timed out waiting for BOOTP/DHCP reply
TFTP server not specified
Evaluating:

Boot load failed


作者: powerengine    时间: 2012-06-12 17:14
不错。这几天我研究的头晕脑胀!!
作者: DC_楚楚    时间: 2012-06-12 17:45
很详细,属性10之后就来搞11
作者: wenyy_unix    时间: 2012-08-03 16:42
收藏。。。
作者: gbmf11x    时间: 2012-10-31 17:51
支持,还没整过11呢
作者: itstorman    时间: 2012-11-13 14:42
不错。。。。。。。。。。。。。。。。
作者: free4us    时间: 2012-12-06 14:22
out le ,现在都11了,学习学习,希望多多发这样的文章。
作者: hjhyj326    时间: 2012-12-12 11:17
好东西,我这几天正在折腾solaris11中的中文字符集的问题,搞不懂啊
作者: htomy    时间: 2012-12-24 20:12
好帖子,谢谢分享啦!
作者: homecdhw    时间: 2014-09-04 16:38
请教下 我使能去使能安装服务 服务都不能online 一直处于维护状态
-bash-4.1# svcs -xv svc:/system/install/server:default
svc:/system/install/server:default (Installadm Utility)
State: maintenance since September  4, 2014 04:07:02 PM CST
Reason: Start method exited with $SMF_EXIT_ERR_CONFIG.
   See: http://support.oracle.com/msg/SMF-8000-KS
   See: man -M /usr/share/man -s 1M installadm
   See: /var/svc/log/system-install-server:default.log
Impact: This service is not running.
-bash-4.1# svcs svc:/system/install/server
STATE          STIME    FMRI
maintenance    16:07:02 svc:/system/install/server:default
-bash-4.1#
作者: athenaansan    时间: 2015-04-14 21:22
留个脚印,日安,傻木们?★,:*\( ̄▽ ̄)/?:*?°★*"
作者: walgnin    时间: 2015-04-30 20:49
太无敌了!楼主应该珍惜哦!^_^
作者: lklkxcxc    时间: 2015-07-28 10:19
还没被淘汰




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2