OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: RickCHodgin on November 07, 2018, 05:56:40 pm

Title: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 07, 2018, 05:56:40 pm
Who should I contact about making an easy setup wizard exe for VirtualBox Guest Additions installation?
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Bogdan on November 07, 2018, 06:02:27 pm
https://www.virtualbox.org/wiki/Contributor_information
Title: Re: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 07, 2018, 06:18:03 pm
https://www.virtualbox.org/wiki/Contributor_information

+1
Title: Re: VirtualBox Easy OS/2 Setup
Post by: mauro on November 07, 2018, 08:38:52 pm
let us know.
Thank you
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Valery Sedletski on November 07, 2018, 09:26:21 pm
2Rick Hodgin: You should contribute to Netlabs port of VBox, instead of contacting Oracle directly, I think.
Also note that we'll try to put our work in the official Oracle repository in the future.

In fact, ideally the installer should be a simple REXX script. You Unzip the package in some directory, and
run a REXX script. It should modify config.sys, startup.cmd and os2.ini. Also, it's possible to use WarpIN,
but I'd prefer the .ZIP file with a REXX script. unzip+REXX is a better installer for OS/2, in fact. Or, we need
both the WarpIN installer and a .ZIP package with a REXX script, for those who prefer it. I sometimes
need a manual install, so unzip is easier for me.

Though, note that VBox additions require kLIBC and libcx. So, because of this it should be ideally installed
with RPM, to handle dependencies, and avoid conflicts with different versions of the same DLL. Though, on
the other hand, YUM ports could be not installed in the guest. But then, each RPM in the repository is
duplicated by a zipped version of the same package. So, maybe it's better to create an RPM package, and
put it into the usual Netlabs repository. I could help you to create the RPM, if you wish.

So, we could create an RPM installer, plus a REXX script for those who wants to use the zipped versions
of additions.

PS: I plan to package the OS/2 port of VirtualBox as RPM too.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 07, 2018, 09:44:14 pm
2Rick Hodgin: You should contribute to Netlabs port of VBox, instead of contacting Oracle directly, I think.
Also note that we'll try to put our work in the official Oracle repository in the future.

In fact, ideally the installer should be a simple REXX script. You Unzip the package in some directory, and
run a REXX script. It should modify config.sys, startup.cmd and os2.ini. Also, it's possible to use WarpIN,
but I'd prefer the .ZIP file with a REXX script. unzip+REXX is a better installer for OS/2, in fact. Or, we need
both the WarpIN installer and a .ZIP package with a REXX script, for those who prefer it. I sometimes
need a manual install, so unzip is easier for me.

I'm thinking a simple VBoxAdditions_os2.exe.

Quote
Though, note that VBox additions require kLIBC and libcx. So, because of this it should be ideally installed
with RPM, to handle dependencies, and avoid conflicts with different versions of the same DLL. Though, on
the other hand, YUM ports could be not installed in the guest. But then, each RPM in the repository is
duplicated by a zipped version of the same package. So, maybe it's better to create an RPM package, and
put it into the usual Netlabs repository. I could help you to create the RPM, if you wish.

So, we could create an RPM installer, plus a REXX script for those who wants to use the zipped versions
of additions.

PS: I plan to package the OS/2 port of VirtualBox as RPM too.

You can help me with all of those details.  I just want it to handle the ~12 steps that are required with a single click. :-)
Title: Re: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 08, 2018, 01:35:13 am
Valery, based on your advice I looked over REXX and it looks like it would be a good tool to use for this purpose.

I'll try to work up a script and post it and then everyone can teach me how to do it better.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 09, 2018, 03:19:50 pm
Is anybody available on skype or irc to help me with REXX?  I know the logic I need to use, but there are questions I have about REXX that need answered.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Bogdan on November 09, 2018, 04:31:40 pm
REXX is not required at all. By using a device driver profile it should work in most situations.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Dave Yeo on November 09, 2018, 05:12:16 pm
You could try the Netlabs IRC channel. Start here, http://www.netlabs.org/site/community.xml (http://www.netlabs.org/site/community.xml)
Title: Re: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 09, 2018, 06:44:55 pm
REXX is not required at all. By using a device driver profile it should work in most situations.

