trying to debug my failure to start "init"

3 messages, 2 authors, 2004-06-10 · open the first message on its own page

trying to debug my failure to start "init"

From: Robert P. J. Day <hidden>
Date: 2004-06-09 23:17:35

  just before i pack it in for the day, i'm still grappling with why i
can't get the linuxppc-2.5 kernel to start the init/minit program on my
8xx board.  very curious, since it used to be able to, even if it hung
immediately afterwards.

  for more feedback, i added a printk() call to the run_init_process()
function in init/main.c to see what it thought it was doing.  the tail end
of my boot sequence was:

...
Kernel command line: console=ttyS0,9600 rw root=/dev/ram0 init=/sbin/minit
... snip ...
RAMDISK: Compressed image found at block 0
VFS: Mounted root (ext2 filesystem).             <-- good
Mounted devfs on /dev                            <-- also good
Freeing unused kernel memory: 52k init
Trying run_init_process with /sbin/minit         <-- hmm, that should work
Trying run_init_process with /sbin/init
Trying run_init_process with /etc/init
Trying run_init_process with /bin/init
Trying run_init_process with /bin/sh
Kernel panic: No init found.  Try passing init= option to kernel.


  at this point, i'm out of ideas, and in need of a beer.  thanks to
everyone who's provided advice so far.

rday

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: trying to debug my failure to start "init"

From: Mark Chambers <hidden>
Date: 2004-06-10 12:25:35

  for more feedback, i added a printk() call to the run_init_process()
function in init/main.c to see what it thought it was doing.
Maybe you should add a printout of errno, which the execve() inside of
run_init_process() will set - might give an important clue.

Mark Chambers


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: trying to debug my failure to start "init"

From: Robert P. J. Day <hidden>
Date: 2004-06-10 13:00:30

On Thu, 10 Jun 2004, Mark Chambers wrote:
quoted
  for more feedback, i added a printk() call to the run_init_process()
function in init/main.c to see what it thought it was doing.
Maybe you should add a printout of errno, which the execve() inside of
run_init_process() will set - might give an important clue.
did that, here are the results:

Freeing unused kernel memory: 52k init
Trying run_init_process with /sbin/minit
Error code from execve: -1
Errno: 2
Trying run_init_process with /sbin/init
Error code from execve: -1
Errno: 14
Trying run_init_process with /etc/init
Error code from execve: -1
Errno: 14
Trying run_init_process with /bin/init
Error code from execve: -1
Errno: 14
Trying run_init_process with /bin/sh
Error code from execve: -1
Errno: 14
Kernel panic: No init found.  Try passing init= option to kernel.


  if i read the include files correctly (include/asm-generic/errno*.h), i
read this as:

#define ENOENT           2      /* No such file or directory */
#define EFAULT          14      /* Bad address */

note that the error for minit is different from all the busybox errors.
the man page for execve() tells me this:

ENOENT The file filename or a script or ELF interpreter does not exist,
or a shared library needed for file or interpreter cannot be found.

EFAULT filename points outside your accessible address space.

  so, i guess the next step is to compile minit statically and see what
happens.

rday


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help