Skip to contentSkip to conversation

Kernel eats argument=

DISCUSSION Nico Schottelius 3 participants 4 messages Jun 17, 2005

lore
Share & tools
lore
#0 lore raw

Hello!

I wanted to have 'cprofile=a_profile" specified to my init system. Now after some hours of debugging I see that everything that is in the form of

bla=blub

is eaten by the kernel and _not_ given to init.
Is that how it should be or is that a bug?

If it's how it should be, I'll switch to "cprofile:a_profile" or will Linux eat that, too?

The most mysterious thing (for me) is that /proc/cmdline contains that stuff again.

Nico, somehow confused

Signature · 3 lines
Keep it simple & stupid, use what's available.
Please use pgp encryption: 8D0E 27A4 is my id.
http://nico.schotteli.us | http://linux.schottelius.org
#1 lore raw
Quoted 8 lines · Nico Schottelius

I wanted to have 'cprofile=a_profile" specified to my init system. Now after some hours of debugging I see that everything that is in the form of

bla=blub

is eaten by the kernel and _not_ given to init. Is that how it should be or is that a bug?

Well, everything the kernel doesn't understand as a parameter (eg. for modules) actually *is* passed to init, but not as command-line arguments, but as environment variables. You'll probably find that :-)

MfG, JBG
PS: Not including sender's email address in Cc because I'm too lame to ACK my email for his email system...

Signature · 4 lines
Jan-Benedict Glaw       [email protected]    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
#2 lore raw
In reply to Nico Schottelius
Quoted 1 line

[Does the kernel eat arguments?]

Found the answer myself:

init/main.c:

/*
* Unknown boot options get handed to init, unless they look like
* failed parameters
*/
static int __init unknown_bootoption(char *param, char *val)

Yes, it does and I'll have to use a different string.

Have a nice day,

Nico

#3 lore raw
In reply to Nico Schottelius
Quoted 11 lines · Nico Schottelius

Hello!

I wanted to have 'cprofile=a_profile" specified to my init system. Now after some hours of debugging I see that everything that is in the form of

bla=blub

is eaten by the kernel and _not_ given to init.
Is that how it should be or is that a bug?

Quoted 8 lines

If it's how it should be, I'll switch to "cprofile:a_profile" or will Linux eat that, too?

The most mysterious thing (for me) is that /proc/cmdline contains that stuff again.

Nico, somehow confused

Init gets a single parameter 'auto'. Variables not understood by the kernel get put into the environment....

OME=/TERM=linuxSELINUX_INIT=YES
|
|______ maybe a bug, no "H".

Cheers,
Dick Johnson
Penguin : Linux version 2.6.11.9 on an i686 machine (5537.79 BogoMips).
Notice : All mail here is now cached for review by Dictator Bush.
98.36% of all statistics are fiction.