execve of /sbin/init fails

4 messages, 3 authors, 2006-05-30 · open the first message on its own page

execve of /sbin/init fails

From: Anantharaman Chetan-W16155 <hidden>
Date: 2006-05-30 20:00:04

Hi, 

I am trying to bring up a custom board with a PPC405 processor running
Linux 2.4.20 (MontaVista Release) and am having problems with the call
to execve("/sbin/init", argv_init, envp_init) not returning in the file
main.c. The processor just hangs and there is no output on the terminal.
I have tried to see if I can run "bin/sh" and even this execve call does
not return. Some things about the board are, the networking option has
been disabled in the Linux .config file. I am running U-Boot 1.1.1 as
the bootloader and am downloading the uImage (compressed kernel) and the
initrd.boot (filesystem) into RAM and accessing the filesystem in RAM. 

 

Any help as to what could be causing this to happen or how to debug this
issue would be appreciated. Also, I've tried to capture the return value
of the execve call but since the call does not return, this has not
helped any.

 

Thanks,

Chetan Anantharaman

 

 

Re: execve of /sbin/init fails

From: "Andy Gospodarek" <andy@greyhouse.net>
Date: 2006-05-30 21:22:29

You could also try compiling init statically.  I've had success with
that in the past until I figured out what the actual problem was.


On 5/30/06, Anantharaman Chetan-W16155
[off-list ref] wrote:



Hi,

I am trying to bring up a custom board with a PPC405 processor running Linux
2.4.20 (MontaVista Release) and am having problems with the call to
execve("/sbin/init", argv_init, envp_init) not returning in the file main.c.
The processor just hangs and there is no output on the terminal. I have
tried to see if I can run "bin/sh" and even this execve call does not
return. Some things about the board are, the networking option has been
disabled in the Linux .config file. I am running U-Boot 1.1.1 as the
bootloader and am downloading the uImage (compressed kernel) and the
initrd.boot (filesystem) into RAM and accessing the filesystem in RAM.



Any help as to what could be causing this to happen or how to debug this
issue would be appreciated. Also, I've tried to capture the return value of
the execve call but since the call does not return, this has not helped any.



Thanks,

Chetan Anantharaman




_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded

Re: execve of /sbin/init fails

From: Steve Iribarne (GMail) <hidden>
Date: 2006-05-30 21:29:29

On 5/30/06, Anantharaman Chetan-W16155
[off-list ref] wrote:



Hi,

I am trying to bring up a custom board with a PPC405 processor running Linux
2.4.20 (MontaVista Release) and am having problems with the call to
execve("/sbin/init", argv_init, envp_init) not returning in the file main.c.

Hmm.. Ok.. so I've read the other suggestions all good, but I think we
are missing some info.  Are you running Busybox?  If you are using
Busybox, what version?  Also, what init are you using?  Are you using
busyboxes?

The ramdisk suggestion was a good one.  First off, check what is in
your ramdisk.  Also check the rights of the files in the ramdisk.
Make sure you have the execute bit set.  I've seen exactly what you
are seeing when my rights on the file init were messed up.

Also I think I've seen a hang with an older version of Busybox using
their version of init.  I just got sysinit and that seemed to fix it,
(Although I had to reconfig Busybox to not use their version of init)



The processor just hangs and there is no output on the terminal.

When you say the process just "hangs", where are you in the boot
cycle?  Is it before you see the linux kernel starting to load?  Or do
you see any kernel messages start to spew out?

Hope this helps a little.

-stv

Re: execve of /sbin/init fails

From: "Andy Gospodarek" <andy@greyhouse.net>
Date: 2006-05-30 22:15:19

On 5/30/06, Steve Iribarne (GMail) [off-list ref] wrote:
On 5/30/06, Anantharaman Chetan-W16155
[off-list ref] wrote:
quoted



Hi,

I am trying to bring up a custom board with a PPC405 processor running Linux
2.4.20 (MontaVista Release) and am having problems with the call to
execve("/sbin/init", argv_init, envp_init) not returning in the file main.c.

Hmm.. Ok.. so I've read the other suggestions all good, but I think we
are missing some info.  Are you running Busybox?  If you are using
Busybox, what version?  Also, what init are you using?  Are you using
busyboxes?

The ramdisk suggestion was a good one.  First off, check what is in
your ramdisk.  Also check the rights of the files in the ramdisk.
Make sure you have the execute bit set.  I've seen exactly what you
are seeing when my rights on the file init were messed up.

Also I think I've seen a hang with an older version of Busybox using
their version of init.  I just got sysinit and that seemed to fix it,
(Although I had to reconfig Busybox to not use their version of init)
I guess I totally assumed busybox was being used, so good suggestion.
I too saw this with an older version of busybox (0.60 maybe?) and I
ended up editing the config to contain only init and then compiled it
statically and placed it on the rootfs.  It turned out to be just the
right size and functionality for my needs.  I think I later updated to
a 1.0 or 1.1-series and didn't have to use the same hack.


quoted
The processor just hangs and there is no output on the terminal.

When you say the process just "hangs", where are you in the boot
cycle?  Is it before you see the linux kernel starting to load?  Or do
you see any kernel messages start to spew out?

Hope this helps a little.

-stv
_______________________________________________
Linuxppc-embedded mailing list
Linuxppc-embedded@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-embedded
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help