Re: Booting with something else instead of /sbin/init

2003-01-22 Thread Christoph Bugel
On 2003-01-22  Michael Sternberg wrote:
 
 Hello
 I'm trying to make kernel to start a different
 application instead of /sbin/init. So, I passing
 init=/bin/sh in kernel command line. I actually
 can see this setting in messages emitted by kernel.
 But from some reason the kernel starts a real
 /sbin/init and ignores my setting.

It should work.. is your /bin/sh statically linked? I think it
should be. (if you can't find out why it doesn't work, rename
your /bin/sh to /sbin/init :)
If there *is* a problem with your /bin/sh, the kernel will try a
few alternatives: (linux/init/main.c)


   /*
 * We try each of these until one succeeds.
 *
 * The Bourne shell can be used instead of init if we are
 * trying to recover a really broken machine.
 */

if (execute_command)
execve(execute_command,argv_init,envp_init);
execve(/sbin/init,argv_init,envp_init);
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.);




=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Re: Booting with something else instead of /sbin/init

2003-01-22 Thread Gilad Ben-Yossef
On Tue, 2003-01-21 at 23:04, Michael Sternberg wrote:
 Hello
 I'm trying to make kernel to start a different
 application instead of /sbin/init. So, I passing
 init=/bin/sh in kernel command line. I actually
 can see this setting in messages emitted by kernel.
 But from some reason the kernel starts a real
 /sbin/init and ignores my setting.
 
 Last strings from kernel were:
 
 VFS: Mounted root (jffs2 filesystem).
 Freeing unused kernel memory: 52k init
 
 and then the real init starts.
 
 What can be the problem ?

Are you sure that you are booting straight into the *real* root file
system and not going though initrd? Because if you are going through
initrd, the kernel will run /linuxrc regardless of init settings (and
rightfully so - it's not init).If Busybox is invoked via /linuxrc it
will behave as init, I believe. Try passing noinitrd as a boot
parameter and see what's happens.

Gilad


=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]




Booting with something else instead of /sbin/init

2003-01-21 Thread Michael Sternberg

Hello
I'm trying to make kernel to start a different
application instead of /sbin/init. So, I passing
init=/bin/sh in kernel command line. I actually
can see this setting in messages emitted by kernel.
But from some reason the kernel starts a real
/sbin/init and ignores my setting.

Last strings from kernel were:

VFS: Mounted root (jffs2 filesystem).
Freeing unused kernel memory: 52k init

and then the real init starts.

What can be the problem ?

My setup: PPC, PPCboot (where I'm setting
kernel arguments), busybox init and sh (ash)

Thanks, Michael.

-- 



=
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word unsubscribe in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]