LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-08-2003, 03:22 AM   #1
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Rep: Reputation: 30
Misc Binary Format Handler


OK, there is weirdness afoot.
In Slackware 8.1:
Discovered binfmt_misc.
Read about wrapper scripts.
Tried default Windows exe support, adjusting for my mini-wrapper.
(echo ':WIN32:M::MZ::/bin/wintegration:' > /proc/sys/fs/binfmt_misc/register)
No good. Can't echo into register, since there was reading yet to do.
Read about mounting under /proc/.../binfmt_misc, tried it, commands now work.
No good. inside /win98/WINDOWS, bash reports "bash: ./WRITE.EXE: cannot execute binary file"
Repeatedly echo '1' into status and WIN32, the format name. cat'ted all repeatedly, each reports 'enabled'.
Nada.
Make 2 new formats, now based on extension "EXE" and "exe", pointing to same wrapper.
Nope.

/bin/wintegration is just "wine $1 -- $2 $3 $4 $5 $6 $7 $8 $9" so I can pass options, but this never gets that far.

I'm asking here since I don't see other documentation that doesn't merely echo the kernel docs and the binfmt_misc webpage.

One thing that just might be the issue is my Win4Lin patched kernel 2.4.20. that's the only modification at this time.

Anyone?

i'm rebooting my pure kernel, if it works i'll delete this post.


--later--

plain vanilla is no better. BTW, both kernels have binfmt_misc internal, not as a module. At one time I thought it might be bash, so I tried other shells (csh, ksh, zsh) without success.

I even opened WRITE.EXE in a hex editor to make sure it wasn't the most impossible Windows binary ever, the one that DIDN'T begin with MZ. But there they were. MZ, a.k.a. 0x4D 0x5A just like the output of "cat /proc/sys/fs/binfmt_misc/WIN32". Something can't be right, but that something isn't WRITE.

addon: I tried other progs, too.


Last edited by xcon; 02-09-2003 at 01:28 PM.
 
Old 02-08-2003, 03:42 AM   #2
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Original Poster
Rep: Reputation: 30
---------

Last edited by xcon; 02-09-2003 at 01:29 PM.
 
Old 04-01-2003, 08:40 AM   #3
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Original Poster
Rep: Reputation: 30
I installed slack 9.0 from the ground up, and copied config files in as needed. here's what happens:

/etc/mtab includes the following
Code:
proc on /proc type proc (rw)
binfmt on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/etc/rc.d.rc.w32:
Code:
echo "Fixing WINE integration..."
echo '1' > /proc/sys/fs/binfmt_misc/status
echo ':WINE:M::MZ::/bin/wintegration:' > /proc/sys/fs/binfmt_misc/register
echo '1' > /proc/sys/fs/binfmt_misc/WINE
ls -l /proc/sys/binfmt_misc:
Code:
cat /proc/sys/fs/binfmt_misc/
-rw-r--r--    1 root     root            0 Apr  1 03:40 WINE
-r--------    1 root     root            0 Mar 31 22:39 register
-rw-r--r--    1 root     root            0 Mar 31 22:39 status
cat /proc/sys/fs/binfmt_misc/WINE:
Code:
enabled
interpreter /bin/wintegration
offset 0
magic 4d5a
/bin/wintegration is same as listed above...

cat /proc/sys/fs/binfmt_misc/status:
Code:
enabled
Everything here is apparently in order according to all the docs I've read. I'm using 2.4.20, built from source--quite a few times, actually... and the misc. binary format option is built-in, i.e. NOT a module. I tried it once as a module, and it also proved nothing. The only thing I get is the thing I always get:

Code:
xcon@labserver:/win98/Program Files/Winamp$ ls -l winamp.exe
-rwxrwxr-x    1 root     root       622080 Aug 22  2002 winamp.exe*
xcon@labserver:/win98/Program Files/Winamp$ ./winamp.exe
bash: ./winamp.exe: cannot execute binary file
Is this wrong?
 
Old 04-01-2003, 08:52 AM   #4
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Original Poster
Rep: Reputation: 30
hmmm... i thought the 'wrapper script' was supposed to work.

i changed the registered interpreter to /opt/wine/bin/wine and now it launches... no more script, I wonder if the command line opts still operate.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 03:17 PM
Misc consty Red Hat 2 04-21-2005 02:11 PM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 10:47 AM
kernel binary format support rch Linux - General 0 03-05-2003 02:18 AM
Misc Qn ugenn Linux - General 1 12-12-2002 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration