Link to home
Start Free TrialLog in
Avatar of The--Captain
The--CaptainFlag for United States of America

asked on

Execute Unixware binaries on 2.4 kernel (ala ibcs)

This is probably really easy, but the research part of my brain is feeling lazy, and is reminding me that I've got pts to burn - OK, here is the question:

The old 2.2 kernels on most linux distros (including redhat, which is what I'm planning to use) included a module called ibcs.o that when loaded allowed for execution of legacy SCO and Unixware binaries - does this functionality still exist in 2.4 series kernels (redhat 7.1 and beyond)?  If so, what module(s) are needed?  

Also, I'm not talking about disklabel stuff - I don't need to mount any legacy unixware drives - just execute legacy unixware binaries.

Redhat tech support seems to think this [support for execution of Unixware and SCO binaries] was discontinued, but I'm not sure of the accuracy their information.

Any thoughts?  Anyone that can provide info on how to do this with a 2.4 kernel, or provide reliable info (with sources) that this is impossible in 2.4 kernels will receive pts here.

Thanks,
-Jon

Avatar of ahoffmann
ahoffmann
Flag of Germany image

listening ..
Avatar of Michael_Phillips
Michael_Phillips

Found this and other info regarding the Intel binary compatibility standard, but most info is dated as you have found.

http://rpmseek.com/rpm-pl/ibcs2.html?hl=com&cs=ibcs2:PN:0:0:0
SOLUTION
Avatar of Michael_Phillips
Michael_Phillips

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
http://sdb.suse.de/en/sdb/html/ibcs_72.html looks slightly promising for a SuSE install. And in fact for any 2.4 kernel:-).
http://www.purplet.demon.co.uk/linux/ibcs/ seem severely dated though, so I wouldn't get my hopes up on that particular module.
What seem to be needed is abi modules, and this article describes (in correct detail, as far as I can see) how to go about setting it up: http://www.aplawrence.com/Bofcusm/945.html

As far as I can see, RH8 have these abi-* modules prebuilt, so it should just be a question of loading them/getting things right in /etc/modules.conf. Chances are great that everything is correctly set up already:-).

HtH
-- Glenn
Avatar of The--Captain

ASKER

>http://sdb.suse.de/en/sdb/html/ibcs_72.html looks slightly promising.

It sure does - without any testing of any kind (which is certainly necessary before I close this) I'd guess that you are in the lead.

Thanks for the info (also, the RH8 stuff was welcome - it's probably what I'll try first).

Wish me luck!

-Jon
May I ask how you found that?  Was I just too obstinate in my searches by adding the word "redhat"?

Cheers,
-Jon
Arrrrgh!  After adjusting /etc/modules.conf the system autoloads the abi modules (including ibcs), but the binary still doesn't execute (and throws the same error ("cannot execute binary file").  I will try the previous suggestion of compiling a 2.2 kernel under redhat 8 (a redhat 6.2 install dies at anaconda) and see what happens.  

Also, any references about tweaking/adjusting the abi moduules' (particularly ibcs) config would be great - since I now know about the modules and they seem to load properly, maybe a simple adjustment to the config would alleviate the problem (I'd hate to use a 2.2 kernel when the solution in a 2.4 kernel was a stone's throw away).

Cheers,
-Jon

I think the google was "ibcs kernel support" or similar... Don't really remember... Then manually filter out anything to do with 2.2:-).

