Busybox dies on booting

Denys Vlasenko vda.linux at googlemail.com
Fri Mar 20 12:26:51 UTC 2009


On Fri, Mar 20, 2009 at 12:52 PM, Roger Varley
<roger.varley at googlemail.com> wrote:
> Hi
>
> I'm new to the embedded arena and I'm trying to implement Busybox.
> When I try to boot my system Busybox fails to work as init and I get
> the message "Kernel panic - not syncing: Attempted to kill init"
>
> I'm using Busybox 1.13.3 with kernel 2.6.28.8 and using an NFS root
> file system. I've followed the FAQ and created a "Hello World",
> passing that in the command line init=/bin/hello works and I see the
> message. Replacing sbin/init with the System V init from my host
> system also starts up without a problem.

Let's figure out you reach main() and then init_main().

in libbb/appletlib.c add this line:

#if ENABLE_BUILD_LIBBUSYBOX
int lbb_main(char **argv)
#else
int main(int argc UNUSED_PARAM, char **argv)
#endif
{
+        write(1, "in main\n", 8);

and in init/init.c

int init_main(int argc UNUSED_PARAM, char **argv)
{
+        write(1, "in init_main\n", 13);

Rebuild, install new /sbin/init, reboot. What do you see?

--
vda


More information about the busybox mailing list