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

Robert P. J. Day rpjday at mindspring.com
Sun May 9 12:52:07 UTC 2004


On Sun, 9 May 2004, Rob Landley wrote:

> Init is always pid 1.  By definition.  If pid 1 exits, the kernel panics with 
> "attempted to kill init".  PID 1 will inherit orphan child processes.  Check 
> the implementation of the kernel function "daemonize()", which used to be 
> called reparent_to_init().
> 
> If init is ever NOT running as PID 1, this is a bug.

i'm not sure you correctly interpreted what i posted.  WRT minit, when i
boot using minit (that is, the cross-compiled minit, not the BB applet),
that process *is* running as PID 1, that's not a problem.

previously, my bootable image had *both* the BB init applet and the minit
executable and, because they use completely independent support files and 
directories, i could select the init-like program at boot time, and 
everything worked fine.  whichever one i selected would be PID 1.

the only problem (and a niggling one, i confess) is that the BB "reboot" 
applet wouldn't reboot the system if i booted using minit:

  # reboot
  no services killed 	# or something like that, from memory

as i reported before, the BB reboot applet seemed to not be able to 
handle the combination of:

  1) BB init being selected as part of the BB build, but
  2) a different program being used at boot time

which strikes me as a perfectly legal thing to do and something reboot
(and shutdown, for similar reasons) should be able to deal with.

  eventually, since minit seemed to be working fine, i finally deselected
"init" from the BB build, and everything works fine now, including reboot.
still, i think it's a shortcoming in reboot that it can't deal with the
above scenario.

  and, with that, i will move on to newer and more mind-bending pursuits,
like figuring out what to replace dpkg with. :-)

rday



More information about the busybox mailing list