:: Re: [Dng] minimal init
Inizio della pagina
Delete this message
Reply to this message
Autore: karl
Data:  
To: dng
Oggetto: Re: [Dng] minimal init
Isaac Dunham:
> 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).


True, busybox does a fork and runs /etc/rcS, seems I was daydreaming.

> 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.


Hmm, would that be useful, probably easiest to tell kernel init=...

Regards,
/Karl Hammar

-----------------------------------------------------------------------
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden
+46 173 140 57