linux-mips
[Top] [All Lists]

Could not find the source code for "/sbin/init".

To: <linux-mips@oss.sgi.com>
Subject: Could not find the source code for "/sbin/init".
From: "Steven Liu" <stevenliu@psdc.com>
Date: Tue, 7 Aug 2001 10:39:07 -0700
Sender: owner-linux-mips@oss.sgi.com
Thread-index: AcEfZ9sR8pfBso9zTOeZBYlOZk+QMQ==
Thread-topic: Could not find the source code for "/sbin/init".
Hi ALL:

As we know, the function init( ) in main.c is 

static int init(void * unused)
{
        lock_kernel();
        do_basic_setup();
        free_initmem();
        unlock_kernel();

        if (open("/dev/console", O_RDWR, 0) < 0)
                printk("Warning: unable to open an initial console.\n");

        (void) dup(0);
        (void) dup(0);
        

        if (execute_command)
                execve(execute_command,argv_init,envp_init);

        execve("/sbin/init",argv_init,envp_init);    //<--- problem

        execve("/etc/init",argv_init,envp_init);
        execve("/bin/init",argv_init,envp_init);
        execve("/bin/sh",argv_init,envp_init);
        panic("No init found.  Try passing init= option to kernel.");
} 

The system call execve("/sbin/init",argv_init,envp_init) will start a
background process.
In my case, it could not start the process, that is, system hangs there
and 
execve("/etc/init",argv_init,envp_init) could not be executed.


Could you tell me where could I find the source code for the executable
/sbin/init? 

Thank you very much for your help.

Regards,

Steven Liu

<Prev in Thread] Current Thread [Next in Thread>