Thursday, October 10, 2013

PureFlex/AIX • How to prepare a USB Mass Storage device to make the first install of VIO Server on PureFlex System

First of all you will need use another AIX machine to prepare the usb mass storage device before you plug in to a PureFlex Power node.

Be sure to have the correct fileset(s) installed before inserting your USB stick. The following file-sets are required to access a USB stick:

# lslpp -L devices.usbif.08025002.rte devices.common.IBM.usb.rte
Fileset                      Level  State  Type  Description (Uninstaller)
----------------------------------------------------------------------------
devices.common.IBM.usb.rte
                          6.1.8.15    C     F    USB System Software
devices.usbif.08025002.rte
                          6.1.8.15    A     F    USB Mass Storage Device
                                                 Software


Insert the USB stick and run cfgmgr to discover it, this command will create the a new USB Mass Storage device:

# lsdev -p usb0
usbms0          Available 2.3         USB Mass Storage


Note: For AIX 5.3, the first USB device is shown as flashdrive0.

At this point you can use the flash drive like a tape device and use the backup/restore, tar, cpio and dd commands to write to the flash drive.

---------------------------------------------------------------------------------------------------------------
Note: For more information about usb mass storage device supported by PureFlex System and Power System, please read this two links below:

AIX and USB memory sticks
https://www.ibm.com/developerworks/aix/library/au-flashdrive

Supported USB devices
http://pic.dhe.ibm.com/infocenter/flexsys/information/topic/com.ibm.acc.7895.doc/usb.html

---------------------------------------------------------------------------------------------------------------
 

Mount the VIOS base DVD and copy the VIOS mksysb image from the DVD (in /usr/sys/inst.images) to your AIX machine.

If using VIOS 1.5 or higher media, the mksysb file may be split into two parts. To combine these two parts and copy them to hard disk, run the following:

# cat /mnt/usr/sys/inst.images/mksysb_image /mnt/usr/sys/inst.images/mksysb_image2 > /export/mksysb/mksysb_image

Note: You can substitute any path you would like to save the combined mksysb image, for ‘/export//mksysb/mksysb_image'.

If using VIOS 2.2.0.0 installation media or later, there is now a 3rd mksysb image in /usr/sys/inst.images directory on volume 2. You need to copy the two mksysb images from /usr/sys/inst.images on volume 1 of the installation media to hard disk. Then mount volume 2 of the installation media and copy the third mksysb image from the /usr/sys/inst.images directory to hard disk. Once you have done this, you can use the 'cat' command to combine all 3 into one file for the mksysb resource on the AIX machine

# cat /export/mksysb/vios2.2/mksysb_image /export/mksysb/vios2.2/mksysb_image2 /export/mksysb/vios2.2/mksysb_image3 > /export/mksysb/nim_vios2.2mksysb
Note: You can substitute any path you would like to save the combined mksysb image, for ‘/export/mksysb/vios2.2/'.

Use mkdvd function of AIX to make a ISO file based on the mksysb of VIO collected of installation DVD:

# smit mkdvd
---------------------------------------------------------------------
                 Back Up This System to ISO9660 DVD

Type or select values in entry fields.
Press Enter AFTER making all desired changes.

                            [Entry Fields]
  DVD-R or DVD-RAM Device                            []
* Location of existing mksysb image                  [/export/mksysb/nim_vios2.2mksysb] <- Location of VIO mksysb
 
  File system to store DVD file structure            []
     (If blank, the file system
       will be created for you.)
 
  File system to store final DVD images              []
     (If blank, the file system
       will be created for you.)
 
  If file systems are being created:
    Volume Group for created file systems            [rootvg]
 
  Advanced Customization Options:
  Do you want the DVD to be bootable?                 yes
  Remove final images after creating DVD?             no <- Change this option of 'yes' to 'no'
  Create the DVD now?                                 no <- Change this option of 'yes' to 'no'
  Install bundle file                                []
  File with list of packages to copy to DVD          []
  Location of packages to copy to DVD                []
  Customization script                               []
  User supplied bosinst.data file                    []
  Debug output?                                       no
  User supplied image.data file                      []
---------------------------------------------------------------------


When this process finish a ISO file will be generated on /mkcd/cd_fs filesystem like this example bellow:

# ls -l /mkcd/cd_fs
total 7100352
-rw-r--r--    1 root     system   3635378176 Oct 03 14:13 cd_image_27066408


"Burn" this new ISO file in to the usb mass storage device using dd command:

# dd if=/mkcd/cd_fs/cd_image_27066408 of=/dev/usbms0 bs=4k

Test the usb mass storage device with mount command and list his content:

# mount -rv cdrfs /dev/usbms0 /mnt
# ls -l /mnt
total 80
-r--r--r--    1 root     system           24 Oct 03 11:11 OSLEVEL
dr-xr-xr-x    3 root     system         2048 Oct 03 11:02 RPMS
-r--r--r--    1 root     system         5576 Oct 04 2012  bosinst.data
dr-xr-xr-x    3 root     system         2048 Oct 03 11:03 etc
-r--r--r--    1 root     system        11252 Oct 04 2012  image.data
dr-xr-xr-x    3 root     system         2048 Oct 03 11:02 installp
dr-xr-xr-x    3 root     system         2048 Oct 03 11:02 ismp
-r--r--r--    1 root     system           52 Oct 03 11:11 mkcd.data
dr-xr-xr-x    3 root     system         2048 Oct 03 11:03 ppc
dr-xr-xr-x    4 root     system         2048 Oct 03 11:03 root
dr-xr-xr-x    3 root     system         2048 Oct 03 11:03 sbin
dr-xr-xr-x    3 root     system         2048 Oct 03 11:02 udi
dr-xr-xr-x    9 root     system         2048 Oct 03 11:03 usr


You are now ready to plug in this usb mass storage device on the usb port on front of PureFlex System Power node and perform a new installation of VIO on him.