详解使用磁盘克隆和U盘安装IBM AIX操作系统


    通常我们都是通过CDROM的方式来安装IBM AIX操作系统,但如果服务器没有光驱,或者需要安装多台服务器的时候为了提高工作效率,可以考虑使用这里的方法。这篇文章将详细讨论使用磁盘克隆和U盘安装的方式安装AIX操作系统,这两种方法都需要有已经成功安装的AIX操作系统的支持。


一.磁盘克隆安装操作系统。

1.操作系统环境。
# oslevel -s
6100-04-10-1119

# bootlist -m normal -o
cd0
hdisk0 pathid=0
ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000

# lspv
hdisk0          00cc1ad4ef095bf0                    rootvg          active      
hdisk1          00cc1ad46aff307f                    None                        

2.使用alt_disk_install工具克隆磁盘。

# alt_disk_install -OCB hdisk1
+-----------------------------------------------------------------------------+
ATTENTION: calling new module /usr/sbin/alt_disk_copy. Please see the alt_disk_copy man page
and documentation for more details.
Executing command: {/usr/sbin/alt_disk_copy -O -B -d "hdisk1"}
+-----------------------------------------------------------------------------+
Calling mkszfile to create new /image.data file.
Checking disk sizes.
Creating cloned rootvg volume group and associated logical volumes.
Creating logical volume alt_hd5
Creating logical volume alt_hd6
Creating logical volume alt_hd8
Creating logical volume alt_hd4
Creating logical volume alt_hd2
Creating logical volume alt_hd9var
Creating logical volume alt_hd3
Creating logical volume alt_hd1
Creating logical volume alt_hd10opt
Creating logical volume alt_hd11admin
Creating logical volume alt_livedump
Creating /alt_inst/ file system.
/alt_inst filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/admin file system.
/alt_inst/admin filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/home file system.
/alt_inst/home filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/opt file system.
/alt_inst/opt filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/tmp file system.
/alt_inst/tmp filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/usr file system.
/alt_inst/usr filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/var file system.
/alt_inst/var filesystem not converted.
        Small inode extents are already enabled.
Creating /alt_inst/var/adm/ras/livedump file system.
/alt_inst/var/adm/ras/livedump filesystem not converted.
        Small inode extents are already enabled.
Generating a list of files
for backup and restore into the alternate file system...
Backing-up the rootvg files and restoring them to the 
alternate file system...
Modifying ODM on cloned disk.
Building boot image on cloned disk.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the new
system console.
Resetting all device attributes.
NOTE: The first boot from altinst_rootvg will prompt to define the new
system console.
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var/adm/ras/livedump
forced unmount of /alt_inst/var
forced unmount of /alt_inst/var
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/usr
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/tmp
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/opt
forced unmount of /alt_inst/home
forced unmount of /alt_inst/home
forced unmount of /alt_inst/admin
forced unmount of /alt_inst/admin
forced unmount of /alt_inst
forced unmount of /alt_inst
Changing logical volume names in volume group descriptor area.
Fixing LV control blocks...
Fixing file system superblocks...

执行这个命令需要bos.alt_disk_install.rte软件包。
alt_disk_install -OCB hdisk1 
    这个命令克隆的盘,可以拿到不同硬件配置的服务器上使用,使用它进行引导时,会删除ODM库里的所有信息,根据硬件重新配置所有设备信息,相当于使用克隆盘重新安装新的系统。

alt_disk_install -CB hdisk1 
    如果是相同硬件配置的机器,则可以运行这个命令克隆磁盘,保持所有设备信息。

3.查看克隆情况。
# lspv
hdisk0          00cc1ad4ef095bf0                    rootvg          active      
hdisk1          00cc1ad46aff307f                    altinst_rootvg              

hdisk1对应的卷组名为altinst_rootvg。

# bootlist -o -m normal
cd0
hdisk0 pathid=0
ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000

查看引导列表,未发生变化。

4.重启操作系统。
# lspv
hdisk0          00cc1ad4ef095bf0                    rootvg          active      
hdisk1          00cc1ad46aff307f                    altinst_rootvg              
# bootlist -o -m normal
cd0
hdisk0 pathid=0
ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000
卷组名和引导顺序未发生变化。

