Re: Problem spawning init from script

From: Denis Vlasenko
Date: Fri Apr 30 2004 - 16:24:10 EST


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/