All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Problem spawning init from script
@ 2004-04-30  7:21 Joe Schulz
  2004-04-30 21:14 ` Denis Vlasenko
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Schulz @ 2004-04-30  7:21 UTC (permalink / raw
  To: linux-kernel


Hello world,


for internal reasons I designed a custom boot procedure with two root
partitions. One is booted by default and a script is executed via the
"init=/sbin/initscript" kernel option.

The script restrieves some information and depending on that information
it decides whether the current boot should continue or some other
partition is being mounted and boot continues on that.

As the script involves the usage of USB storage, gpg, openssl, device
mapper and various other bits, it would make some pretty big and hard
to handle initrd so I decided to try it directly as described.

Infortunately when the script tries to exec'ute either one init proces or
the other at its end, the kernel always panics:

Kernel panic: Attempted to kill init!

Does that mean I MUST use initrd to be able to use such a script or is
there a way to get around this?

Hints appreciated,
                  Joe


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem spawning init from script
  2004-04-30  7:21 Problem spawning init from script Joe Schulz
@ 2004-04-30 21:14 ` Denis Vlasenko
  2004-05-01 15:24   ` Joe Schulz
  0 siblings, 1 reply; 3+ messages in thread
From: Denis Vlasenko @ 2004-04-30 21:14 UTC (permalink / raw
  To: Joe Schulz, linux-kernel

On Friday 30 April 2004 10:21, Joe Schulz wrote:
> Hello world,
>
>
> for internal reasons I designed a custom boot procedure with two root
> partitions. One is booted by default and a script is executed via the
> "init=/sbin/initscript" kernel option.
>
> The script restrieves some information and depending on that information
> it decides whether the current boot should continue or some other
> partition is being mounted and boot continues on that.
>
> As the script involves the usage of USB storage, gpg, openssl, device
> mapper and various other bits, it would make some pretty big and hard
> to handle initrd so I decided to try it directly as described.
>
> Infortunately when the script tries to exec'ute either one init proces or
> the other at its end, the kernel always panics:
>
> Kernel panic: Attempted to kill init!

This typically means that process #1 exited. Kernel does not like that.
I always use 'exec /path/something' as the last command in my sh scripts
which I start instead of 'standard' /sbin/init.

Post your script.
--
vda


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem spawning init from script
  2004-04-30 21:14 ` Denis Vlasenko
@ 2004-05-01 15:24   ` Joe Schulz
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Schulz @ 2004-05-01 15:24 UTC (permalink / raw
  To: Denis Vlasenko; +Cc: linux-kernel

On Fr, 2004-04-30 at 23:14, Denis Vlasenko wrote:

> > Kernel panic: Attempted to kill init!
> 
> This typically means that process #1 exited. Kernel does not like that.
> I always use 'exec /path/something' as the last command in my sh scripts
> which I start instead of 'standard' /sbin/init.
> 
> Post your script.

I have found the reason. Due to a linking problem, the exec'ed process
always quietly died. Of course only in the boot process, not during
dry-run testing. So I had falsely assumed that exec'ing from #1 might
always lead to a panic if you don't use the initrd procedure.

Thanks four your kind advice.

br, Joe

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-05-01 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-30  7:21 Problem spawning init from script Joe Schulz
2004-04-30 21:14 ` Denis Vlasenko
2004-05-01 15:24   ` Joe Schulz

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.