Page 1 of 1

VBoxSolarisAdditions.pkg package fix to support -R

Posted: 23. Nov 2018, 09:24
by stes
Although IPS support would be nice, it is also for supporting a product like VirtualBox a good idea to "stick" to pkgadd because this supports Solaris 10. Actually the SVR4 pkg has the advantage that it works with both Solaris 10 and Solaris 11.

Based upon the results in the AI (automated installer) when trying to "push" the SUNWvboxguest during install of the Solaris OS to the guest (during the initial install of the operating system), I tested the following and conclude that the problem is that the "-R /mnt" option of the pkgadd is not supported by SUNWvboxguest.

When running in the OS : pkgadd -d http://192.168.0.4/VBoxSolarisAdditions.pkg that works fine.

However during install of the Solaris OS, the installer actually mounts the "target" OS under /a and calls pkgadd with the -R /a option.

I can reproduce the failure to install the guest addition with -R /mnt :

root@saturn:~# pkg install svr4
(to get the "legacy", but perfectly fine, pkgadd and pkginfo)

root@saturn:~# beadm list
BE Name Flags Mountpoint Space Policy Created
------- ----- ---------- ----- ------ ----------------
solaris NR / 1.50G static 2018-11-23 07:37
root@saturn:~# beadm create solaris-I
root@saturn:~# beadm list
BE Name Flags Mountpoint Space Policy Created
--------- ----- ---------- ------ ------ ----------------
solaris NR / 1.50G static 2018-11-23 07:37
solaris-I - - 40.72M static 2018-11-23 08:03
root@saturn:~# beadm mount solaris-I /mnt
root@saturn:~# pkgadd -R /mnt -d http://192.168.0.4/VBoxSolarisAdditions.pkg

## Downloading...
...........20%...........40%...........60%...........80%...........100%
## Download Complete


The following packages are available:
1 SUNWvboxguest Oracle VM VirtualBox Guest Additions
(i386) 6.0.0_BETA2,REV=r126642.2018.11.15.16.53

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all

Processing package instance <SUNWvboxguest> from <http://192.168.0.4/VBoxSolaris
Additions.pkg>

Oracle VM VirtualBox Guest Additions(i386) 6.0.0_BETA2,REV=r126642.2018.11.15.16
.53
## Software contents file initialized
Oracle Corporation
Using </mnt> as the package base directory.
## Processing package information.
## Processing system information.
## Verifying package dependencies.
WARNING:
The <SUNWuiu8> package "Iconv modules for UTF-8 Locale"
is a prerequisite package and should be installed.

Do you want to continue with the installation of <SUNWvboxguest> [y,n,?] y
## Verifying disk space requirements.
## Checking for conflicts with packages already installed.
## Checking for setuid/setgid programs.

This package contains scripts which will be executed with super-user
permission during the process of installing this package.

Do you want to continue with the installation of <SUNWvboxguest> [y,n,?] y

Installing Oracle VM VirtualBox Guest Additions as <SUNWvboxguest>

