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): 2.6.7-1.494.2.2 How reproducible: Always 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:
that's a bug in the wine script not in the kernel....
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?
> 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.
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.
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 /etc/fstab: 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.