:: Re: [DNG] Considering Slackware Was…
Inizio della pagina
Delete this message
Reply to this message
Autore: Peter Duffy
Data:  
To: dng
Oggetto: Re: [DNG] Considering Slackware Was: tearing down the /usr-move project
On Sun, 2025-11-30 at 10:50 +0100, Didier Kryn wrote:
> Le 30/11/2025 à 01:41, Steve Litt a écrit :
> > Didier Kryn said on Sat, 29 Nov 2025 10:11:11 +0100
> >
> > > Let me suggest to
> > > build a static Busybox and install it on /bin and /sbin; it'll
> > > take
> > > you less effort, and the concept has fun by itself, which
> > > Slackware
> > > hasn't.
> > Questions:
> >
> > 1 Have you actually done this?
>      Yes. During several years.
> >
> > 2 Did you like the result?
>
>      First, it was in a custom initramfs, therefore not in Debian
> proper, but in a custom pre-boot system for Debian on Powerpc. It was
> necessary and it worked wonderfully on a production system.
>
>      Later I built a Linux-Busybox OS on a USB key to test Vdev, when
> Jude Nelson was developping it. It was the last time. It did the job.
>
> > 3 Was it fun to do?
>      The first thing you do when starting to develop your init
> process
> is to tell the kernel that the init program is an interactive shell
> (Busybox comes with two shells). Here you are: at the very beginning
> of
> it all. DIY; here's a part of the fun. But Busybox is fun to discover
> also.
> > 4 Did you use Busybox init?
>
>      Never. For my professional project, I devised my own init
> script.
> It was in a very peculiar case, with several diskless SBCs using a
> shared filesystem mounted on NFS, or, optionnaly, a local filesystem
> on
> a USB key. The init script detected the configuration automatically.
>
>      For Vdev test, the goal was essentially to test vdev, and there
> wasn't much init to do.
>
> > 5 Are you pretty knowledgeable about this subject?
>    I'm like a kind of veteran user, let's say. Not up to date, but
> with
> good remembrance.
> > 6 Would you like to give a remote presentation on this at GoLUG?
>
>      Don't think like doing that. I haven't fun in doing
> presentations,
> it would take me a lot of work and logistics. I'm buzy enough.
>
>      It seems there are plenty of people on this list who have the
> desire to play with this sort of things like tweaking the boot
> process
> or having static applications. Rather than painfully compiling lots
> and
> lots of applications, I say they would have less pain with building a
> static Busybox and start playing with it.
>
>      Busybox is a single program which can do it all, like ls, mount,
> or
> vi. Either you run the command 'busybox ls', or you create the
> symlink
> ls, pointing to busybox, and just run 'ls'.
>
>      You can put it any place you want. But beware: if you run the
> "install" command, it creates a large number of symlinks in /bin and
> /sbin; therefore, if you want to "install" it, do it in a chroot.
>
>      Please also note that, in Devuan, at least on my laptop, it is
> already present in /bin. You have also the option to install a
> ready-made static version instead with apt-get. In both cases the
> configuration is Debian's; I don't know what applications it provides
> and I guess it wont accept the "install" command.
>
> --     Didier


I've had some limited experience of busybox. For some years, my work
involved supporting the linux boxes used by developers of embedded
linux systems for set-top boxes: these used busybox, so I was
occasionally brought in to help with specifically busybox-related
problems. Also, and more directly, I have a Humax Foxsat PVR freesat
receiver/recorder: it runs an embedded linux based on busybox. 

Some years ago, a modified version of the firmware for the Foxsat box
was produced, which allowed a user to connect to the box using telnet
and ftp. At one point, I was trying to write an application which would
download video recordings to my PC: this involved using "find" to avoid
retrieving duplicates (at this moment, can't remember exactly how it
worked). I hit a problem in which some of the find options which worked
fine on the PC didn't work when used with the busybox version of find.
I spent a lot of time trying to work around this, and figuring out find
options which were supported by the busybox version, and which did what
I wanted to achieve.

I'm not sure how busybox is generated - I've been intending to dig into
this for some time, but haven't got round to it as yet. I originally
assumed that it was just made by combining the executables in some way
that eliminated duplicated and redundant code. But obviously if the
options differ, that can't be precisely true. I had a look at the
wikipedia page, and noticed a mention of a BSD utility called
crunchgen, which does combine actual binaries, so presumably preserving
the exact functionality of the originals.

I have to say that I was disturbed to read on the wiki page about the
licensing and legal controversies surrounding busybox. I noticed that
another project - toybox - had been founded as a result.