build busybox with init support but kernel complain cannot find it

Denys Vlasenko vda.linux at googlemail.com
Tue Sep 7 17:08:14 UTC 2010


On Tue, Sep 7, 2010 at 4:55 PM, loody <miloody at gmail.com> wrote:
> Dear all:
> I compile my busybox 1.17 with init support and create a symbolic link
> from /init to /bin/busybox
> but my kernel still complain cannot find the init.
> Does that mean init need other package for running?
>
> I attach my config for your reference.
> appreciate your help,
> miloody
>
> The kernel error message as below:
>
> Freeing unused kernel memory: 1868k freed
> Failed to execute /init
> Kernel panic - not syncing: No init found.  Try passing init= option to kernel.

http://busybox.net/FAQ.html#init


> And my rootfs content is below:
> # ls -lht
> total 48K
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:15 bin
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:14 lib

What is in lib?

> drwxr-xr-x 7 root root 4.0K 2010-09-07 22:14 usr
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:13 dev
> drwxr-xr-x 3 root root 4.0K 2010-09-07 22:13 etc
> drwxr-xr-x 4 root root 4.0K 2010-09-07 22:13 home
> lrwxrwxrwx 1 root root   11 2010-09-07 22:13 init -> bin/busybox
> drwxr-xr-x 3 root root 4.0K 2010-09-07 22:13 mnt
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:13 pipe
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:13 proc
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:13 sbin
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:13 sys
> drwxr-xr-x 2 root root 4.0K 2010-09-07 22:13 tmp
> # ls -lht bin
> total 608K
> -rwxr-xr-x 1 root root 603K 2010-09-07 22:25 busybox

What do "file busybox" and "readelf -e busybox" say?

> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 ash -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 cat -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 chmod -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 chroot -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 cp -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 cpio -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 date -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 dd -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 df -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 dmesg -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 echo -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 egrep -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 fgrep -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 grep -> busybox
> lrwxrwxrwx 1 root root    7 2010-09-07 22:13 gunzip -> busybox

-- 
vda


More information about the busybox mailing list