AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

AIX 7.2 Bash installation error unexpected result

  • 1.  AIX 7.2 Bash installation error unexpected result

    Posted Thu September 19, 2019 09:11 AM

    Originally posted by: FF_Jelle


    Hello,

    After installing the bash-4.4-3.aix6.1.ppc rpm downloaded from the AIX Toolbox for Linux Applications on a clean AIX 7.2 host, I get the following info/error message:

    ## Binary "bash" is available in 32bit and 64bit ##
    
            The default used is 64bit
    
            If 32 bit is needed, please change symbolic link
            for "bash" in /bin directory
            To do that type:
                    # rm -f /bin/bash
                    # ln -sf /opt/freeware/bin/bash_32 /bin/bash
    
    cp: /bin/bash: A file or directory in the path name does not exist.
    rpm_share: 0645-007 ATTENTION: update_file() returned an unexpected result.
    rpm_share: 0645-007 ATTENTION: update_inst_root() returned an unexpected result.
    

    The main issue is that the /bin/bash symbolic link is missing.

    I have found the following article, although it applies to AIX 7.1: https://www-01.ibm.com/support/docview.wss?uid=isg1IJ00512

    Our bos.rte.install fileset is at the following level, so this does not seem to be the problem:

    # lslpp -L | grep bos.rte.install
      bos.rte.install            7.2.2.1    C     F    LPP Install Commands
    

    We would like to solve this issue, since we don't want to manually create the bash symbolic link every time we install the rpm on a new server.

    Any advice on how to solve this problem?



  • 2.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Thu September 19, 2019 03:23 PM

    Originally posted by: sangameshm


    Is this installation tried on chrooted environment ?

    If the failure is in chroot environment, then this needs to be checked with install team to confirm if we have same issue with 7.2.2.1 image.

     

    Thanks,

    Sangamesh

     



  • 3.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Fri September 20, 2019 04:31 AM

    Originally posted by: FF_Jelle


    I'm actually not sure. I don't think so, since I have not run anything on the AIX host except for the installation commands.

    The libraries and binaries do get installed to /opt/freeware/lib and /opt/freeware/bin by default.

    How do I verify I'm working in a chrooted environment or not? This command I've found gives the following output:

    # ls -di /
        2 /
    

     



  • 4.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Fri September 20, 2019 11:53 AM

    Originally posted by: sangameshm


    I think better here is to debug /usr/lib/instl/baselib_sh script.

    To start with try and see if you can add "set -x" to the  get_rpm_inst_root_list() function which would give little more idea.

     

    This is what i am seeing in my case.

     

    + read NODE
    + check_node /bin/bash
    + + whichfs /bin/bash
    FS=/opt
    + is_path_in_root_part /opt
    + [[ 1 -eq 0 ]]
    + [[ ! -L /bin/bash ]]
    + + getpdir /bin/bash
    PARENT=/bin
    + + whichfs /bin
    FS=/usr
    + is_path_in_root_part /usr
    + read NODE
    + check_node /bin/bash2_32
    + + whichfs /bin/bash2_32
    FS=/opt
    + is_path_in_root_part /opt
    + [[ 1 -eq 0 ]]
    + [[ ! -L /bin/bash2_32 ]]
    + + getpdir /bin/bash2_32
    PARENT=/bin
    + + whichfs /bin
    FS=/usr
    + is_path_in_root_part /usr
    + read NODE
    + check_node /bin/bash2_64
    + + whichfs /bin/bash2_64
    FS=/opt

     

    Thanks,

    Sangamesh

     



  • 5.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Tue September 24, 2019 05:56 AM

    Originally posted by: FF_Jelle


    Here's the full output with the added "set -x":

     

    # rpm -ivh bash-4.4-3.aix6.1.ppc.rpm
    Preparing...                          ################################# [100%]
    Updating / installing...
       1:bash-4.4-3                       ################################# [100%]
    
            ## Binary "bash" is avaible in 32bit and 64bit ##
    
            The default used is 64bit
    
            If 32bit is needed, please change symbolic link
            for "bash" in /bin directory
            To do that type:
                    # rm -f /bin/bash
                    # ln -sf /opt/freeware/bin/bash_32 /bin/bash
    + typeset ERROR=eval pmerror "get_rpm_inst_root_list()"; return 1
    + typeset TF1=/tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105
    + typeset TF2=/tmp/.workdir.22282616.16056576_1/tmpfile2.16056576.32741
    + typeset NODE
    + typeset FS
    + typeset PARENT
    + /usr/bin/rm -f /tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105 /tmp/.workdir.22282616.16056576_1/tmpfile2.16056576.32741
    + /usr/opt/freeware/bin/rpm -qal
    + 1> /tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105
    + ck_exp_fs /tmp/.workdir.22282616.16056576_1 1024
    + /usr/bin/awk { if(($0 ~ "^/.*$") &&
          ($0 !~ "^/opt/.*|^/usr/.*")) print } /tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105
    + 1> /tmp/.workdir.22282616.16056576_1/tmpfile2.16056576.32741
    + /usr/bin/rm -f /tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105
    + /usr/bin/sort -u /tmp/.workdir.22282616.16056576_1/tmpfile2.16056576.32741 -o /tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105
    + 0< /tmp/.workdir.22282616.16056576_1/tmpfile1.16056576.30105
    + read NODE
    + check_node /bin/bash
    + + whichfs /bin/bash
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /bin/bash
    + continue
    + read NODE
    + check_node /bin/bash2_32
    + + whichfs /bin/bash2_32
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /bin/bash2_32
    + continue
    + read NODE
    + check_node /bin/bash2_64
    + + whichfs /bin/bash2_64
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /bin/bash2_64
    + continue
    + read NODE
    + check_node /bin/bash_32
    + + whichfs /bin/bash_32
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /bin/bash_32
    + continue
    + read NODE
    + check_node /bin/bash_64
    + + whichfs /bin/bash_64
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /bin/bash_64
    + continue
    + read NODE
    + check_node /etc/rc.d/init.d/sudo
    + + whichfs /etc/rc.d/init.d/sudo
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /etc/rc.d/init.d/sudo
    + continue
    + read NODE
    + check_node /etc/sudoers
    + + whichfs /etc/sudoers
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /etc/sudoers
    + continue
    + read NODE
    + check_node /etc/sudoers.d
    + + whichfs /etc/sudoers.d
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /etc/sudoers.d
    + continue
    + read NODE
    + check_node /opt
    + + whichfs /opt
    FS=/
    + is_path_in_root_part /
    + [[ 0 -eq 0 ]]
    + echo /opt
    + continue
    + read NODE
    + check_node /var
    + + whichfs /var
    FS=/var
    + is_path_in_root_part /var
    + [[ 0 -eq 0 ]]
    + echo /var
    + continue
    + read NODE
    + check_node /var/lib
    + + whichfs /var/lib
    FS=/var
    + is_path_in_root_part /var
    + [[ 0 -eq 0 ]]
    + echo /var/lib
    + continue
    + read NODE
    + check_node /var/lib/sudo
    + + whichfs /var/lib/sudo
    FS=/var
    + is_path_in_root_part /var
    + [[ 0 -eq 0 ]]
    + echo /var/lib/sudo
    + continue
    + read NODE
    + check_node /var/lib/sudo/lectured
    + + whichfs /var/lib/sudo/lectured
    FS=/var
    + is_path_in_root_part /var
    + [[ 0 -eq 0 ]]
    + echo /var/lib/sudo/lectured
    + continue
    + read NODE
    + return 0
    cp: /bin/bash: A file or directory in the path name does not exist.
    rpm_share: 0645-007 ATTENTION: update_file() returned an unexpected result.
    rpm_share: 0645-007 ATTENTION: update_inst_root() returned an unexpected result.
    

     



  • 6.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Wed September 25, 2019 02:47 PM

    Originally posted by: sangameshm


    Looking at the logs it shows /bin/bash is part of / instead of /opt.

    Is this installation is being run on private wpar ?

     

    Thaks,

    Sangamesh



  • 7.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Thu September 26, 2019 05:08 AM

    Originally posted by: FF_Jelle


    I think it is not being run on private wpar. See following output:

    # lsvg
    rootvg
    # lsvg -l rootvg
    rootvg:
    LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
    hd5                 boot       1       1       1    closed/syncd  N/A
    hd6                 paging     32      32      1    open/syncd    N/A
    hd8                 jfs2log    1       1       1    open/syncd    N/A
    hd4                 jfs2       672     672     1    open/syncd    /
    hd2                 jfs2       97      97      1    open/syncd    /usr
    hd9var              jfs2       16      16      1    open/syncd    /var
    hd3                 jfs2       128     128     1    open/syncd    /tmp
    hd11admin           jfs2       8       8       1    open/syncd    /admin
    livedump            jfs2       4       4       1    open/syncd    /var/adm/ras/livedump
    # lswpar
    #
    

     



  • 8.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Thu September 26, 2019 07:19 AM

    Originally posted by: sangameshm


    I don't see /opt filesystem is being mounted, which could be the reason why symbolic links aren't created.

    In my case i could see the /opt is being mounted.

     

    # lsvg -l rootvg
    rootvg:
    LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
    hd5                 boot       1       1       1    closed/syncd  N/A
    hd6                 paging     16      16      1    open/syncd    N/A
    hd8                 jfs2log    1       1       1    open/syncd    N/A
    hd4                 jfs2       3       3       1    open/syncd    /
    hd2                 jfs2       73      73      1    open/syncd    /usr
    hd9var              jfs2       134     134     1    open/syncd    /var
    hd3                 jfs2       97      97      1    open/syncd    /tmp
    hd1                 jfs2       113     113     1    open/syncd    /home
    hd10opt             jfs2       344     344     1    open/syncd    /opt <<<<<<<
    hd11admin           jfs2       4       4       1    open/syncd    /admin
    ......


    What is the output of "ls -l /usr/opt" ?

     

    Thanks,

    Sangamesh

     



  • 9.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Thu September 26, 2019 07:37 AM

    Originally posted by: FF_Jelle


    The output of "ls -l /usr/opt":

    # ls -l /usr/opt
    total 0
    lrwxrwxrwx    1 root     system           13 Jan 22 2016  freeware -> /opt/freeware
    drwxr-xr-x    5 root     system          256 Oct 13 2017  perl5
    

     



  • 10.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Fri September 27, 2019 02:41 AM

    Originally posted by: sangameshm


    Okay. As mentioned issue here is that /opt filesystem is missing.

    Please check why you don't have /opt being mounted.

    What is output of "ls -l /opt/freeware"  ?

    I guess some files are installed in /opt already but could be some issue with mount later.

     

    Thanks,

    Sangamesh



  • 11.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Fri September 27, 2019 04:16 AM

    Originally posted by: FF_Jelle


    I am just using a fresh AIX 7.2 image, so I don't know why /opt is not being mounted. Image info: IBM OS Image for AIX Systems version 3.0.0, image reference number 82.

    Here is the output of "ls -l /opt/freeware":

    # ls -l /opt/freeware
    total 48
    drwxr-xr-x    3 bin      bin             256 Jan 22 2016  64
    drwxr-xr-x    2 root     system         8192 Sep 24 11:43 bin
    dr-xr-xr-x    2 root     system          256 Aug 18 2017  cimom
    drwxr-xr-x   10 root     system          256 Sep 24 11:43 doc
    drwxr-xr-x    2 root     system          256 Sep 24 10:41 include
    drwxr-xr-x    2 root     system          256 Sep 24 11:43 info
    drwxr-xr-x    8 root     system         4096 Sep 24 10:41 lib
    drwxr-xr-x    3 root     system         4096 Sep 24 10:41 lib64
    drwxr-xr-x    4 root     system          256 Jan 22 2016  libexec
    drwxr-xr-x   13 root     system         4096 Sep 24 10:41 man
    drwxr-xr-x    2 root     system         4096 Dec 08 2017  packages
    drwxr-xr-x    2 root     system          256 Jan 22 2016  sbin
    drwxr-xr-x    9 root     system          256 Sep 24 10:41 share
    drwxr-xr-x    3 root     system          256 Sep 18 2017  src
    

     



  • 12.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Mon September 30, 2019 08:30 AM

    Originally posted by: sangameshm


    To check if /opt filesystem is created and any issue with the mount.

    Please run and provide the output of below commands.

     

    cd /opt

    df .

     

    Also please check if /opt entry is present in /etc/filesystems. If it is present then mostly issue with the mount.

     

    Thanks,

    Sangamesh



  • 13.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Tue October 01, 2019 03:08 AM

    Originally posted by: FF_Jelle


    Output of df:

    # cd /opt
    # df .
    Filesystem    512-blocks      Free %Used    Iused %Iused Mounted on
    /dev/hd4        88080384  84398440    5%    53236     1% /
    

    There is no /opt entry present in /etc/filesystems.

    /:
            dev             = /dev/hd4
            vfs             = jfs2
            log             = /dev/hd8
            mount           = automatic
            check           = false
            type            = bootfs
            vol             = root
            free            = true
    
    /usr:
            dev             = /dev/hd2
            vfs             = jfs2
            log             = /dev/hd8
            mount           = automatic
            check           = false
            type            = bootfs
            vol             = /usr
            free            = false
    
    /var:
            dev       = /dev/hd9var
            vol       = "/var"
            mount     = automatic
            check     = false
            free      = false
            vfs       = jfs2
            log       = /dev/hd8
            type      = bootfs
    
    /tmp:
            dev       = /dev/hd3
            vol       = "/tmp"
            mount     = automatic
            check     = false
            free      = false
            vfs       = jfs2
            log       = /dev/hd8
    
    /admin:
            dev       = /dev/hd11admin
            vol       = "/admin"
            mount     = true
            check     = false
            free      = false
            vfs       = jfs2
            log       = /dev/hd8
    
    /proc:
            dev       = /proc
            vol       = "/proc"
            mount     = true
            check     = false
            free      = false
            vfs       = procfs
    
    /var/adm/ras/livedump:
            dev             = /dev/livedump
            vfs             = jfs2
            log             = /dev/hd8
            mount           = true
            account         = false
    

     



  • 14.  Re: AIX 7.2 Bash installation error unexpected result

    Posted Thu October 24, 2019 01:36 PM

    Originally posted by: sangameshm


    /opt filesystem is not being created in this case.

    One command which might give some information about the mount of /opt filesystem is.

    alog -o -t bosinst

     

    This is what i see in my case.

     

    # alog -o -t bosinst
    Preparing target disks.
    Importing root volume group.
    rootvg
    Replaying the log.
    J2_LOGREDO:log redo processing for /dev/hd8                         
    Preserving old data.
    Copying old files
    Creating logical volumes.
    hd4
    hd2
    hd9var
    hd10opt
    hd11admin
    File system created successfully.
    32560 kilobytes total disk space.
    File system created successfully.
    163628 kilobytes total disk space.
    File system created successfully.
    32560 kilobytes total disk space.
    File system created successfully.
    32560 kilobytes total disk space.
    File system created successfully.
    130864 kilobytes total disk space.
    Mounting file systems.
    Restoring base operating system.
    Initializing disk environment.

    Over mounting /.
    fvt-p7z17.in.ibm.com
    Copying Cu* to disk.
    Filesystem size changed to 131072
    Filesystem size changed to 393216
    Merging.
    mount: /dev/hd10opt on /opt: Device busy
    /proc:
    Installing additional software.
    fvt-p7z17.in.ibm.com
    Please wait...
    tcl.base:tcl.base:8.4.7.1: : :C: :Binary executable files of Tcl: : : : : : :1:0:/:
    tk.base:tk.base:8.4.7.1: : :C: :Binary executable files of Tk: : : : : : :1:0:/:
    expect.base:expect.base:5.42.1.1: : :C: :Binary executable files of Expect: : : : : : :1:0:/:
    Initializing dump device.
    Platform dump is not supported on this system.
    primary              /dev/lg_dumplv
    secondary            /dev/sysdumpnull
    copy directory       /var/adm/ras
    forced copy flag     TRUE
    always allow dump    FALSE
    dump compression     ON
    type of dump         fw-assisted
    full memory dump     disallow
    Network Install Manager customization.
    Creating boot image.

    bosboot: Boot image is 61468 512 byte blocks.

                                   Running Customization

     

    Thanks,

    Sangamesh