AIX 4.3.3

  In questa pagina si elencano alcune note utili o suggerimenti che  è bene tenere in mente quando si mettono le mani per la prima volta su AIX, del quale lo scrivente ha avuto fin'ora esperienza solamente con la versione 4.3.3, non più supportata da IBM dal 2003.  Il computer su cui è stato installato è una RS6000 (serie di elaboratori poi denominata pSeries), con un microprocessore PowerPC 604d 32bit da 120 MHz.
È la prima macchina a sinistra dall'alto nell'immagine, quella più grande delle tre, sopra le due workstation SPARCStation5 della Sun Microsystems.
  Innazitutto, questo è il comando che serve per sapere quale versione di quale sistema operativo UNIX e in quale architettura ci si trova ad operare.  In una macchina RS6000 7248-120 con AIX 4.3.3, questo è quello che veniamo a sapere:

[root@viriya /root] uname -rmsv
AIX 3 4 005245814C00

  Per sapere quindi in dettaglio quali sono le caratteristiche della macchina nella quale è in esecuzione il sistema operativo, si può usare questo comando specifico per AIX:

$ lscfg -vp
INSTALLED RESOURCE LIST WITH VPD

The following resources are installed on your machine.

Model Architecture: rspc
Model Implementation: Uni-Processor, PCI bus

sysplanar0       00-00            System Planar
 bus0              00-00            PCI Bus
 bus1              04-A0            ISA Bus
 paud0             01-B0            Ultimedia Integrated Audio
 fda0              01-C0            Standard I/O Diskette Adapter
 fd0               01-C0-00-00      Diskette Drive
 ppa0              01-D0            Standard I/O Parallel Port Adapter
 lp0               01-D0-00-00      Hewlett-Packard LaserJet 4 Plus
 ide0              01-E0            ATA/IDE Controller Device
 ide1              01-F0            ATA/IDE Controller Device
 sa0               01-G0            Standard I/O Serial Port 1
 sa1               01-H0            Standard I/O Serial Port 2
 sioka0            01-I0            Keyboard Adapter
 kbd0              01-I0-00-00       PS/2 keyboard
 sioma0            01-J0            Mouse Adapter
 mouse0            01-J0-00-00      3 button mouse
 pmc0              01-A0            Power Management Controller
 scsi0             04-B0            Standard SCSI I/O Controller
 hdisk0            04-B0-00-0,0     Other SCSI Disk Drive

Manufacturer................SEAGATE
       Machine Type and Model......ST34572N
       Part Number.................7 Seagate Al
       ROS Level and ID............30383736
       Serial Number...............JKZ10769
       EC Level....................l rights r
       Device Specific.(Z0)........000002028B00001E
       Device Specific.(Z1)........
       Device Specific.(Z2)........opyr
       Device Specific.(Z3)........ight
       Device Specific.(Z4)........c) 1
       Device Specific.(Z5)........99

 hdisk1           04-B0-00-1,0      Other SCSI Disk Drive

       Manufacturer................SEAGATE
       Machine Type and Model......ST34520N
       Part Number.................7 Seagate Al
       ROS Level and ID............31343938
       Serial Number...............AYY26811
       EC Level....................l rights r
       FRU Number..................eserved 1476
       Device Specific.(Z0)........000002028F000012
       Device Specific.(Z1)........
       Device Specific.(Z2)........opyr
       Device Specific.(Z3)........ight
       Device Specific.(Z4)........c) 1
       Device Specific.(Z5)........99

 cd0              04-B0-00-3,0      Other SCSI CD-ROM Drive

