[BusyBox] Possible Bug in BB Init
Gene Cumm
greenpuddy at stny.rr.com
Thu Mar 20 23:23:03 UTC 2003
I'm sorry for how long this is but I felt the need to explain thoroughly
to minimize wasted replies and replies to replies to answer stuff.
System Environment: uClibc 0.9.16, busybox 0.60.5, kernel 2.4.20 with
custom patches
Problem: Script started by sysinit directive in /etc/inittab doesn't
complete before additional tty's are initialized by lines like
"tty2::askfirst:/bin/lash".
I have created a custom root tar.gz file, which holds the contents of my
root filesystem. I am not able to currently run linuxrc (although it's
technically deprecated for 2.6 and just removed entirely in 2.5(.64?)).
Instead of using linuxrc, I launch my linuxrc script from the script
called by init for sysinit. In there, I create the majority of my
device nodes(I'm not currently using devfs). After booting, I found
that I couldn't switch to tty2 and tty3, which I thought I had launched
a shell on by inittab.
After frustration and a little testing, I found that the problem is that
it seems like busybox init launches the shells on the other terminals
before waiting for the sysinit script to finish. That, or it tests for
their existance and ignores them becase they initially don't exist. I
found this by creating tty2 in my build directory, recreating my tarball
and tty2 worked while tty3 still didn't.
"'sysinit' is the first item run on boot. init waits until all sysinit
actions are completed before continuing."(BusyBox.txt) was what I
expected. Complete all sysinit's (I only have one) then process the
rest of the file.
Is this a bug, know or unknown, or a normally unexpected use that's failing?
Next step sounds to me to be sift through the source code but that'll
have to wait til tomorrow. It's getting too late as it is. I figured
e-mail the list to see if anyone else has encountered this or similar
issues before. I looked through the recent archives and didn't find
anything.
Only 3 things I can think to do right now, sift init.c, create all the
tty's I need, or maybe try a current bb cvs.
More information about the busybox
mailing list