[opensuse-factory] Why do we have busybox now?
Hi, With the last snapshot we also got busybox $ rpm -q --whatrecommends busybox-static patterns-base-base-20170410-2.1.x86_64 My understanding is that busybox is used (mostly) in embedded systems, why is it a recommends for TW? Thanks, Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Thu, 2018-05-03 at 16:30 +0300, Robert Munteanu wrote:
Hi,
With the last snapshot we also got busybox
$ rpm -q --whatrecommends busybox-static patterns-base-base-20170410-2.1.x86_64
My understanding is that busybox is used (mostly) in embedded systems, why is it a recommends for TW?
This was added as a 'last resort chance in case you mess up your system' - intentionally the static one, so even mess with glibc could potentially be solved. Merely a way to recover your system in a more advanced way. In normal cases, you hopefully will never have to use it. Cheers Dominique
On Thu, May 3, 2018 at 4:32 PM, Dominique Leuenberger / DimStar <dimstar@opensuse.org> wrote:
On Thu, 2018-05-03 at 16:30 +0300, Robert Munteanu wrote:
Hi,
With the last snapshot we also got busybox
$ rpm -q --whatrecommends busybox-static patterns-base-base-20170410-2.1.x86_64
My understanding is that busybox is used (mostly) in embedded systems, why is it a recommends for TW?
This was added as a 'last resort chance in case you mess up your system' - intentionally the static one, so even mess with glibc could potentially be solved. Merely a way to recover your system in a more advanced way.
Sounds useful for those scenarios. Thanks for the explanation. Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2018-05-03 15:32, Dominique Leuenberger / DimStar wrote:
On Thu, 2018-05-03 at 16:30 +0300, Robert Munteanu wrote:
Hi,
With the last snapshot we also got busybox
$ rpm -q --whatrecommends busybox-static patterns-base-base-20170410-2.1.x86_64
My understanding is that busybox is used (mostly) in embedded systems, why is it a recommends for TW?
This was added as a 'last resort chance in case you mess up your system' - intentionally the static one, so even mess with glibc could potentially be solved. Merely a way to recover your system in a more advanced way.
In normal cases, you hopefully will never have to use it.
Do we have information on how to use it? :-) I mean, how do we invoke it in TW, in an emergency. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On Thu, May 3, 2018 at 4:56 PM, Carlos E. R. <robin.listas@telefonica.net> wrote:
Do we have information on how to use it? :-)
I mean, how do we invoke it in TW, in an emergency.
Call busybox-static followed by the command, e.g. $ busybox-static ls or $ busybox-static dmesg Robert -- http://robert.muntea.nu/ -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2018-05-03 16:02, Robert Munteanu wrote:
On Thu, May 3, 2018 at 4:56 PM, Carlos E. R. <> wrote:
Do we have information on how to use it? :-)
I mean, how do we invoke it in TW, in an emergency.
Call busybox-static followed by the command, e.g.
$ busybox-static ls
or
$ busybox-static dmesg
Ah, I thought it would be something more convoluted :-) -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Den 2018-05-03 kl. 16:22, skrev Carlos E. R.:
Ah, I thought it would be something more convoluted :-)
Normally you put it in your initramfs and call for it when everything goes haywire. Cheers, -- /bengan -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2018-05-03 16:27, Bengt Gördén wrote:
Den 2018-05-03 kl. 16:22, skrev Carlos E. R.:
Ah, I thought it would be something more convoluted :-)
Normally you put it in your initramfs and call for it when everything goes haywire.
I guess that would require another entry in the grub2 menu? -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 05/03/2018 04:30 PM, Carlos E. R. wrote:
Normally you put it in your initramfs and call for it when everything goes haywire.
I guess that would require another entry in the grub2 menu?
No, you just pass "init=/bin/busybox" and you're set. The whole point of busybox is to be able to provide init and minimal command line functionality with a single binary. Hence, it's being used for lots of embedded projects and some distributions like Debian actually put it into the initrd by default, so systemd can drop to a shell when the boot fails. Adrian -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2018-05-04 16:16, John Paul Adrian Glaubitz wrote:
On 05/03/2018 04:30 PM, Carlos E. R. wrote:
Normally you put it in your initramfs and call for it when everything goes haywire.
I guess that would require another entry in the grub2 menu?
No, you just pass "init=/bin/busybox" and you're set.
Ah, that's it. Yes, this makes sense :-)
The whole point of busybox is to be able to provide init and minimal command line functionality with a single binary. Hence, it's being used for lots of embedded projects and some distributions like Debian actually put it into the initrd by default, so systemd can drop to a shell when the boot fails.
Yes, that is a good idea, but should be optional - some installs use a separate and small /boot partition, and having busybox there would increase initrd size notably. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
Am 04.05.2018 um 20:19 schrieb Carlos E. R.:
Yes, that is a good idea, but should be optional - some installs use a separate and small /boot partition, and having busybox there would increase initrd size notably.
1MB to be precise. So yeah, that's a 5% increase here. For really useful functionality. -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 2018-05-06 16:57, Stefan Seyfried wrote:
Am 04.05.2018 um 20:19 schrieb Carlos E. R.:
Yes, that is a good idea, but should be optional - some installs use a separate and small /boot partition, and having busybox there would increase initrd size notably.
1MB to be precise. So yeah, that's a 5% increase here. For really useful functionality.
Sorry, I thought it was much bigger, like 10. Do we have a config option to add it to initrd? -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 05/03/2018 04:22 PM, Carlos E. R. wrote:
On 2018-05-03 16:02, Robert Munteanu wrote:
On Thu, May 3, 2018 at 4:56 PM, Carlos E. R. <> wrote:
Do we have information on how to use it? :-)
I mean, how do we invoke it in TW, in an emergency.
Call busybox-static followed by the command, e.g.
$ busybox-static ls
or
$ busybox-static dmesg
Ah, I thought it would be something more convoluted :-)
Like it states in --help output: create some symlinks to it: $ mkdir xxx $ cd xxx $ for f in $(/usr/bin/busybox-static --list); do \ ln -s /usr/bin/busybox-static $f; done $ ./uname Linux ;-) FWIW: one could also build the 'coreutils' package to have an all-in-one program which acts the same: $ ./configure --help ... --enable-single-binary=shebangs|symlinks Compile all the tools in a single binary, reducing the overall size. When compiled this way, shebangs (default when enabled) or symlinks are installed for each tool that points to the single binary. Have a nice day, Berny
On 2018-05-03 19:26, Bernhard Voelker wrote:
On 05/03/2018 04:22 PM, Carlos E. R. wrote:
On 2018-05-03 16:02, Robert Munteanu wrote:
On Thu, May 3, 2018 at 4:56 PM, Carlos E. R. <> wrote:
Do we have information on how to use it? :-)
I mean, how do we invoke it in TW, in an emergency.
Call busybox-static followed by the command, e.g.
$ busybox-static ls
or
$ busybox-static dmesg
Ah, I thought it would be something more convoluted :-)
Like it states in --help output: create some symlinks to it:
Yes, but that is what one does in an embedded system that only runs busybox, not on a full fledged Linux system such as openSUSE. And possibly in such an emergency that needs busybox, none of the commands you use in the script would work, so you would need to run them as "busybox-static mkdir xxx" etc instead. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 05/03/2018 07:26 PM, Bernhard Voelker wrote:
FWIW: one could also build the 'coreutils' package to have an all-in-one program which acts the same:
$ ./configure --help ... --enable-single-binary=shebangs|symlinks
As we had busybox space discussion in the other part of the discussion: Here's how much space all the GNU coreutils executables would use, comparing a regular build (1 executable per tool) versus one bigger 'coreutils' executable (with symlinks to it from every tool): ~/coreutils> du -shx build*/inst/bin 32M build-reg/inst/bin 5.1M build-sym/inst/bin ~/coreutils> \ls -log build-sym/inst/bin/* | grep -C3 'bin/coreutils' lrwxrwxrwx 1 9 May 7 17:55 build-sym/inst/bin/chroot -> coreutils lrwxrwxrwx 1 9 May 7 17:55 build-sym/inst/bin/cksum -> coreutils lrwxrwxrwx 1 9 May 7 17:55 build-sym/inst/bin/comm -> coreutils -rwxr-xr-x 1 5327048 May 7 17:55 build-sym/inst/bin/coreutils lrwxrwxrwx 1 9 May 7 17:55 build-sym/inst/bin/cp -> coreutils lrwxrwxrwx 1 9 May 7 17:55 build-sym/inst/bin/csplit -> coreutils lrwxrwxrwx 1 9 May 7 17:55 build-sym/inst/bin/cut -> coreutils Have a nice day, Berny -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Robert Munteanu wrote:
Hi,
With the last snapshot we also got busybox
$ rpm -q --whatrecommends busybox-static patterns-base-base-20170410-2.1.x86_64
My understanding is that busybox is used (mostly) in embedded systems, why is it a recommends for TW?
rpm helps: woodstock:~% rpm -q --changelog patterns-base-base | head -4 * Wed Apr 25 2018 tchvatal@suse.com - Add busybox to base patterns in case your system explodes, in past we had sash doing the same :D -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (8)
-
Bengt Gördén
-
Bernhard Voelker
-
Carlos E. R.
-
Dominique Leuenberger / DimStar
-
John Paul Adrian Glaubitz
-
Peter Suetterlin
-
Robert Munteanu
-
Stefan Seyfried