5.拔掉克隆磁盘。
关闭操作系统,拔掉hdisk1,重启源服务器,查看服务器情况:
# lspv
hdisk0          00cc1ad4ef095bf0                    rootvg          active      
# lsdev -Cc disk
hdisk0 Available 01-08-00 SAS Disk Drive
hdisk1 Defined   01-08-00 SAS Disk Drive

删除被拔掉的磁盘:
# rmdev -dl hdisk1
hdisk1 deleted
# lsdev -Cc disk
hdisk0 Available 01-08-00 SAS Disk Drive

6.将克隆磁盘移植到新服务器。
    将hdisk1插入新服务器,新插入的盘不会自动引导系统的启动,需要在分区启动时进入SMS菜单,手动指定磁盘启动。

1).进入SMS菜单,选择5:


2).选择1:


3).选择7:


4).选择3引导系统:


5).选择2:


6).选择1:


7).选择2:


7.检查系统:
# lspv
hdisk0          00cc1ad46aff307f                    rootvg          active      
# lsdev -Cc disk
hdisk0 Available 00-08-00 SAS Disk Drive
# bootlist -o -m normal
cd0
-
ent0 speed=auto duplex=auto bserver=000.000.000.000 client=000.000.000.000 gateway=000.000.000.000

修改引导顺序:
# bosboot -a -d /dev/hdisk0
bosboot: Boot image is 53276 512 byte blocks.
# bootlist -o -m normal hdisk0
hdisk0 blv=hd5 pathid=0
# bootlist -o -m normal
hdisk0 blv=hd5 pathid=0

自此,分区重启即可自动启动。


二.使用U盘安装操作系统。

使用U盘安装AIX的方法描述:

USB flash disk(U-disk)
  IZ15299 6100-02
  IZ20527 5300-09
  add boot support for USB flash memory device.
  These APAR announced Nov 2008,3 years ago.
  3 type of U-disk are formally supported:
  -Lenovo USB2.0 Essential Memory Key, part number 41U4944
  -Kingston 4GB DataTraveler, USB2.0
  -SanDisk 4GB Cruzer Micro Flash Drive, USB2.0
  Procedure to create bootable U-Disk
 1)plug U-disk in USB port
 2)make sure below filesets installed.
   devices.common.IBM.usb.rte
   devices.usbif.08025002.rte
 3)Configure U-disk
  #cfgmgr -vl usb0
    
  usbms0 Available 2.3 USB Mass Storage
  #lscfg -vl usbms0
  usbms0 U78C0.001.DBJA161-D1-T1-L1 USB Mass Storage


Manufacturer................San
       Machine Type and Model......Cru
       ROM Level.(alterable).......8.01
 4)Copy ISO from DVD
  #dd if=/dev/cd0 of=/images/AIX61.iso bs=4096k
  make sure iso file is in a large file capable file system and has enough space
  #dd if=/images/AIX61.iso of=/dev/usbms0 bs=4096k
  Do not use U-disk with write protection switch.AIX will complain the U-disk
  is write protected no matter it is write protected or not.(Bug)
Procedure to install from U-disk
1)insert U-disk created in Power computer node USB port
2)activate LPAR to SMS
3)Multiboot -> Select Install/Boot Device -> Select harddisk/USB 

下面是实际的操作步骤:
# lslpp -l devices.common.IBM.usb.rte
  Fileset                      Level  State      Description         
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  devices.common.IBM.usb.rte
                             6.1.7.0  COMMITTED  USB System Software


Path: /etc/objrepos
  devices.common.IBM.usb.rte
                             6.1.4.1  COMMITTED  USB System Software 
# lslpp -l devices.usbif.08025002.rte
  Fileset                      Level  State      Description         
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  devices.usbif.08025002.rte
                            6.1.7.19  COMMITTED  USB Mass Storage Device
                                                 Software


Path: /etc/objrepos
  devices.usbif.08025002.rte
                            6.1.7.19  COMMITTED  USB Mass Storage Device
                                                 Software
# cfgmgr -vl usb0
----------------
attempting to configure device 'usb0'
Time: 0 LEDS: 0x2563
invoking /etc/methods/cfgusb -l usb0 
Number of running methods: 1
----------------
Completed method for: usb0, Elapsed time = 16
return code = 0
****************** stdout ***********
usbms0 