Take a look at the third link (http://www.aplawrence.com/Bofcusm/945.html), where a slightly different approach is taken. Main difference is that binfmt_coff and binfmt_xout get "forceloaded". Adding the support for the binary format is just a very small part of executing a "foreign binary", but I'm sure you are aware of this.

Hmm, neither approach work with a RH8 I've got here.... Oh (blush). Do a google on "linux-abi", this will turn up  http://linux-abi.sourceforge.net ... following the documentation link, you'll find a init-script to get it flying.

I don't have UW but I do have DG/UX, which get a lot of commercial support by use of iBCS (they call it application capture option:-)... So I do have access to UW binaries and have been "playing" with this subsystem some, in the past (2.2) days.

I'll try to find some more time to play with this.

-- Glenn
OK, I haven't got around to compiling a 2.2 kernel yet - here's where I'm at

I run lsmod:

Module                  Size  Used by    Not tainted
binfmt_misc             7524   1
autofs                 13348   0  (autoclean) (unused)
ds                      8712   1
yenta_socket           12960   1
pcmcia_core            54784   0  [ds yenta_socket]
eepro100               22264   1
iptable_filter          2412   0  (autoclean) (unused)
ip_tables              14936   1  [iptable_filter]
ide-scsi               10512   0
scsi_mod              107176   1  [ide-scsi]
ide-cd                 33608   0
cdrom                  33696   0  [ide-cd]
ohci1394               20108   0  (unused)
ieee1394               46892   0  [ohci1394]
mousedev                5524   0  (unused)
keybdev                 2976   0  (unused)
hid                    22244   0  (unused)
input                   5888   0  [mousedev keybdev hid]
usb-uhci               26188   0  (unused)
usbcore                77024   1  [hid usb-uhci]
ext3                   70368   2
jbd                    52212   2  [ext3]

then I run my unixware binary (which throws the usual error), and lsmod again:

Module                  Size  Used by    Not tainted
abi-ibcs                7404   0  (autoclean) (unused)
abi-svr4               85292   0  (autoclean) [abi-ibcs]
lcall7                  2276   0  (autoclean) [abi-ibcs]
abi-util                1468   0  (autoclean) [lcall7]
binfmt_misc             7524   1
autofs                 13348   0  (autoclean) (unused)
ds                      8712   1
yenta_socket           12960   1
pcmcia_core            54784   0  [ds yenta_socket]
eepro100               22264   1
iptable_filter          2412   0  (autoclean) (unused)
ip_tables              14936   1  [iptable_filter]
ide-scsi               10512   0
scsi_mod              107176   1  [ide-scsi]
ide-cd                 33608   0
cdrom                  33696   0  [ide-cd]
ohci1394               20108   0  (unused)
ieee1394               46892   0  [ohci1394]
mousedev                5524   0  (unused)
keybdev                 2976   0  (unused)
hid                    22244   0  (unused)
input                   5888   0  [mousedev keybdev hid]
usb-uhci               26188   0  (unused)
usbcore                77024   1  [hid usb-uhci]
ext3                   70368   2
jbd                    52212   2  [ext3]

So, something is happening - the kernel seems to notice that the binary format is funky and loads some modules (which is a new behaviour since I added those lines to /etc/modules.conf), but it still refuses to execute.  After running the startup script from sourceforge and then lsmod I get:

Module                  Size  Used by    Not tainted
binfmt_aout             5340   0
binfmt_xout             4556   0
binfmt_coff             7168   0
abi-uw7                18060   0  (unused)
abi-sco                15832   0  (unused)
abi-cxenix              8636   0  [abi-sco]
abi-isc                 8236   0  (unused)
abi-ibcs                7404   0  (autoclean) (unused)
abi-svr4               85292   0  (autoclean) [abi-uw7 abi-sco abi-cxenix abi-isc abi-ibcs]
lcall7                  2276   0  (autoclean) [abi-uw7 abi-sco abi-cxenix abi-isc abi-ibcs]
abi-util                1468   0  (autoclean) [lcall7]
binfmt_misc             7524   1
autofs                 13348   0  (autoclean) (unused)
ds                      8712   1
yenta_socket           12960   1
pcmcia_core            54784   0  [ds yenta_socket]
eepro100               22264   1
iptable_filter          2412   0  (autoclean) (unused)
ip_tables              14936   1  [iptable_filter]
ide-scsi               10512   0
scsi_mod              107176   1  [ide-scsi]
ide-cd                 33608   0
cdrom                  33696   0  [ide-cd]
ohci1394               20108   0  (unused)
ieee1394               46892   0  [ohci1394]
mousedev                5524   0  (unused)
keybdev                 2976   0  (unused)
hid                    22244   0  (unused)
input                   5888   0  [mousedev keybdev hid]
usb-uhci               26188   0  (unused)
usbcore                77024   1  [hid usb-uhci]
ext3                   70368   2
jbd                    52212   2  [ext3]

Which certainly is loading more modules, but the binary still fails to execute.  Astute readers may notice that this is a laptop machine - and you thought I couldn't throw another wrench into the works ;-)

Let me know your thoughts...

Cheers,
-Jon

P.S.  Can't seem to get rid of binfmt_misc  - it fails to unload, claiming it's busy  - nothing I'm doing would seem to support this claim (that it's in use), and I suppose a reboot would clear it out, but for now just accept this anomaly (unless you can explain it).


