[lkml]   [1996]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectProblem with init= parameter when starting kernel
Oliver Elphick
Isle of Wight
At kernel 2.0.13 and 2.0.21 (and probably others), if the argument init=...
is given to the kernel, as for example:


the kernel calls the specified program but seems to execute it wrongly. failed with the message

Usage: sh 0123456SsQqAaBbCc

repeated continually.

I rebooted with the existing /sbin/init, so I copied /sbin/init to
/sbin/init.old and tried rebooting with init=/sbin/init.old - I got the
same error.

I then tried


This worked, but echo $0 printed:


I think the problem is probably in the code at the end of init/main.c, but
I cannot see what's wrong with it. The line that I think must be
introducing the 'sh' into arg[0] is

pid = kernel_thread(do_shell,
execute_command ? execute_command : "/bin/sh",

However, execute_command is set or else this code shouldn't get
executed, so how does the second parameter evaluate to "/bin/sh"?

The advice to try a new version of init in this manner was given in the
release notes for sysvinit-2.62, but this problem makes it impossible
to test it in this way.
 \ /
  Last update: 2005-03-22 13:38    [W:0.019 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site