Re: [DNG] busybox init

2022-01-05 Thread Didier Kryn

Le 04/01/2022 à 03:08, Steve Litt a écrit :

k...@aspodata.se  said on Mon,  3 Jan 2022 18:45:28 +0100 (CET)



Would there be any interests having a busybox_init package which
I could possible maintain (with a little help) ?

My opinion is that the more init systems the merrier, except for
systemd.

If busybox init does not require daemons to self-background, I'd be
even more enthusiastic.

SteveT


    Busybox init is merely a simplified replacement for sysvinit. As 
sysvinit, it can be used to invoke either the famous scripts invoquing 
servers which background themselves or any supervisor or launcher of 
your choice.


    The striking feature of Busybox, in the context of a /usr merge, is 
that it has no runtime dependency if you build it as a statically linked 
executable, which is probably the most popular way to build it. I.e. it 
does not need a shared library to run, therefore does not depend on 
anything in /usr. And it provides anything you would find in /bin and 
/sbin and all the base system utilities you can find in /usr/bin and 
/usr/sbin. When you configure it, you just specify the applictions you want.


--     Didier

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-04 Thread karl
Steve Litt:
...
> If busybox init does not require daemons to self-background, I'd be
> even more enthusiastic.
...

Busybox init has its inittab, mostly for gettys, and a boot script,
that is your options.

Having daemons not-backgrounded in the rcS script isn't practical
and I don't think that is what you want.

You can have the daemon in the inittab like:

$ grep ssh /etc/inittab
tty2::respawn:/usr/sbin/sshd -d

and that works perfectly well, you can ssh to the box but only one
user at time, that is a sshd -d limit. Log output is printed on tty2.
My guess is that you don't want that either.

Why don't you start a process monitor, either at the end of the rcS 
script or from the inittab. So, in effect let init handle
/etc/rcS.d/S* and the gettys, and the process monitor /etc/rc2.d/S*.

Regards,
/Karl Hammar


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-04 Thread karl
Karl:
>  I have used busybox init for a while. It differs from sysvinit
> by not having runlevels, except perhaps on and off.
...
> 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.

  With this temporary fix:
mv /usr/lib/x86_64-linux-gnu/libpcre2-* /lib/x86_64-linux-gnu/
mv /usr/lib/x86_64-linux-gnu/libpcre2-* /lib/x86_64-linux-gnu/
mv /usr/lib/x86_64-linux-gnu/libblkid.so.1* /lib/x86_64-linux-gnu/
mv /usr/lib/x86_64-linux-gnu/libmount.so.1* /lib/x86_64-linux-gnu/
mv /usr/lib/x86_64-linux-gnu/uui /lib/x86_64-linux-gnu/
ldconfig

  static busybox compiled from git and installed in /busybox
  and theese files:
# cat inittab
::sysinit:/etc/rcS

::respawn:/sbin/agetty --noclear 38400 tty1 linux
tty2::respawn:/sbin/agetty --noclear 38400 tty2 linux
tty3::respawn:/sbin/agetty --noclear 38400 tty3 linux
tty4::respawn:/sbin/agetty --noclear 38400 tty4 linux
tty5::respawn:/sbin/agetty --noclear 38400 tty5 linux
tty6::respawn:/sbin/agetty --noclear 38400 tty6 linux

::ctrlaltdel:/busybox/poweroff
::shutdown:/busybox/swapoff -a
::shutdown:/busybox/umount -a -r
::restart:/busybox/init
# cat rcS
for i in /etc/rcS.d/S*
do
  $i start
done

for i in /etc/rc2.d/S*
do
  $i start
done

my test chimaera system boots just fine with init=/busybox/init.

Regards,
/Karl Hammar

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-04 Thread karl
Curtis Maurand:
...
> I was reading the “comment on systemd” article.  the last two sview
> and svcpage could be aliases to those shell scripts rewritten to
> take cli arguments in your .bashrc.

Whats wrong with
 grep named /var/log/messages | less
and similar ?

///

Don't cc me, I'm on the list.

Regards,
/Karl Hammar

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-04 Thread Curtis Maurand via Dng