****************** no stderr ***********
----------------
Time: 16        LEDS: 0x539
Number of running methods: 0
----------------
attempting to configure device 'usbms0'
Time: 16        LEDS: 0x25a1
invoking /usr/lib/methods/cfgcdrom_usb -l usbms0 
Number of running methods: 1
----------------
Completed method for: usbms0, Elapsed time = 0
return code = 0
****************** no stdout ***********
****************** no stderr ***********
----------------
Time: 16        LEDS: 0x539
Number of running methods: 0
----------------
calling savebase
return code = 0
****************** no stdout ***********
****************** no stderr ***********
Configuration time: 16 seconds

# lsdev  | grep usb
usb0       Available             USB System Software
usbhc0     Available 01-08       USB Host Controller (33103500)
usbhc1     Available 01-09       USB Host Controller (33103500)
usbhc2     Available 01-0a       USB Enhanced Host Controller (3310e000)
usbms0     Available 2.3         USB Mass Storage

# lscfg -vl usbms0
  usbms0           U789C.001.DQDW860-D1-T1-L1  USB Mass Storage


        Manufacturer................SMART   
        Machine Type and Model......SMART USB 8GB   
        ROM Level.(alterable).......880C
        Serial Number...............880C

# dd if=/dev/cd0 of=/opt/AIX61.iso bs=4096k
946+1 records in.
946+1 records out.

# dd if=/opt/AIX61.iso of=/dev/usbms0 bs=4096k
946+1 records in.
946+1 records out.

在现有AIX操作系统上完成以上步骤之后, 将USB盘插入到新服务器或分区,启动分区或服务器,进入SMS菜单:
参考上面的内容选择USB引导启动,选择5:


成功通过USB引导:


之后的步骤跟CDROM安装是相同的。


--end--

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23135684/viewspace-1061552/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23135684/viewspace-1061552/

1. 准备工作..............................................................................................................2 2. BOS 安装...............................................................................................................2 3. 系统配置..............................................................................................................6 3.1. 使用 Installation Assistant 进行系统配置.................................................6 3.2. 使用 SMIT 进行系统配置......................................................................7 3.2.1. 修改系统时区(须重启) ..............................................................7 3.2.2. 修改系统时间.............................................................................. 10 3.2.3. 修改异步 IO(须重启)............................................................... 11 3.2.4. 设置 ROOT 口令.......................................................................... 11 3.2.5. 更改最大进程数 .......................................................................... 12 3.2.6. 更改系统用户数 .......................................................................... 13 3.2.7. 配置主机名和 IP 地址.................................................................. 14 3.2.8. 配置系统 PAGING SPACE(hd6)和系统文件系统...................... 16 4. 安装扩展子系统............................................................................................... 18 5. 安装 MAN 文档................................................................................................ 19 6. 系统升级.......................................................................................................... 21 6.1. 使用 update CD 升级........................................................................... 21 6.2. 使用 PTF 光盘升级............................................................................. 22 7. 安装、配置C 语言........................................................................................... 23 7.1. 安装 C 语言软件包............................................................................. 23 7.2. 配置、安装C 语言的License..................................................................... 24 7.3. 测试 C 编译器.................................................................................... 27
AIX 安装中文图解手册 1. 准备工作..............................................................................................................2 2. BOS 安装...............................................................................................................2 3. 系统配置..............................................................................................................6 3.1. 使用 Installation Assistant 进行系统配置.................................................6 3.2. 使用 SMIT 进行系统配置......................................................................7 3.2.1. 修改系统时区(须重启) ..............................................................7 3.2.2. 修改系统时间.............................................................................. 10 3.2.3. 修改异步 IO(须重启)............................................................... 11 3.2.4. 设置 ROOT 口令.......................................................................... 11 3.2.5. 更改最大进程数 .......................................................................... 12 3.2.6. 更改系统用户数 .......................................................................... 13 3.2.7. 配置主机名和 IP 地址.................................................................. 14 3.2.8. 配置系统 PAGING SPACE(hd6)和系统文件系统...................... 16 4. 安装扩展子系统............................................................................................... 18 5. 安装 MAN 文档................................................................................................ 19 6. 系统升级.......................................................................................................... 21 6.1. 使用 update CD 升级........................................................................... 21 6.2. 使用 PTF 光盘升级........
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值