From: Pete Popov <ppopov@pacbell.net>
To: Steven Liu <stevenliu@psdc.com>
Cc: linux-mips@oss.sgi.com
Subject: Re: Could not find the source code for "/sbin/init".
Date: Tue, 07 Aug 2001 10:49:28 -0700 [thread overview]
Message-ID: <3B702A28.5020002@pacbell.net> (raw)
In-Reply-To: 84CE342693F11946B9F54B18C1AB837B0A2257@ex2k.pcs.psdc.com
Steven Liu wrote:
> 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.
/sbin/init is part of the SysVInit package.
Your problem is most likely NOT with /sbin/init itself. I would start by loading
sash first; if that works, try a static bash; if that works, try a dynamically
linked bash.
Pete
next prev parent reply other threads:[~2001-08-07 17:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-07 17:39 Could not find the source code for "/sbin/init" Steven Liu
2001-08-07 17:39 ` Steven Liu
2001-08-07 17:49 ` Pete Popov [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-08-14 18:21 Steven Liu
2001-08-14 18:21 ` Steven Liu
2001-08-14 18:37 ` Pete Popov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3B702A28.5020002@pacbell.net \
--to=ppopov@pacbell.net \
--cc=linux-mips@oss.sgi.com \
--cc=stevenliu@psdc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.