[BusyBox] how to get "reboot" to work when using "minit"??

Gyepi SAM gyepi at praxis-sw.com
Tue May 4 02:24:27 UTC 2004


On Mon, May 03, 2004 at 06:43:44PM -0400, Robert P. J. Day wrote:
> i'm guessing that it has to do with the fact that "reboot" calls the
> kill_init() routine, and kill_init() might be getting confused since
> it's looking for an actual init program running, but what's running
> *instead* is minit (even though they both would have PID 1).
> 
>   NOTE: i still have the BB "init" applet configured, since i want
> a fallback in case i screw up minit somehow.  so my root filesystem
> has both:
> 
>   /sbin/init -> ../bin/busybox
>   /sbin/minit (the actual executable)
> 
> in order for reboot to work under minit, do i have to deselect the init
> applet from my BB configuration?  am i guessing correctly that it's the
> kill_init() routine that's the problem in that it's somehow getting
> confused?

According to the code, when CONFIG_FEATURE_INITRD is enabled, busybox searches
for a process called 'init' (and failing that, searches for a process called
'linuxrc'), otherwise it simply kills the process with pid == 1, whatever it
might be called. So the simple solution is to deselect the init applet. Some
people rename minit to init, which would also solve the problem, but possibly
create others as well.

It appears to me that the code is not optimal: CONFIG_FEATURE_INITRD should be
disregarded and  when a process named
'init' or 'linuxrc' cannot be found, it should be safe to assume that whatever
process has pid == 1 *is* init and should be killed.

-Gyepi




More information about the busybox mailing list