:: Re: [Dng] minimal init
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Isaac Dunham
Ημερομηνία:  
Προς: karl
Υ/ο: dng
Αντικείμενο: Re: [Dng] minimal init
On Sat, Jan 17, 2015 at 11:13:46PM +0100, karl@??? wrote:
> Someone mentioned [1].
>
> So I tried busybox's init. It works great, my exp. config is at [2].
>
> ///
>
> Also it would be possible to have a startup script (/etc/rcS) like:
>
> #!/bin/bash
>
> echo -n "Which init do you want to use? "
> read -t 5 a # bash's read has a timeout option
> if [ $? -gt 0 ]
> then
> echo timeout, use normal init
> exec /sbin/normal_init <boot args...>
> else
> echo Switching to init_$a
> exec /sbin/init_$a <boot args...>
> fi
>
> ///
>
> Basically, nothing hinders one to choose init's on the fly, or ?


Wouldn't work: init is PID 1 (init starts /etc/rcS, not the other way
around).

If you wanted to switch init after boot, you need to have that script
in /sbin/init and have all other inits at other paths.
> (Well yes, they need different /etc/inittab's, but that is solvable.)
>
> Regards,
> /Karl Hammar
>
> [1] http://www.troubleshooters.com/linux/init/manjaro_experiments.htm
> [2] http://turkos.aspodata.se/computing/busybox_init.txt


HTH,
Isaac Dunham