Bug 129418 - unable to run windows binaries in kernel 2.6.7
Summary: unable to run windows binaries in kernel 2.6.7
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel   
(Show other bugs)
Version: 2
Hardware: i686 Linux
Target Milestone: ---
Assignee: Arjan van de Ven
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-08-08 17:54 UTC by Anand Buddhdev
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-13 22:51:26 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Anand Buddhdev 2004-08-08 17:54:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)
Gecko/20040706 Firefox/0.9.1

Description of problem:
With this update of the kernel, binfmt_misc is no longer a module, but
compiled in. As a result, "modprobe binfmt_misc" fails. The wine
startup script relies on this behaviour, and as a result of the
failure, it cannot register wine as a handler for windows binaries, so
I am unable to execute windows binaries directly.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install wine-20040716-1fc2winehq
2. Boot the system. The wine init script returns an OK, but that is
because the script ignores the output of the modprobe.
3. Try to execute a windows binary directly at the shell.

Actual Results:  I got the error 'bash: .wine/c/Program
Files/LeXpert/Lexpert.exe: cannot execute binary file'

Expected Results:  I expected the program Lexpert.exe to start up,
like it did previously.

Additional info:

Comment 1 Arjan van de Ven 2004-08-08 22:48:53 UTC
that's a bug in the wine script not in the kernel....

Comment 2 Anand Buddhdev 2004-08-08 23:27:33 UTC
Ok, so I can try to fix the wine init script. Obviously, the modprobe
isn't needed any more, and the script should really check for the
presence of /proc/sys/fs/binfmt_misc before trying modprobe. But
there's still a problem. Under kernel 2.6.7, these are the permissions
of /proc/sys/fs/binfmt_misc:

dr-xr-xr-x  2 root root 0 Aug  9 01:27 binfmt_misc/

So I cannot write in that diectory. And there exists no 'register'
file in that directory. When I try to echo something into
binfmt_misc/register, I get the error 'bash: binfmt_misc/register: No
such file or directory'. So how do I register new binary file handlers?

May I also ask why the config was changed to compile binfmt_misc into
the kernel, instead of as a module, with this version of the kernel?

Comment 3 Warren Togami 2004-08-09 01:29:21 UTC
> May I also ask why the config was changed to compile binfmt_misc into
> the kernel, instead of as a module, with this version of the kernel?

This is a legitimate question, everything else is not our problem.

See if upstream kernel.org has the same problem when using the same
kernel configuration.  If so, it is your responsibility to push them
to fix it.  Fedora will have any fixes that they apply upstream.

Comment 4 Arjan van de Ven 2004-08-09 06:23:32 UTC
making binfmt handlers modular requires exposing all kinds of
internals of the kernel to module, some of those we change in our
patches (execshield and 4g/4g basically). It's just a lot simpler by
building this one in.

Comment 5 Anand Buddhdev 2004-08-13 22:51:26 UTC
I found the solution to my problem. Under this new kernel, I first
have to mount the binfmt_misc pseudo filesystem by adding this to

none  /proc/sys/fs/binfmt_misc  binfmt_misc  defaults  0 0

After this, the wine init script is able to register a handler for
windows executables. Perhaps the kernel install script should add this
line to /etc/fstab, or at least inform the user to do so manually. I
am not the only one to have been surprised by this change.

Note You need to log in before you can comment on or make changes to this bug.