Please correct me if I'm wrong, but a failure to install shared libraries required by my binary (or a unixware native linker) should not result in "cannot execute binary file" errors, but rather dynamic linker errors - I just want to rule that out...

Cheers,
-Jon

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'd imagine the error to be slightly different, yes:-).

-- Glenn
>Also, could you quote the actual error it throws?

Sorry if you didn't realize that was an exact quote, but indeed the error is:

-bash: /path/to/my/binary: cannot execute binary file

Also, I tried stop/start with the init script already - no luck.

BTW, I don't mean to sound whiny, but feel free to leave out the "<Enter>" at the end of your cmdline examples - makes them much easier to cut and paste hehe.

Thanks for your continued attention - If you solve this, I'll up the pts beyond 500 by posting additional "pts for Gns" questions (although folks who have already contributed in good faith will not be left out by any means).

Cheers,
-Jon


BTW, thanks for confirming my ongoing opinion that redhat support is a bunch of idiots - how could they have missed such an obvious path on which to proceed?  (Not that it's working currently for me, but it's certainly worth bringing up if I'm pretending like I want to buy redhat in order to accomplish this, which is what I did).

Cheers,
-Jon

Especially when they include it in their product...:-).
I'll try to control my wellnigh uncontrollable urges to add <Enter> directives<Enter>
:-)

Unfortunately I'll be going away over Easter (to do some real HW work on some flooring in my parents (waterdamaged) house. Sigh.), so I'll not be able to give this much attention until late next week.

-- Glenn
No problem - I've been busy myself, having just bought my first house last weekend.

Where are you located geographically?  You're up awful late (or maybe early), even if you're on the west coast (US).  It's 4:10 am here, and I'm feeling it - I need to get some sleep.

Cheers,
-Jon
Sweden (Stockholm region, to be specific). GMT + 1 + DST.
Good luck with your house. I've been a proud house owner for c:a 5 years now... "Things to do when you have to much spare time on your hands, as well as way to much money:
1. get a pet
2. get a car
3. get married
4. get children
5. get a house
...":-).

-- Glenn
2. get motobike (well, not that much fun all-year-around in Sweden:)
7. spending tooo much time answering questions which won't be asked if there where no computers ..
  :-{)
OK, I'm going to try to see how far compiling that Suse kernel gets me (unless someone can think of a wiser way to proceed).  I post back in a couple days after I get a chance to do the compile.

Cheers,
-Jon
hope you're aware that SuSE kernels have been heavily patched, unfortunately ...
>hope you're aware that SuSE kernels have been heavily
>patched, unfortunately ...

Patched to make Suse happy, or patched with general kernel add-ons? (if it's the latter, then that's exactly what I'm banking on)

Cheers,
-Jon




to make SuSE happy, mainly (does not mean that the patches are bad, but some are incompatible with other kernel patches; upgrading a SuSE kernel ends in a nightmare, usually). Just be prepared ...
Bad news (or good news, depending on your point of view).  The project has been scrapped (not my decision) in favor of native development to fulfill the functionality of the unixware binaries.  

I'm bummed, mainly because I like a good technical challenge, and I had considered this problem to be one.  Right now I'm considering a pt split, with the majority going to GNS for his/her advice regarding the 2.4 series kernels and IBCS.  If anyone wants additional pts (I would be willing to offer an addditional 500 for someone able to execute my binary), then I can provide a temporary site to download the binary in question, with pts awarded to the person who figures out what boneheaded mistake I was making (ie can make my binary execute).

If you want the chance to prove your expertise (and get more pts), just let me know, and I will post the URL to download the binary here.

Cheers,
-Jon

P.S.  Pending no additional comment (that would affect a split) within the next few days, I will post my proposed pt split at that time.  


Last time I looked I was male:-). In sweden, Glenn is considered a masculine name, although this is obviously not true everywhere (Glenn Close:-). Glenn is also a "new" name here, first popularized by Glenn Miller... Says something about my age:-).

I'd pick up that gauntlet, PHB willing to allow me the time:-). Go on, post that URL! I'll make time.

-- Glenn
The--Captain:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is to:

Points split between Gns and Michael_Phillips

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Paul
EE Cleanup Volunteer