Manufacturer................TEAC
       Machine Type and Model......CD-ROM CD-532S
       ROS Level and ID............3.0A
       Device Specific.(Z0)........058002021F000098

 rmt0             04-B0-00-4,0      4.0 GB 4mm Tape Drive

       Manufacturer................ARCHIVE
       Machine Type and Model......IBM4326NP/RP  !D
       Device Specific.(Z1)........5800
       Serial Number...............DR0BDC2 0011
       Device Specific.(LI)........0011
       Part Number.................59H2681
       FRU Number..................59H2683
       EC Level....................E30210
       Device Specific.(Z0)........0180020283000018
       Device Specific.(Z3)........L1

 iga0             04-C0            E15 Graphics Adapter
 ent0             04-D0            IBM PCI Ethernet Adapter (22100020)

       Network Address.............08005AF891FE
       Displayable Message.........PCI Ethernet Adapter (22100020)

 mem0             00-00            Memory
 proc0            00-00            Processor
 L2cache0         00-00            L2 Cache

  Altre informazioni sono ottenibili dal comando bootinfo.  Dalla sua pagina di manuale si legge siano ottenibili queste informazioni (tra le altre):
-b Returns the last boot device.
-B Disk Displays a 1 if the IPL code in the ROS on the machine running the
   command is capable of booting from the specified disk. Otherwise, the command
   displays a 0.
-o Disk Displays either the disk device name or the location depending upon the
   value of disk.
-r Displays amount of real memory in kilobytes.
-s Disk Displays disk size in megabytes.
-t Specifies the type of boot. The return values include:
   1 Disk boot
   3 CD-ROM boot
   4 Tape boot
   5 Network boot
-T Displays the hardware platform type of the running machine. Machines with
   fundamental differences, such as different types of busses, may have
   different hardware platform types. For more information see the bosboot
   command.
-z Specifies whether the machine hardware is MP-capable (capable of running the
   multi-processor kernel and supporting more than one processor). The return
   value indicates:
   0 The machine is not MP-capable.
   1 The machine is MP-capable.
  E queste sono le informazioni che ciascuna opzione ha fornito:

[root@viriya /root] bootinfo -t
1
[root@viriya /root] bootinfo -b
hdisk0
[root@viriya /root] bootinfo -B hdisk0
1
[root@viriya /root] bootinfo -o hdisk0
04-B0-00-0,0
[root@viriya /root] bootinfo -s hdisk0
4340
[root@viriya /root] bootinfo -B hdisk1
1
[root@viriya /root] bootinfo -o hdisk1
04-B0-00-1,0
[root@viriya /root] bootinfo -s hdisk1
4340
[root@viriya /root] bootinfo -r
196608
[root@viriya /root] bootinfo -z
0
[root@viriya /root] bootinfo -T
rspc



PROBLEMI E LORO RISOLUZIONI

  Dopo l'aggiornamento del sistema al fileset 4330011 (vedi nel seguito), lanciando Netscape si aveva questo errore:

$ netscape

exec(): 0509-036 Cannot load program /usr/netscape/communicator/us/netscape_aix4 because of the following errors:
        0509-130 Symbol resolution failed for /usr/lib/libpthreads.a(shr.o) because:
        0509-136 Symbol thread_unlock (number 124) is not exported from
                 dependent module /usr/netscape/communicator/lib433/libc_r.a(shr.o).
        0509-136 Symbol thread_waitlock (number 125) is not exported from
                 dependent module /usr/netscape/communicator/lib433/libc_r.a(shr.o).
                 0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.

Per rimediare, si è dovuto fare questo:

[root@viriya /root] mv /usr/netscape/communicator/lib433/libc.a /usr/netscape/communicator/lib433/libc.a.bak
[root@viriya /root] ln -s ../../../ccs/lib/libc.a /usr/netscape/communicator/lib433/libc.a



AGGIORNAMENTO FILESET

  Per aggiornare il sistema dopo l'installazione del sistema operativo base (BOS: Basic Operating System), si deve andare sul sito IBM https://techsupport.services.ibm.com/server/mlfixes/43/11/00to11.html (non più disponibile a marzo 2009) per scaricare il grosso file di archivio contenente gli ultimi aggiornamenti ufficiali per questo sistema operativo, che risalgono al marzo 2003.  Ne sono stati rilasciate undici versioni.  Nel seguito si indicano le operazioni da effettuarsi per aggiornare un BOS al quale non è mai stato applicato alcun fileset di aggiornamento all'ultima versione disponibile, la 11.
 Quando è stato visitato l'ultima volta  (il 19  febbraio 2006) riportava queste informazioni:

