Discussion:
my /etc/init.d/rcS won't run
Brian Beattie
2008-07-31 22:36:26 UTC
Permalink
I'm building a generic powerpc buildroot and it's all working as far as
I can tell, except the /etc/init.d/rcS will not run. The line
"null::sysinit:/etc/init.d/rcS" is in /etc/inittab (I'm using
target/generic/target_skeleton/...). Everything else in inittab seems
to be working and when I take the entries that mount /proc and all out
/proc does not get mounted. When I run /etc/rcS it works fine. The
permissions look OK. I even put "echo $0>>/tag" as the first
executable line in the file, but rcS just does not want to run.

I'm baffeled, has anybody else run into this?
Hinko Kocevar
2008-08-01 07:24:31 UTC
Permalink
Post by Brian Beattie
I'm building a generic powerpc buildroot and it's all working as far as
I can tell, except the /etc/init.d/rcS will not run. The line
"null::sysinit:/etc/init.d/rcS" is in /etc/inittab (I'm using
target/generic/target_skeleton/...). Everything else in inittab seems
to be working and when I take the entries that mount /proc and all out
/proc does not get mounted. When I run /etc/rcS it works fine. The
permissions look OK. I even put "echo $0>>/tag" as the first
executable line in the file, but rcS just does not want to run.
I'm baffeled, has anybody else run into this?
Is the /etc on the same partition as /bin, /sbin?

Can you post the error displayed? Also you might want to use this shabang

#!/bin/sh -x

in the /etc/init.d/rcS to see some debugging..

HTH,
Hinko
--
ČETRTA POT, d.o.o., Kranj
Planina 3
4000 Kranj
Slovenia, Europe
Tel. +386 (0) 4 280 66 03
E-mail: ***@cetrtapot.si
Http: www.cetrtapot.si
Brian Beattie
2008-08-01 12:47:37 UTC
Permalink
Post by Hinko Kocevar
Post by Brian Beattie
I'm building a generic powerpc buildroot and it's all working as far as
I can tell, except the /etc/init.d/rcS will not run. The line
"null::sysinit:/etc/init.d/rcS" is in /etc/inittab (I'm using
target/generic/target_skeleton/...). Everything else in inittab seems
to be working and when I take the entries that mount /proc and all out
/proc does not get mounted. When I run /etc/rcS it works fine. The
permissions look OK. I even put "echo $0>>/tag" as the first
executable line in the file, but rcS just does not want to run.
I'm baffeled, has anybody else run into this?
Is the /etc on the same partition as /bin, /sbin?
Can you post the error displayed? Also you might want to use this shabang
#!/bin/sh -x
in the /etc/init.d/rcS to see some debugging..
No errors, shell scripts would not run.

What I found was that including bash, caused /bin/sh to point to bash
and for dome reason bash does not want to run that early. Currently
I've dropped bash.
Post by Hinko Kocevar
HTH,
Hinko
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting a bad thing?

Brian Beattie LFS12947 | "Honor isn't about making the right choices.
beattie-***@public.gmane.org | It's about dealing with the consequences."
www.beattie-home.net | -- Midori Koto
John Voltz
2008-08-01 13:12:43 UTC
Permalink
Post by Brian Beattie
What I found was that including bash, caused /bin/sh to point to bash
and for dome reason bash does not want to run that early. Currently
I've dropped bash.
Try adding init=/bin/bash to your kernel parameters in your bootloader. This
will boot you directly into a bash shell without running init, so you can
see if something's wrong with bash.

John
Wade Berrier
2008-08-01 14:27:02 UTC
Permalink
I'm also running into this.

I've found out so far that bash is segfaulting when getting run from init.

Attached is an strace of this happening.

Wade
Post by John Voltz
Post by Brian Beattie
What I found was that including bash, caused /bin/sh to point to bash
and for dome reason bash does not want to run that early. Currently
I've dropped bash.
Try adding init=/bin/bash to your kernel parameters in your bootloader. This
will boot you directly into a bash shell without running init, so you can
see if something's wrong with bash.
John
_______________________________________________
buildroot mailing list
http://busybox.net/mailman/listinfo/buildroot
Marc Gauthier
2008-08-01 15:55:32 UTC
Permalink
We've also seen this in other architectures (Xtensa).
Turned out bash turns off a whole bunch of features when cross-compiled,
not sure why. Someone worked around it by fiddling with the bash
configure script, IIRC. But we haven't yet come up with a patch to
package/bash/bash.mk to fix it. If you can do that, that would be great!
(Or, talk to bash maintainers and fix the configure script itself.)

Don't know if that's the same problem you're seeing here. We haven't
sync'ed with the main buildroot tree in a few months. So I could be
way off here...

-Marc
Post by Wade Berrier
I'm also running into this.
I've found out so far that bash is segfaulting when getting run from init.
Attached is an strace of this happening.
Wade
Post by John Voltz
Post by Brian Beattie
What I found was that including bash, caused /bin/sh to point to bash
and for dome reason bash does not want to run that early. Currently
I've dropped bash.
Try adding init=/bin/bash to your kernel parameters in your
bootloader. This
Post by John Voltz
will boot you directly into a bash shell without running init,
so you can
Post by John Voltz
see if something's wrong with bash.
John
Wade Berrier
2008-08-04 16:31:41 UTC
Permalink
Hi,
Post by Marc Gauthier
We've also seen this in other architectures (Xtensa).
Turned out bash turns off a whole bunch of features when cross-compiled,
not sure why. Someone worked around it by fiddling with the bash
configure script, IIRC. But we haven't yet come up with a patch to
package/bash/bash.mk to fix it. If you can do that, that would be great!
(Or, talk to bash maintainers and fix the configure script itself.)
Thanks for the fix! This turned out to be the case for me as well.
I'll attach a fix to the list momentarily.

Wade
Post by Marc Gauthier
Don't know if that's the same problem you're seeing here. We haven't
sync'ed with the main buildroot tree in a few months. So I could be
way off here...
-Marc
Post by Wade Berrier
I'm also running into this.
I've found out so far that bash is segfaulting when getting run from init.
Attached is an strace of this happening.
Wade
Post by John Voltz
Post by Brian Beattie
What I found was that including bash, caused /bin/sh to point to bash
and for dome reason bash does not want to run that early. Currently
I've dropped bash.
Try adding init=/bin/bash to your kernel parameters in your
bootloader. This
Post by John Voltz
will boot you directly into a bash shell without running init,
so you can
Post by John Voltz
see if something's wrong with bash.
John
Loading...