IBM Support

How to build the mksysb file for VIOS 3.1 Migration / Installation ?

Question & Answer


Question

How to build the mksysb file for VIOS 3.1 Migration / Installation ?

Answer

First of all you need to get the ISO image file for VIOS 3.1 installation.

You should be able to get it from the ESS site (you need a valid SWMA contract):

https://www.ibm.com/servers/eserver/ess/OpenServlet.wss


There's 2 different versions of the installation image :
$ ls -l
total 20441672
-rwxr-xr-x 1 root system 4488343552 Jan 04 05:30 Virtual_IO_Server_Base_Install_3.1.0.0_DVD_1_of_2_112018.iso
-rwxr-xr-x 1 root system 1366530048 Jan 04 05:49 Virtual_IO_Server_Base_Install_3.1.0.0_DVD_2_of_2_112018.iso
-rwxr-xr-x 1 root system 4611252224 Jan 04 06:52 Virtual_IO_Server_Base_Install_3.1.0.10_Flash_112018.iso

The 2 first files are the "standard" ISO image, with splitted mksysb file, we'll see later how to build the final mksysb image using those files.

The third file, we'll call it "Flash" version, was built so that the mksysb will be on a single image.

The following command were performed on a NIM master, but you can use the same procedure on a VIOS.

If done on VIOS? you'll have to use the "oem_setup_env" command to get super user privilege.

NOTE : This technote was written in the idea to build resources on a NIM master, and thus we create the files in "/export" filesystem. But if you plan to create the file on the VIOS itself, the "/export" filesystem does not exist, in that case you can use "/home/padmin" instead, but make sure before starting operation that you'll have enough free space in the "/home" filesystem. (Do not use /export. If there's not such filesystem on the VIOS and you create directory, this will fullfill the "/" filesystem, and may cause hang or crash of the VIOS)

Build the mksysb file using "Flash" version :

We'll have to mount the ISO image, and extract the correct mksysb file.

$ mkdir /mnt/dvd
$ loopmount -i Virtual_IO_Server_Base_Install_3.1.0.10_Flash_112018.iso -o "-V udfs -o ro" -m /mnt/dvd
$ ls -l /mnt/dvd/usr/sys/inst.images
total 1630976
dr-xr-xr-x 2 root system 2048 Oct 30 2018 installp
-r--r--r-- 1 root system 3340236800 Oct 30 2018 mksysb_image
$ cp /mnt/dvd/usr/sys/inst.images/mksysb_image /export/mksysb/VIO31/VIO_3.1_Flash.mksysb

Note : Pay attention that in this process you must specify the filesystem type as "udfs". Otherwise, AIX will fail to read the file correctly.

Build the mksysb file using the "standard" version :

Here, we'll have to mount the 2 ISO image concurrently, and extract all "mksysb files" to build the final one.

$ mkdir /mnt/dvd1
$ mkdir /mnt/dvd2
$ loopmount -i Virtual_IO_Server_Base_Install_3.1.0.0_DVD_1_of_2_112018.iso -o "-V cdrfs -o ro" -m /mnt/dvd1
$ loopmount -i Virtual_IO_Server_Base_Install_3.1.0.0_DVD_2_of_2_112018.iso -o "-V cdrfs -o ro" -m /mnt/dvd2
$ ls -l /mnt/dvd1/usr/sys/inst.images
total 6289924
drwxr-xr-x 3 root system 2048 Oct 18 2018 installp
-rw-r--r-- 1 root system 2146959360 Oct 18 2018 mksysb_image
-rw-r--r-- 1 root system 1073479680 Oct 18 2018 mksysb_image2
$ ls -l /mnt/dvd2/usr/sys/inst.images
total 233884
drwxr-xr-x 3 root system 2048 Oct 18 2018 installp
-rw-r--r-- 1 root system 119746560 Oct 18 2018 mksysb_image
$ cat /mnt/dvd1/usr/sys/inst.images/mksysb_image /mnt/dvd1/usr/sys/inst.images/mksysb_image2 /mnt/dvd2/usr/sys/inst.images/mksysb_image > /export/mksysb/VIO31/VIOS_3.1_standard.mksysb


Note : For VIOS 4.1 image, the non-Flash version now contains one single DVD media, so the appropriate command to build the mksysb image is :
$ cat /mnt/dvd1/usr/sys/inst.images/mksysb_image /mnt/dvd1/usr/sys/inst.images/mksysb_image2 > /export/mksysb/VIO31/VIOS_3.1_standard.mksysb

Build the mksysb using the viosupgrade command :
Since VIOS version 2.2.6.51, the "viosupgrade" command may be used to automatically build the mksysb image.
 
Copy the ISO file(s) downloaded from ESS site on the VIOS in "/home/padmin/ISO31", and use the following command : 
 $ mkdir /home/padmin/mksysb
 $ viosupgrade -I /home/padmin/ISO31/Virtual_IO_Server_Base_Install_3.1.0.0_DVD_1_of_2_112018.iso:/home/padmin/ISO31/Virtual_IO_Server_Base_Install_3.1.0.0_DVD_2_of_2_112018.iso -w /home/padmin/mksysb

 
Note : This option is only available with the standard version including 2 ISO file. It does not work with the "flash" version.
 

How to check the mksysb image built is correct ?

Before using the created mksysb to migrate or install VIOS we need to check file consistency and readiness, to do so we'll use the restore command to list the content of the file generated :

$ restore -Tvqf /export/mksysb/VIO31/VIOS_3.1_standard.mksysb
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Thu Oct 18 22:04:32 CEST 2018
Files are backed up by name.
The user is .
5578 ./bosinst.data
11 ./tmp/vgdata/rootvg/image.info
11308 ./image.data
285746 ./tmp/vgdata/rootvg/backup.data
<-- snip -->
21 ./unix
0 ./var
0 ./proc
0 ./aha
The total size is 4400907579 bytes.
The number of archived files is 78277.
$ echo $?

This command should not prompt for a volume and the return code must be 0. If either of those conditions exist, do not use this mksysb image for anything, there's something wrong with it.

A "failed" mksysb image may provide the following error message :

<-- snip -->
36688 ./opt/IBM/ldap/V6.4/lib64/idsldap_plugin_sasl_digest-md5.a
38 ./opt/IBM/ldap/V6.4/lib64/libibmldap.a
37680 ./opt/IBM/ldap/V6.4/lib64/libibmldapdbg.a
772487 ./opt/IBM/ldap/V6.4/lib64/libibmldapn.a
Mount volume 2 on /export/mksysb/VIO31/VIOS_3.1_standard.mksysb.
Press the Enter key to continue.

In that case, please re-run the same procedure and make sure :
- no "mksysb" files were omitted in the cat command
- all the "mksysb" files were concatenated in correct order : DVD1 mksysb_image; DVD1 mksysb_image2; DVD2 mksysb_image
If problem persists contact support center for further investigation.

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"ARM Category":[{"code":"a8m3p000000PCZiAAO","label":"viosupgrade"}],"ARM Case Number":"","Platform":[{"code":"PF002","label":"AIX"}],"Version":"3.1.0;4.1.0"}]

Document Information

Modified date:
19 June 2024

UID

ibm10795288