4

Debian-installer main menu has an "Execute a shell" option which starts an ash(Almquist shell) in BusyBox environment. One can exit this environment back to debian-installer with the exit command. What are the practical reasons for such BusyBox environment? Or does the debian-installer actually run inside this very same BusyBox environment?

  • The practical reason for Busybox is speed and file size. Along with busybox its dependencies ($ ldd busybox) linux-vdso, libcrypt, libc and ld-linux-x86-64 its only 2.6MB in size. Of which libc with 2.0MB is the largest dep and that library is often shared with other tools. – Pro Backup Nov 22 '17 at 22:03
4

The installer actually runs inside that environment. You can also get a shell by switching to virtual console 2 or 3.

Having a shell available on the install media turns out to be really useful to use it as a rescue disc or otherwise fix up special weirdness needed to make the install work (as an example, see my answer about LVM RAID, in particular the how to install section).

  • I couldn't find a specific link to how Busybox is used in the Debian installer, but such a link would be interesting to include in the answer. – Faheem Mitha Mar 7 '15 at 4:40
  • @derobert Another example where text editor in shell is used for modifying a script as a workaround for bug: bugs.debian.org/cgi-bin/bugreport.cgi?bug=681656#35 – Martin Mar 8 '15 at 23:16
3

BusyBox is a set of basic user and administration utilities including sh, cp, mount, etc. The Debian installer uses some of these utilities for its own purposes because it needs to perform these tasks.

In addition, there is an option for the user to get a shell prompt and run commands. This is useful when you need to do something that the designers of the installer didn't predict, for example because you have hardware that isn't supported or because you have an unusual setup.

The installer comes with BusyBox rather than with the GNU utilities found on the final system because BusyBox is significantly smaller (at the cost of having fewer features). While this isn't as important nowadays as it was in the days of floppy disks, there are still many circumstances where it's useful to save a few megabytes in the installer image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.