> On Jan 3, 2022, at 6:08 PM, k...@aspodata.se wrote:
> 
> Didier Kryn:
>>> Le 03/01/2022 à 21:27, tito via Dng a écrit :
>>> On Mon,  3 Jan 2022 18:45:28 +0100 (CET)
>>> k...@aspodata.se 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
> 
> __

I was reading the “comment on systemd” article.  the last two sview and svcpage 
could be aliases to those shell scripts rewritten to take cli arguments in your 
.bashrc.

just saying.

—Curtis 
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-03 Thread Steve Litt
k...@aspodata.se said on Mon,  3 Jan 2022 18:45:28 +0100 (CET)


>Would there be any interests having a busybox_init package which
>I could possible maintain (with a little help) ?

My opinion is that the more init systems the merrier, except for
systemd.

If busybox init does not require daemons to self-background, I'd be
even more enthusiastic.

SteveT

Steve Litt 
Spring 2021 featured book: Troubleshooting Techniques of the Successful
Technologist http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-03 Thread karl
Didier Kryn:
> Le 03/01/2022 à 21:27, tito via Dng a écrit :
> > On Mon,  3 Jan 2022 18:45:28 +0100 (CET)
> > k...@aspodata.se 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

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-03 Thread Didier Kryn

Le 03/01/2022 à 21:27, tito via Dng a écrit :

On Mon,  3 Jan 2022 18:45:28 +0100 (CET)
k...@aspodata.se wrote:


  I have used busybox init for a while. It differs from sysvinit
by not having runlevels, except perhaps on and off.

Busybox repo is at: git://busybox.net/busybox.git
Website at: https://busybox.net/
Comment re. systemd: https://busybox.net/kill_it_with_fire.txt

Example inittab at:
  https://git.busybox.net/busybox/tree/examples/inittab
excerpt:

# Note: BusyBox init works just fine without an inittab. If no inittab is
# found, it has the following default behavior:
#   ::sysinit:/etc/init.d/rcS
#   ::askfirst:/bin/sh
#   ::ctrlaltdel:/sbin/reboot
#   ::shutdown:/sbin/swapoff -a
#   ::shutdown:/bin/umount -a -r
#   ::restart:/sbin/init
#   tty2::askfirst:/bin/sh
#   tty3::askfirst:/bin/sh
#   tty4::askfirst:/bin/sh

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.

Would there be any interests having a busybox_init package which
I could possible maintain (with a little help) ?

Regards,
/Karl Hammar


Hi,
just to add my 2 cents.

I would build a static compiled busybox binary with:

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.


able to fully bring up a system.
We could call it systemB like the other one but _B_etter.
Then we implant it as blob into the kernel image
so that we get rid also of initrds creating a
PAC man like  GNU/Linux/systemB/Frankenstein monster
that eats all little sysDs.

    This wasn't the proposal of Karl. He just suggested a KISS 
replacement for sysvinit. But it does not solve the issue of the 
complexity of the RC scripts: they remain exactly the same and this is 
the main (only ?) issue with them.


    The boot time is no longer an issue with faster cpus and disks. My 
laptop takes 20s to boot Chimaera and the longest is the kernel, not the 
RC scripts. I've stopped several years ago to use any mode of suspend. 
On Dell servers, the BIOS startup takes at least 10 times as long as 
Linux boot.


--     Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] busybox init

2022-01-03 Thread tito via Dng
On Mon,  3 Jan 2022 18:45:28 +0100 (CET)
k...@aspodata.se wrote:

>  I have used busybox init for a while. It differs from sysvinit
> by not having runlevels, except perhaps on and off.
> 
> Busybox repo is at: git://busybox.net/busybox.git
> Website at: https://busybox.net/
> Comment re. systemd: https://busybox.net/kill_it_with_fire.txt
> 
> Example inittab at:
>  https://git.busybox.net/busybox/tree/examples/inittab
> excerpt:
> 
> # Note: BusyBox init works just fine without an inittab. If no inittab is
> # found, it has the following default behavior:
> #   ::sysinit:/etc/init.d/rcS
> #   ::askfirst:/bin/sh
> #   ::ctrlaltdel:/sbin/reboot
> #   ::shutdown:/sbin/swapoff -a
> #   ::shutdown:/bin/umount -a -r
> #   ::restart:/sbin/init
> #   tty2::askfirst:/bin/sh
> #   tty3::askfirst:/bin/sh
> #   tty4::askfirst:/bin/sh
> 
> 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.
> 
> Would there be any interests having a busybox_init package which
> I could possible maintain (with a little help) ?
> 
> Regards,
> /Karl Hammar
>