AIX 4300-11 maintenance package
Recommended maintenance for AIX 4.3.3


The designation 4330-11 indicates that this package updates AIX 4.3.3 from base level (no maintenance level) to maintenance level 11 (4330-11). IBM recommends that all customers install the latest available maintenace package for their AIX release.

To determine if AIX 4330-11 is already installed on your system, run the following command:
oslevel -r

General description

This package contains code corrections for the AIX operating system and many related subsystems. Unless otherwise stated, this package is released for all languages. For additional information, refer to the Package information

Download and install instructions

Package Released Size (Bytes)
4330011.tar.gz (See Note) 02/05/03 271,108,993
Additional space needed to extract the filesets 376,064,000

Note: IBM recommends that you create a separate file system for /usr/sys/inst.images to prevent the expansion of the /usr file system. For more information, see the Installation tips.
  1. Click on the package name above.
  2. Put the package (a tar.gz file) in /usr/sys/inst.images
  3. Extract the filesets from the package.
    1. cd /usr/sys/inst.images
    2. gzip -d -c 4330011.tar.gz | tar -xvf -
  4. Back up your system.
  5. Install the package by creating a table of contents for install to use. Then update the install subsystem itself. Run SMIT to complete the installation.
    1. inutoc /usr/sys/inst.images
    2. installp -acgXd /usr/sys/inst.images bos.rte.install
    3. smit update_all
  6. Reboot your system. This maintenance package replaces critical operating system code.

  I collegamenti alle pagine Package infomation (javascript:openWindow('43/11/00to11pkgInfo.html');, che mandava a: https://techsupport.services.ibm.com/server/mlfixes/43/11/00to11pkgInfo.html) e Installation tips (javascript:openWindow('43/11/4330-11tips.html');, che mandava a: https://techsupport.services.ibm.com/server/mlfixes/43/11/4330-11tips.html) non sono più disponibili a marzo 2009.  Il servizio FTP per scaricare i fileset invece risulta ancora attivo.

  La pagina contenente i suggerimenti per l'installazione (Installation tips) conteneva invece queste informazioni:

Installation Tips
AIX 4330-10 Maintenance Package

Always read the package information.

IBM recommends that you create a separate file system for /usr/sys/inst.images to prevent the expansion of the /usr file system. Downloaded fix packages require a significant amount of disk space. By creating a separate file system, you can avoid expanding the /usr file system.

Always run the inutoc command to ensure the installation subsystem will recognize the new fix packages you download.

The most common installation procedure is to use smit update_all

For the INPUT device / directory field, specify /usr/sys/inst.images.

You may wish to retain this package for future use. When you install additional operating system software you will want to use this package to bring the additional software up to this maintenance level.


  Il primo comando che compare nella prima pagina, subito dopo l'installazione del BOS, non implementa ancora l'opzione -r:

$ oslevel -r
Usage: oslevel [ -l <level> | -g | -q ]
     -l : List filesets at levels earlier than maintenance level
          specified by the <level> parameter
     -g : List filesets at levels later than most recent
          complete maintenance level
     -q : List names of known maintenance levels which may be
          specified with the -l flag

  Output indicates that base system software is entirely at
  or above a particular maintenance level. Corresponding output
  would be 4.1.1.0 first AIX 4.1 maintenance level.

  The additional options may be specified to determine which
  filesets differ from the maintenance level.

  È stato seguito il suggerimento di creare un filesystem separato in /usr/sys/inst.images dove espandere il corposo archivio del fileset di aggiornamento.  Avendo a disposizione un disco rigido nel computer ancora inutilizzato, si è voluto aggiungerlo al gruppo di volume rootvg per poterne disporre.  Il gruppo di volume può contenere numerose unità fisiche, in modo da disporre del loro spazio d'immagazzinamento a prescindere dalla capacità delle singole unità.  Questo spazio d'immagazzinamento può poi essere ripartito in filesystem separati.
  Per aggiungere una nuova unità fisica (un disco) al gruppo di volume, da SMIT si fa:
System Management ->
  System Storage Management (Physical & Logical Storage) ->
  Logical Volume Management -> Volume Groups ->
  Set Characteristics of a Volume Group ->
  Add a Physical Volume to a Volume Group

        Volume group name      rootvg
        Physical volume names  hdisk1
Comando risultante: extendvg -f 'rootvg' 'hdisk1'
Eseguito da terminale, si è avuto il seguente messaggio d'errore:

0516-086 linstallpv: Volume group descriptor area has a bad block.
0516-628 extendvg: Warning, cannot install physical volume hdisk1
         in volume group rootvg.

  La soluzione di questo problema è costata la formattazione a basso livello del disco rigido dal System Management Services (qui se ne trova una copia di scorta dell'immagine del floppy) e la reinstallazione del sistema operativo.  Probabilmente ci si era dimenticato di effettuare questa operazione prima della prima installazione del BOS sui nuovi dischi rigidi.
  Comunque, la seconda volta che è stato installato il BOS sono stati selezionati entrambi i dischi rigidi per essere inclusi nel gruppo di volume rootvg e quindi non c'è più stato bisogno di eseguire il comando extendvg.  È bastato definire il nuovo file system aggiungendolo al gruppo di volume principale, rootvg.  Con SMIT si è proceduto così:
System Management ->
  System Storage Management (Physical & Logical Storage) ->
  File Systems ->
  Add / Change / Show / Delete File Systems -> Journaled File Systems ->
  Add a Journaled File System -> Add a Standard Journaled File System

        Volume group name                              rootvg
        SIZE of file system (in 512-byte blocks)(Num.)   4194304
        MOUNT POINT                                      /usr/sys/inst.images
        Mount AUTOMATICALLY at system restart?           no
        PERMISSIONS                                      read/write
        Mount OPTIONS
        Start Disk Accounting?                           no
        Fragment Size (bytes)                            4096
        Number of bytes per inode                        4096
        Allocation Group Size (MBytes)                   8
  Il valore di 4194304 blocchi di 512 byte equivale a 2 Gbyte.
  Il comando risultante è:

rfs -v jfs -g'rootvg' -a size='4194304' -m'/usr/sys/inst.images' -A''`locale nostr | awk -F: '{print $1}'`'' -p'rw' -t''`locale nostr | awk -F: '{print $1}'`'' -a frag='4096' -a nbpi='4096' -a ag='8'

Note per seguire cosa succede nella lunga linea di comando espressa sopra:

[root@viriya /root] locale nostr
no:n:N
[root@viriya /root]
echo `locale nostr | awk -F: '{print $1}'`
no

Quindi:

rfs -v jfs -g'rootvg' -a size='4194304' -m'/usr/sys/inst.images' -A'no' -p'rw' -t'no' -a frag='4096' -a nbpi='4096' -a ag='8'

  In seguito è stato modificato il file /etc/filesystems perché contenesse la seguente descrizione del nuovo punto di montaggio del file system appena creato:

/usr/sys/inst.images:
        dev             = /dev/lv00
        vfs             = jfs
        log             = /dev/hd8
        mount           = false
        options         = rw
        account         = false


   Così è ora possibile montare il nuovo filesystem:

[root@viriya /root] mount /usr/sys/inst.images
[root@viriya /root] df /usr/sys/inst.images
Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
/dev/lv00        4194304   4062552    4%       17     1% /usr/sys/inst.images


  Si è colta l'occasione per introdurre anche la descrizione del mount-point del CD-Rom nel file /etc/filesystems:

/mnt/cdrom:
        dev             = /dev/cd0
        vfs             = cdrfs
        mount           = false
        options         = ro
        check           = false


  Per installare il fileset, lo si deve prima decomprimere, essendo questo un archivio .tar compresso con gzip.  Nel sistema operativo appena installato però il comando gzip non è disponibile.  Si è scelto d'installare quello disponibile sul deposito di software per AIX della IBM "AIX Toolbox for Linux Applications":
ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/gzip/gzip-1.2.4a-7.aix4.3.ppc.rpm.
  Per installarlo però serve di avere a disposizione il comando rpm, perché quel pacchetto di gzip è in quel formato, non nel vecchio formato nativo AIX.  Si deve allora installare il pachetto rpm scaricandolo dallo stesso sito dove è disponibile nel vecchio formato di archivio AIX:
 ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/INSTALLP/ppc/rpm.rte.

  Seguendo le istruzioni fornite su ftp://ftp.software.ibm.com/aix/freeSoftware/aixtoolbox/README.aix433, si è prima creato il filesystem /opt/freeware:

System Management ->
  System Storage Management (Physical & Logical Storage) ->
  File Systems -> Add / Change / Show / Delete File Systems ->
  Journaled File System ->
  Add a Journaled File System -> Add a Standard Journaled File System

        Volume group name                        rootvg
        SIZE of file system (in 512-byte blocks) 1048576
        MOUNT POINT                              /opt/freeware
        Mount AUTOMATICALLY at system restart?   yes
        PERMISSIONS                              read/write
        Mount OPTIONS
        Start Disk Accounting?                   no
        Fragment Size (bytes)                    4096
        Number of bytes per inode                4096
        Allocation Group Size (MBytes)           8

  Nel file /etc/filesystems è apparso:

/opt/freeware:
        dev             = /dev/lv01
        vfs             = jfs
        log             = /dev/hd8
        mount           = automatic
        options         = rw
        account         = false


  Lo si è montato:

[root@viriya /root] mount /opt/freeware
[root@viriya /root] df -k /opt/freeware
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/lv01          524288    507780    4%       17     1% /opt/freeware


  Per prepararsi a installare il pacchetto:

[root@viriya /root] mv rpm.rte /usr/sys/inst.images/
[root@viriya /root] inutoc /usr/sys/inst.images


  Ora, per vedere cosa succederebbe s'installasse il pacchetto senza veramente installarlo, si può fare così:

[root@viriya /root] installp -pacgXd /usr/sys/inst.images rpm.rte

[...]

FAILURES
--------
  Filesets listed in this section failed pre-installation verification
  and will not be installed.

  Requisite Failures
  ------------------
  SELECTED FILESETS:  The following is a list of filesets that you asked to
  install.  They cannot be installed until all of their requisite filesets
  are also installed.  See subsequent lists for details of requisites.

    rpm.rte 3.0.5.39                          # RPM Package Manager

  MISSING REQUISITES:  The following filesets are required by one or more
  of the selected filesets listed above.  They are not currently installed
  and could not be found on the installation media.

    bos.rte.libc 5.1.0.0                      # Base Level Fileset

  << End of Failure Section >>

[...]

  Bene, abbiamo scoperto che il pacchetto scaricato dal sito IBM è per AIX versione 5.1.
La stessa cosa vale per i pacchetti delle versioni 3.0.5.38 e 3.0.5.37, che si sono provati ad installare in modalità fittizia con questi comandi, dopo aver posto i relativi file nella stessa directory del file rpm.rte e aver rieseguito il comando inutoc /usr/sys/inst.images:

[root@viriya /root] installp -pacgXd /usr/sys/inst.images rpm.rte 3.0.5.38
[root@viriya /root] installp -pacgXd /usr/sys/inst.images rpm.rte 3.0.5.37


  Alla fine però, scaricato il file rpm.rte.3.0.5.36, è andato tutto a posto:

# installp -pacgXd /usr/sys/inst.images rpm.rte 3.0.5.36
*******************************************************************************
installp PREVIEW:  installation will not actually occur.
*******************************************************************************

+-----------------------------------------------------------------------------+
                    Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
  Filesets listed in this section passed pre-installation verification
  and will be installed.

  Selected Filesets
  -----------------
  rpm.rte 3.0.5.36                            # RPM Package Manager

  << End of Success Section >>

FILESET STATISTICS
------------------
    1  Selected to be installed, of which:
        1  Passed pre-installation verification
  ----
    1  Total to be installed

RESOURCES
---------
  Estimated system resource requirements for filesets being installed:
                (All sizes are in 512-byte blocks)
      Filesystem                     Needed Space             Free Space
      /                                      80                   7608
      /usr                                 6176                  28280
      /var                                  152                  13080
      /opt/freeware                          56                1015560
      -----                            --------                 ------
      TOTAL:                               6464                1064528

  NOTE:  "Needed Space" values are calculated from data available prior
  to installation.  These are the estimated resources required for the
  entire operation.  Further resource checks will be made during
  installation to verify that these initial estimates are sufficient.

******************************************************************************
End of installp PREVIEW.  No apply operation has actually occurred.
******************************************************************************


  Installiamolo per davvero:

[root@viriya /root] installp -acgXd /usr/sys/inst.images rpm.rte 3.0.5.36

[...]

ERROR: /opt/freeware exists, but it is not the same directory
       as /usr/opt/freeware.  Correct the condition by linking
       /opt/freeware and /usr/opt/freeware or by removing
       /opt/freeware.>

instal:  Failed while executing the rpm.rte.pre_i script.


[...]

+-----------------------------------------------------------------------------+
                                Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
rpm.rte                     3.0.5.36        USR         APPLY       FAILED
rpm.rte                     3.0.5.36        USR         CLEANUP     SUCCESS

  Per rimediare, visto che la directory /usr/opt/freeware non esisteva ancora, si è creato un collegamento simbolico da questa verso /opt/freeware:

[root@viriya /root] ln -s /usr/opt/freeware /opt/freeware
[root@viriya /root] installp -acgXd /usr/sys/inst.images rpm.rte 3.0.5.36

[...]

+-----------------------------------------------------------------------------+
                                Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
rpm.rte                     3.0.5.36        USR         APPLY       SUCCESS
rpm.rte                     3.0.5.36        ROOT        APPLY       SUCCESS


  Ora si possono installare tutti i pacchetti RPM disponibili sul server "AIX Toolbox for Linux Applications".

[root@viriya /root] rpm --test --install RPMS/gzip-1.2.4a-7.aix4.3.ppc.rpm
[root@viriya /root] rpm --install RPMS/gzip-1.2.4a-7.aix4.3.ppc.rpm
[root@viriya /root] which gzip
/usr/bin/gzip
[root@viriya /root]  ls -l /usr/bin/gzip
lrwxrwxrwx   1 root     system        27 Feb 25 17:45 /usr/bin/gzip -> ../../opt/freeware/bin/gzip

  Ora è possibile decomprimere e spacchettare l'archivio del fileset contenuto nel CDROM:

[root@viriya /root] cd /usr/sys/inst.images
[root@viriya /root] gzip -dc /mnt/cdrom/4330011.tar.gz | tar -vtf -
x U455984.bff, 14336 bytes, 28 media blocks.
x U461291.bff, 7168 bytes, 14 media blocks.
x U466229.bff, 27648 bytes, 54 media blocks.

[...]

x U485725.bff, 35840 bytes, 70 media blocks.
x U485726.bff, 26624 bytes, 52 media blocks.
x U485727.bff, 45056 bytes, 88 media blocks.
[root@viriya /root]
inutoc /usr/sys/inst.images
[root@viriya /root] installp -acgXd /usr/sys/inst.images bos.rte.install

[...]

Installation Summary --------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
bos.rte.install             4.3.3.81        USR         APPLY       SUCCESS
bos.rte.install             4.3.3.81        USR         COMMIT      SUCCESS

[root@viriya /root]
smit update_all
* INPUT device / directory for software              [/usr/sys/inst.images]   +

* INPUT device / directory for software               /usr/sys/inst.images
* SOFTWARE to update                                  _update_all
  PREVIEW only? (update operation will NOT occur)     no                      +
  COMMIT software updates?                            yes                     +
  SAVE replaced files?                                no                      +
  AUTOMATICALLY install requisite software?           yes                     +
  EXTEND file systems if space needed?                yes                     +
  VERIFY install and check file sizes?                no                      +
  DETAILED output?                                    no                      +


  L'aggiornamento è terminato dopo circa mezz'ora.

[root@viriya /root] oslevel -r
4330-11
[root@viriya /root]
shutdown -r now



Ultimo aggiornamento: 30 marzo 2009

< Torna al livello superiore <
<< Torna alla pagina principale <<