Not sure what you mean.  Can you teach me what I'm missing? :-)
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Bogdan on November 09, 2018, 08:30:22 pm
Use the OS/2 Device Driver Installation (DDINSTAL) to install device drivers. The Device Support package contains profile control files, which enable a device to communicate with the operating system.
Code: [Select]
* Komentarz
:TITLE
Sterownik I

:CONFIG *CONFIG.SYS
DEVICE=\os2\boot\drv.sys

:FILES
drv.sys\os2\boot\drv.sys
sup.dll\os2\dll\sup.dll
pgm.exe\os2\pgm.exe
Simply save it under the name JEZUS.DDP and run DDINSTAL!
Title: Re: VirtualBox Easy OS/2 Setup
Post by: RickCHodgin on November 09, 2018, 09:06:43 pm
Use the OS/2 Device Driver Installation (DDINSTAL) to install device drivers. The Device Support package contains profile control files, which enable a device to communicate with the operating system.
Code: [Select]
* Komentarz
:TITLE
Sterownik I

:CONFIG *CONFIG.SYS
DEVICE=\os2\boot\drv.sys

:FILES
drv.sys\os2\boot\drv.sys
sup.dll\os2\dll\sup.dll
pgm.exe\os2\pgm.exe
Simply save it under the name JEZUS.DDP and run DDINSTAL!

The VirtualBox Guest Addition installation instructions require a few steps:

Code: [Select]
1) Only works if the existing video driver is GRADD
2) Create c:\os2additions\ folder
3) Copy [cd_drive]:\os2\*.* to c:\os2additions\
4) Edit config.sys, REM out the line with the existing MOUSE.SYS driver
5) Add two new lines to config.sys
6) Edit startup.cmd and insert a new command to run
7) Make a backup of the GRADD dll
8) Copy the new VB Guest Additions GRADD dll where that one was
9) Copy the libc06*.* files to the same place the GRADD dll was
10) Reboot

I think that's all.  Will DDINSTAL handle doing those things?
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Bogdan on November 09, 2018, 11:16:21 pm
...

I think that's all.  Will DDINSTAL handle doing those things?
It would do everything, but not the totally useless and dangerous points 2 & 3.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Dave Yeo on November 10, 2018, 12:17:04 am

The VirtualBox Guest Addition installation instructions require a few steps:

Code: [Select]
1) Only works if the existing video driver is GRADD
2) Create c:\os2additions\ folder
3) Copy [cd_drive]:\os2\*.* to c:\os2additions\
4) Edit config.sys, REM out the line with the existing MOUSE.SYS driver
5) Add two new lines to config.sys
6) Edit startup.cmd and insert a new command to run
7) Make a backup of the GRADD dll
8) Copy the new VB Guest Additions GRADD dll where that one was
9) Copy the libc06*.* files to the same place the GRADD dll was
10) Reboot

I think that's all.  Will DDINSTAL handle doing those things?

Don't update the libc06*.* files as they're now taken care of by YUM/RPM and installed into @UNIXROOT\usr\lib.  Probably have to unlock GRADD.DLL as well
Code: [Select]
unlock gradd.dll
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Valery Sedletski on November 10, 2018, 08:21:29 am
2Bogdan Szmalcownik: Yes, I completely forgot about ddinstall.exe. But the required things are not only add
device=... and ifs=... lines to config.sys, but also comment out some other unneeded lines. I'm not sure
if ddinstall can add "set" lines, and replace some lines with another lines. Also, possibly, in the future, modification
of os2.ini will be required, to add some DLL to SYS_DLLS list. AFAIK, ddinstall cannot modify INI files, but this
could be done from REXX. (I plan to move shared clipboard code to a DLL loadable from SYS_DLLS, so VBoxService
no more contains PM-related code, so I could move VBoxService.exe from startup.cmd to a run=... line in
config.sys).
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Bogdan on November 10, 2018, 12:43:12 pm
AFAIK, ddinstall cannot modify INI files,
This should be possible by adding a section :OS2INI to the DDP.

