help with init not found error

Denis Vlasenko vda.linux at googlemail.com
Sat Apr 21 10:19:25 UTC 2007


On Saturday 21 April 2007 07:49, Tosif Ahmed wrote:
> I am still not able to get past this particular error, the following
> messages are coming on the screen
> 
> VFS: mounted root (romfs filesystem) Read only
> Freeing unused kernel memory : 120k freed
> Failed to execute /bin/msh. Attempting defaults ...
> Kernel panic - not syncing: no init found. Try passing init=option to kernel

You are here in kernel:

init/main.c

static void run_init_process(char *init_filename)
{
        argv_init[0] = init_filename;
        kernel_execve(init_filename, argv_init, envp_init);
}
...
static int init(void * unused)
        ...
        if (execute_command) {
                run_init_process(execute_command);
                printk(KERN_WARNING "Failed to execute %s.  Attempting "
                                        "defaults...\n", execute_command);
        }
        run_init_process("/sbin/init");
        run_init_process("/etc/init");
        run_init_process("/bin/init");
        run_init_process("/bin/sh");

        panic("No init found.  Try passing init= option to kernel.");
}

What can I say. Apparently your kernel found it impossible to run
all these programs. Something is wrong with them.

(1) did you try compiling "Hello world" and run it (init=/hello_world)?
    does this work?

(2) add a code which printk's kernel_execve return value:
-       kernel_execve(init_filename, argv_init, envp_init);
+       int r = kernel_execve(init_filename, argv_init, envp_init);
+       printk("kernel_execve(%s) returned %d\n", init_filename, r);
    what does it print?

--
vda



More information about the busybox mailing list