can not set binfmt_misc register, can not write to /proc/sys/fs/binfmt_misc/ directory

can not set binfmt_misc register, can not write to /proc/sys/fs/binfmt_misc/ directory

Post by Mark Mynste » Sun, 17 Feb 2002 01:18:50



I have binfmt_misc compiled into my kernel and the
/proc/sys/fs/binfmt_misc/register directory exists but I can't set the
register key.


bash: /proc/sys/fs/binfmt_misc/register: No such file or directory

I get the following if I attempt to use sysctl:

wrapper:
error: 'fs.binfmt_misc.register' is an unknown key

And it does not get created.


total 0
dr-xr-xr-x    2 root     root            0 Feb 15 10:11 ./
dr-xr-xr-x    3 root     root            0 Feb 15 10:11 ../

Any idea what I am doing wrong?

P.S. I did set up the javawrapper etc., as per the kernel documentation...

--
-MM
                                               /"\
(No un-solicited email please.)                \ /     ASCII Ribbon Campaign
See following url,                              X      Against HTML Mail
http://pages.prodigy.net/mmynsted/spamoff.htm  / \

 
 
 

can not set binfmt_misc register, can not write to /proc/sys/fs/binfmt_misc/ directory

Post by Mark Mynste » Sun, 17 Feb 2002 02:03:30


    Mark> I have binfmt_misc compiled into my kernel and the
    Mark> /proc/sys/fs/binfmt_misc/register directory exists but I can't set the
    Mark> register key.


    Mark> bash: /proc/sys/fs/binfmt_misc/register: No such file or directory

    Mark> I get the following if I attempt to use sysctl:

wrapper:
    Mark> error: 'fs.binfmt_misc.register' is an unknown key

    Mark> And it does not get created.


    Mark> total 0
    Mark> dr-xr-xr-x    2 root     root            0 Feb 15 10:11 ./
    Mark> dr-xr-xr-x    3 root     root            0 Feb 15 10:11 ../

Never mind.

I had to mount the proc location first, i.e. I did the following and
all worked fine:

- added following to /etc/fstab:
none /proc/sys/fs/binfmt_misc binfmt_misc 0 0

- added following to /etc/sysctl.conf
fs.binfmt_misc.register = :Java:M::\xca\xfe\xba\xbe::/usr/local/bin/javawrapper:

--
-MM
                                               /"\
(No un-solicited email please.)                \ /     ASCII Ribbon Campaign
See following url,                              X      Against HTML Mail
http://pages.prodigy.net/mmynsted/spamoff.htm  / \

 
 
 

1. Q about /proc/sys/fs/binfmt_misc

hi, i'm quite inexperienced with linux even tho i've used it for quite a
while now ^_^.  Well, about my problem:

i read that binary formats can be added to the kernel without compiling an
additional module/kernel by adding a line to the binfmt_misc file using the
line:

echo ':name:type:offset:magic:mask:interpreter:' > register

I've found an example from somewhere:

echo ':Java:M::\xca\xfe\xba\xbe::/usr/local/java/bin/javawrapper:' >
register

i need linux to run my program under /root/testing/a.out  (it's a c program)
whenever it sees a file that has !#Checking on top.  i'm not quite sure how
to do this as i have trouble understanding parts of the line needed to add
to the register.. i dont understand what \xca\xfe\xba\xbe is/represents ,
offset & mask.  can someone please shed some light on this problem?

very much appreciated

angela

2. Looking for free games server sw working on Linux

3. How to mount /proc/sys/fs/binfmt_misc ?

4. getsockname ?

5. It's not bad canned meat...

6. admin-users communication

7. How to remap keyboard to Dvorak layout.

8. How can I add a new file in the directory /proc/sys/fs/

9. Canned Proxy URLs to Filter

10. CGI: apache canned response

11. For those of you tired of canned distributions...

12. Canned "ping"