Quote
but this could be done from REXX.
REXX has to be installed first. So it will not work early at installation time. But an option for OS/2 <2.1.

Quote
(I plan to move shared clipboard code to a DLL loadable from SYS_DLLS, so VBoxService
no more contains PM-related code, so I could move VBoxService.exe from startup.cmd to a run=... line in
config.sys).
There are enough other solutions for clipboard sharing that will work with a wider range of virtualized OS/2 products. The current additions require files that are simply not available on a fresh install and do not work under most versions of OS/2.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Valery Sedletski on November 10, 2018, 02:09:08 pm
AFAIK, ddinstall cannot modify INI files,
This should be possible by adding a section :OS2INI to the DDP.

Oh, that's good. So, it looks like everything can be installed with ddinstall only.

Quote
Quote
but this could be done from REXX.
REXX has to be installed first. So it will not work early at installation time. But an option for OS/2 <2.1.

Why do you need it early at installation time? It can be installed after the completion of installation,
and it is done always this way. Why OS/2 < 2.1 ??? Do OS/2 versions older that 2.1 miss ddinstall?
But yes, ddinstall can be used at any time -- so you're right

Quote
Quote
(I plan to move shared clipboard code to a DLL loadable from SYS_DLLS, so VBoxService
no more contains PM-related code, so I could move VBoxService.exe from startup.cmd to a run=... line in
config.sys).
There are enough other solutions for clipboard sharing that will work with a wider range of virtualized OS/2 products. The current additions require files that are simply not available on a fresh install and do not work under most versions of OS/2.

Other solutions for clipboard sharing? What do you mean? I know only about one program
written by dink, it has versions for OS/2 and win32, only. But what to do in case of Linux or
any other less widely used OS?

Current VBox Additions use KEE API's, that's why they require Aurora-level kernel. So yes, it will
not work with Merlin, or older OS'es. I don't like this too. But that's how VBox works. The drivers
from OS/2 additions are built with GCC and should be 32-bit. Writing 32-bit drivers for older OS-es
has big issues. Drivers from the additions use VBox runtime. It's problematic to use VBox runtime
in 16-bit drivers. So, no way.

Which files that are not available at fresh install are used by the Additions? Do you mean, kLIBC/libcx/
gcc runtime? Yes, of course, they are required, as VBox (including the additions) is built with GCC+NASM.
So, these files are required. But this cannot be avoided. No way to build the Additions with Watcom,
currently. Anyway, it's easy to install kLIBC/libcx/libgcc in a freshly-installed system. The additions
depend on a small number of libs, indeed. Here's the list:

Quote
libc066.dll
gcc1.dll
libcx0.dll

Nothing more is required, I only omitted standard OS/2 DLL's like tcpip32.dll, pmwin.dll, doscalls.dll.
Title: Re: VirtualBox Easy OS/2 Setup
Post by: Valery Sedletski on November 13, 2018, 03:28:09 pm
2Bogdan Szmalcownik: I have read about ddinstall in pddref.inf from IBM DDK. As far as I can see,
:SYSINI option allows to modify INI entries. Though, I don't see an option to get a current value
of an INI entry, and modify it (I need to add one DLL to the end of SYS_DLLS list, not only replace
the all existing entries to my entry).

And :SYSINI seems to be only for adding PM video drivers.

Also, I need an option to comment some "set" and "device=..." lines out in config.sys, and replace
them by my lines. But I only see :CONFIG option which appears to ignore existing config.sys lines
and leave them as is.

And I don't see any option to modify startup.cmd file from an .ddp profile. So, it seems, the
possibilities offered by ddinstall are limited. So, I think, it's better to provide two options:

1) Create an .rpm package for additions, so it could be automatically installed to the guest
system from network. This option is very convenient if you have UNIX ports installed, like
in newer eCS 2.2 and ArcaOS systems.

2) Create an usual Additions ISO, with all required files, including the kLIBC DLL's, plus a
REXX script to automate installation. Also, it's possible to use a WarpIN package, instead of
a REXX script, and put it to Additions ISO too.