## Installing part 1 of 1.
/mnt/etc/fs/vboxfs/mount <symbolic link>
/mnt/opt/VirtualBoxAdditions/1099.vboxclient
/mnt/opt/VirtualBoxAdditions/LICENSE
/mnt/opt/VirtualBoxAdditions/VBox.sh
/mnt/opt/VirtualBoxAdditions/amd64/VBoxClient.Z
/mnt/opt/VirtualBoxAdditions/amd64/VBoxControl.Z
/mnt/opt/VirtualBoxAdditions/amd64/VBoxService.Z
/mnt/opt/VirtualBoxAdditions/amd64/pam_vbox.so
/mnt/opt/VirtualBoxAdditions/amd64/vboxfs
/mnt/opt/VirtualBoxAdditions/amd64/vboxfs_s10
/mnt/opt/VirtualBoxAdditions/amd64/vboxfsmount
/mnt/opt/VirtualBoxAdditions/amd64/vboxmslnk
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_110.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_111.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_112.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_113.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_114.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_117.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_118.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_13.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_14.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_15.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_16.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_17.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_18.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_19.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_70.so.Z
/mnt/opt/VirtualBoxAdditions/amd64/vboxvideo_drv_71.so.Z
/mnt/opt/VirtualBoxAdditions/i386/VBoxClient.Z
/mnt/opt/VirtualBoxAdditions/i386/VBoxControl.Z
/mnt/opt/VirtualBoxAdditions/i386/VBoxService.Z
/mnt/opt/VirtualBoxAdditions/i386/pam_vbox.so
/mnt/opt/VirtualBoxAdditions/i386/vboxfs
/mnt/opt/VirtualBoxAdditions/i386/vboxfs_s10
/mnt/opt/VirtualBoxAdditions/i386/vboxfsmount
/mnt/opt/VirtualBoxAdditions/i386/vboxmslnk
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_110.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_111.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_112.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_113.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_114.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_117.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_118.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_13.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_14.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_15.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_16.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_17.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_18.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_19.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_70.so.Z
/mnt/opt/VirtualBoxAdditions/i386/vboxvideo_drv_71.so.Z
/mnt/opt/VirtualBoxAdditions/solaris_xorg.conf
/mnt/opt/VirtualBoxAdditions/solaris_xorg_modeless.conf
/mnt/opt/VirtualBoxAdditions/vbox_vendor_select
/mnt/opt/VirtualBoxAdditions/vboxclient.desktop
/mnt/opt/VirtualBoxAdditions/vboxguest.sh
/mnt/opt/VirtualBoxAdditions/vboxmslnk
/mnt/opt/VirtualBoxAdditions/x11config15sol.pl
/mnt/opt/VirtualBoxAdditions/x11restore.pl
/mnt/usr/bin/VBoxClient <symbolic link>
/mnt/usr/bin/VBoxClient-all <symbolic link>
/mnt/usr/bin/VBoxControl <symbolic link>
/mnt/usr/bin/VBoxService <symbolic link>
/mnt/usr/kernel/drv/amd64/vboxguest
/mnt/usr/kernel/drv/amd64/vboxms
/mnt/usr/kernel/drv/vboxguest
/mnt/usr/kernel/drv/vboxguest.conf
/mnt/usr/kernel/drv/vboxms
/mnt/usr/kernel/drv/vboxms.conf
/mnt/usr/lib/VBoxOGL.so
/mnt/usr/lib/VBoxOGLarrayspu.so
/mnt/usr/lib/VBoxOGLcrutil.so
/mnt/usr/lib/VBoxOGLerrorspu.so
/mnt/usr/lib/VBoxOGLfeedbackspu.so
/mnt/usr/lib/VBoxOGLpackspu.so
/mnt/usr/lib/VBoxOGLpassthroughspu.so
/mnt/usr/lib/amd64/VBoxOGL.so
/mnt/usr/lib/amd64/VBoxOGLarrayspu.so
/mnt/usr/lib/amd64/VBoxOGLcrutil.so
/mnt/usr/lib/amd64/VBoxOGLerrorspu.so
/mnt/usr/lib/amd64/VBoxOGLfeedbackspu.so
/mnt/usr/lib/amd64/VBoxOGLpackspu.so
/mnt/usr/lib/amd64/VBoxOGLpassthroughspu.so
/mnt/usr/sbin/vboxmslnk <symbolic link>
[ verifying class <none> ]
/mnt/opt/VirtualBoxAdditions/VBoxClient <linked pathname>
/mnt/opt/VirtualBoxAdditions/VBoxControl <linked pathname>
/mnt/opt/VirtualBoxAdditions/VBoxISAExec <linked pathname>
/mnt/opt/VirtualBoxAdditions/VBoxService <linked pathname>
[ verifying class <manifest> ]
## Executing postinstall script.
Uncompressing files...
Configuring VirtualBox guest kernel module...
## VirtualBox kernel module (vboxguest) NOT installed.
## VirtualBox kernel module (vboxguest) NOT installed.
devfsadm: driver failed to attach: vboxguest
Creating links...
(*) X.Org not found, skipped configuring X.Org guest additions.
Installing 64-bit shared folders module...
Installing 32-bit shared folders module...
ERROR: attribute verification of </mnt/usr/kernel/fs/amd64/vboxfs> failed
pathname does not exist
ERROR: attribute verification of </mnt/usr/kernel/fs/vboxfs> failed
pathname does not exist
devfsadm: driver failed to attach: vboxguest
Configuring services (this might take a while)...
## Service import failed.
## See /var/svc/log/system-manifest-import:default.log for details.
## Guest kernel module doesn't seem to be up. Skipped explicit boot-archive upda
te.
ln: cannot create /lib/opengl/ogl_select: No such file or directory
/mnt/var/sadm/pkg/SUNWvboxguest/install/postinstall[393]: /lib/svc/method/ogl-se
lect: not found [No such file or directory]
Done.
pkgadd: ERROR: postinstall script did not complete successfully

Installation of <SUNWvboxguest> partially failed.
root@saturn:~# beadm activate solaris-I
root@saturn:~# beadm list
BE Name Flags Mountpoint Space Policy Created
--------- ----- ---------- ------ ------ ----------------
solaris N / 87.11M static 2018-11-23 07:37
solaris-I R /mnt 1.52G static 2018-11-23 08:03


After a reboot into the newly activated BE (Boot environment) it is confirmed that SUNWvboxguest is only partially installed and it is not working : the vbox guest additions modules are not loaded.

So the VBoxSolarisAdditions.pkg package could be fixed to support -R .