:: Re: [DNG] busybox init
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: karl
Fecha:  
A: dng
Asunto: Re: [DNG] busybox init
Didier Kryn:
> Le 03/01/2022 à 21:27, tito via Dng a écrit :
> > On Mon, 3 Jan 2022 18:45:28 +0100 (CET)
> > karl@??? wrote:

...
> >> The sysinit thing is a how you start the system, it's just
> >> one script /etc/init.d/rcS (or where you prefer to place it).
> >>
> >> One could possible (not tested) mimic sysvinit bootup by having
> >> for i in /etc/rc2.d/S*; do $i start; done
> >> in the rcS file or if you prefer you can have your own handwritten
> >> and tuned script there.


If you have /usr on a separate partition...

This didn't work:
for i in /etc/rcS.d/S*; do $i start; done
fsck.* and mount has dep. into /usr

Manually mounting with busybox/mount works, but
there is no fsck.ext4 in busybox.
After mountall /usr is available, so the rest did work and
so did
for i in /etc/rc2.d/S*; do $i start; done

...
> > I would build a static compiled busybox binary with:


Yes like:
git clone git://busybox.net/busybox.git
cd busybox
make defconfig
make menuconfig # I wanted static busybox binary
make
mkdir /busybox
cp busybox /busybox
cd /busybox
./busybox --install .

> > init
> > a shell
> > reboot, shutdown
> > swapon/swapoff
> > mount, umount
> > (start-stop-daemon)
> > (getty, login)
>     AFAIR you would also need cttyhack, setsid and a few others I've
> forgotten if you want to be able to debug it.

...

cttyhack and setsid is in busybox upstream.

Regards,
/Karl Hammar