Hi,
just to add my 2 cents. 

I would build a static compiled busybox binary with:

init
a shell 
reboot, shutdown
swapon/swapoff
mount, umount
(start-stop-daemon)
(getty, login)

able to fully bring up a system.
We could call it systemB like the other one but _B_etter.
Then we implant it as blob into the kernel image
so that we get rid also of initrds creating a
PAC man like  GNU/Linux/systemB/Frankenstein monster
that eats all little sysDs.

Ciao,
Tito




___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] busybox init

2022-01-03 Thread karl
 I have used busybox init for a while. It differs from sysvinit
by not having runlevels, except perhaps on and off.

Busybox repo is at: git://busybox.net/busybox.git
Website at: https://busybox.net/
Comment re. systemd: https://busybox.net/kill_it_with_fire.txt

Example inittab at:
 https://git.busybox.net/busybox/tree/examples/inittab
excerpt:

# Note: BusyBox init works just fine without an inittab. If no inittab is
# found, it has the following default behavior:
#   ::sysinit:/etc/init.d/rcS
#   ::askfirst:/bin/sh
#   ::ctrlaltdel:/sbin/reboot
#   ::shutdown:/sbin/swapoff -a
#   ::shutdown:/bin/umount -a -r
#   ::restart:/sbin/init
#   tty2::askfirst:/bin/sh
#   tty3::askfirst:/bin/sh
#   tty4::askfirst:/bin/sh

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.

Would there be any interests having a busybox_init package which
I could possible maintain (with a little help) ?

Regards,
/Karl Hammar


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Busybox Init: Was tiny service state api [WAS: Fwd: init system agnosticism]

2017-04-14 Thread karl
Steve Litt:
...
> This is the perfect opportunity to explore this more. Karl is one of
> the tiny minority of people to have successfully booted using the
> Busybox Init.

Why do you make it sound like it is difficult, it isn't something that
you need any advanced skill to solve. It's just that you have to do 
it yourself, the installer won't do it for you.

> How did you like the Busybox Init?

I'm perfectly fine with it, it's just like the bsd startup scripts
in the 80-ties. There is some issues I havn't bothered solve,
/sbin/shutdown doesn't work as is, I have to use busybox poweroff
in a root terminal.

> Do you still use Busybox
> Init, or do you use a different init system for your day to day
> computing?

On some boxes I use bb init, on some other there is sysv.

> I think you once made documentation for how you installed
> Busybox Init. If so, could you please post the URL to your
> documentation?

http://aspodata.se/computing/busybox_init.txt

Regards,
/Karl Hammar

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


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Busybox Init: Was tiny service state api [WAS: Fwd: init system agnosticism]

2017-04-14 Thread Steve Litt
On Fri, 14 Apr 2017 11:29:12 +0100
Simon Hobson  wrote:

> k...@aspodata.se wrote:
 
> But then I'm one of those generally happy with SysVInit style
> booting. It's easy to understand, it's generally reliable, it's
> fairly easy to debug if something isn't right. But I also recognise
> that others aren't happy and if they want to use something else then
> that's OK by me - as long as what they propose isn't something that
> "infects" stuff I want to run under SysVInit.

Hi Simon,

This is the perfect opportunity to explore this more. Karl is one of
the tiny minority of people to have successfully booted using the
Busybox Init.

Hi Karl, 

How did you like the Busybox Init? Do you still use Busybox
Init, or do you use a different init system for your day to day
computing? I think you once made documentation for how you installed
Busybox Init. If so, could you please post the URL to your
documentation?

SteveT

Steve Litt 
April 2017 featured book: Troubleshooting Techniques
 of the Successful Technologist
http://www.troubleshooters.com/techniques
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng