Closed jlxip closed 6 years ago
Nevermind. I feel stupid. If the command isn't run as root it cannot modify the system. Sorry for the inconvenience.
It's always good to ask questions instead of being in doubt, so no worries.
This line will install BusyBox in the default installation location which is the directory named _install
. That's the same directory which we refer later in the script lines when we create the root filesystem.
P.S. This whole chain of commands never do anything with your OS files, regardless of the user privileges.
By the way, once you have the basic system in the isoimage
directory, how could you install a program?
It would be good if I could install gcc
and make
, and keep going from there, installing the rest programs inside of a chroot
, such as bash
or util-linux
.
Would it be possible even to replace BusyBox with GNU Core Utilities?
I lack a lot of experience in this area, but I am really interested in learning.
In Minimal Linux Script (MLS) the only type of programs that work are statically linked programs. That's because MLS doesn't provide GNU C Library and therefore all system libraries, along with the dynamic linker are missing. In this situation only statically linked binaries can be executed, hence the need to explicitly compile BusyBox as statically linked binary.
Currently there is no established procedure how to add more stuff in MLS but in general you'd have to put your statically linked binaries in the _install/bin
folder before generating the rootfs.gz
file.
In Minimal Linux Live (MLL) the GNU C Library is present and as result many dynamically linked programs work fine. In MLL there is well established procedure how to add more software. The easiest way is to simply put your programs in the minimal_overlay/rootfs folder before you start building MLL.
You can also refer to the tutorial in MLL which explains how the statically linked version of MLL/MLS is built. Unfortunately, I never had enough time to write another tutorial which explains how the dynamically linked version of MLL works.
Feel free to ask further questions and I'll be happy to answer them! :)
https://github.com/ivandavidov/minimal-linux-script/blob/efbe1e615718186411c20ee9f6ed5e22b5d11036/minimal.sh#L16
Does this mean that busybox will be installed in the host system? Or will it only be installed in the
_install
directory?