Changed 'BusyBox' to 'Busybox'.

This commit is contained in:
Ivan Davidov 2019-03-25 16:46:44 +02:00
parent 52e3938d1f
commit 99ec7d2e7d
14 changed files with 73 additions and 74 deletions

View File

@ -46,7 +46,7 @@ As of **25-Mar-2019**:
* Linux kernel 5.0.4 (stable)
* GNU C Library 2.27 (stable)
* BusyBox 1.30.1 (stable)
* Busybox 1.30.1 (stable)
* Stable build on default Ubuntu 18.04.2 installation with applied system updates.
### Future improvements
@ -160,7 +160,7 @@ docker run -it minimal-linux-live /bin/sh
* [K1773R's MLL](https://github.com/K1773R/minimal) - PowerPC version of Minimal Linux Live with [memtester](http://pyropus.ca/software/memtester) as additional software. Impressive work!
* [Ladiko's MLL](https://github.com/ladiko/minimal) - this fork automatically downloads and uses the latest available Kernel and BusyBox sources. By default there is NTFS and SquashFS support. The fork also provides an installer which can be used to put MLL on USB flash device.
* [Ladiko's MLL](https://github.com/ladiko/minimal) - this fork automatically downloads and uses the latest available Kernel and Busybox sources. By default there is NTFS and SquashFS support. The fork also provides an installer which can be used to put MLL on USB flash device.
* [AwlsomeLinux](https://github.com/AwlsomeAlex/AwlsomeLinux) - MLL fork which provides additional overlay bundles (ncurses and Nano).

View File

@ -39,7 +39,7 @@
</div>
<div class="row">
<div class="twelve columns">
Minimal Linux Live is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the <a target="_blank" href="http://kernel.org">Linux kernel</a>, <a target="_blank" href="http://gnu.org/software/libc">GNU C library</a> and <a target="_blank" href="http://busybox.net">BusyBox</a> userland utilities. Additional software can be included in the ISO image at build time by using a well-documented configuration file. Minimal Linux Live can be downloaded as a pre-built image, built from scratch or run in a web browser by using a JavaScript PC emulator.
Minimal Linux Live is a tiny educational Linux distribution, which is designed to be built from scratch by using a collection of automated shell scripts. Minimal Linux Live offers a core environment with just the <a target="_blank" href="http://kernel.org">Linux kernel</a>, <a target="_blank" href="http://gnu.org/software/libc">GNU C library</a> and <a target="_blank" href="http://busybox.net">Busybox</a> userland utilities. Additional software can be included in the ISO image at build time by using a well-documented configuration file. Minimal Linux Live can be downloaded as a pre-built image, built from scratch or run in a web browser by using a JavaScript PC emulator.
</div>
</div>
<div style="font-size: 10%;">&nbsp;</div>
@ -99,7 +99,7 @@
<div style="font-size: 10%;">&nbsp;</div>
<div class="row">
<div class="twelve columns">
The generated ISO image file contains Linux kernel, GNU C library compiled with default options, BusyBox compiled with default options, quite simple initramfs structure and some "overlay bundles" (the default build process provides few overlay bundles). You don't get Windows support out of the box, nor you get any fancy desktop environment. All you get is a simple shell console with default BusyBox applets, network support via DHCP and... well, that's all. This is why it's called "minimal".
The generated ISO image file contains Linux kernel, GNU C library compiled with default options, Busybox compiled with default options, quite simple initramfs structure and some "overlay bundles" (the default build process provides few overlay bundles). You don't get Windows support out of the box, nor you get any fancy desktop environment. All you get is a simple shell console with default Busybox applets, network support via DHCP and... well, that's all. This is why it's called "minimal".
</div>
</div>
<div style="font-size: 10%;">&nbsp;</div>
@ -184,7 +184,7 @@
<div style="font-size: 10%;">&nbsp;</div>
<ul>
<li>
<strong>Updated software base</strong> - Minimal Linux Live (MLL) is based on Linux kernel 4.14.12, GNU C library 2.26 and BusyBox 1.27.2. The generated ISO image file is 9MB and requires 256MB RAM in order to run properly.
<strong>Updated software base</strong> - Minimal Linux Live (MLL) is based on Linux kernel 4.14.12, GNU C library 2.26 and Busybox 1.27.2. The generated ISO image file is 9MB and requires 256MB RAM in order to run properly.
</li>
<li>
30+ available <a target="_blank" href="https://github.com/ivandavidov/minimal/blob/master/src/README#L19">overlay bundles</a> with new additions like nano, vim, Cloud Foundry and BOSH clients, Open JDK, keyboard layouts, the game 2048 and many more.
@ -237,7 +237,7 @@
<ul>
<div style="font-size: 10%;">&nbsp;</div>
<li>
<strong>Updated software base</strong> - Minimal Linux Live (MLL) is based on Linux kernel 4.4.44, GNU C library 2.24 and BusyBox 1.26.2. The generated ISO image file is 7MB and requires 256MB RAM in order to run properly.
<strong>Updated software base</strong> - Minimal Linux Live (MLL) is based on Linux kernel 4.4.44, GNU C library 2.24 and Busybox 1.26.2. The generated ISO image file is 7MB and requires 256MB RAM in order to run properly.
</li>
<li>
<strong>UEFI support</strong> - MLL provides experimental UEFI support and the live CD can boot on UEFI based systems which provide UEFI shell.
@ -267,7 +267,7 @@
<strong>Initial RAM filesystem in separate directory structure</strong> - the initramfs structure has been externalized in separate directory. This makes it easier to modify the initramfs environment.
</li>
<li>
<strong>Optional use of preconfigured Linux kernel and BusyBox</strong> - you can provide custom Linux kernel and BusyBox configurations. This is useful if you want to build MLL with many non-default options or if you want to distribute your own version of MLL.
<strong>Optional use of preconfigured Linux kernel and Busybox</strong> - you can provide custom Linux kernel and Busybox configurations. This is useful if you want to build MLL with many non-default options or if you want to distribute your own version of MLL.
</li>
<li>
<strong>Optional use of already downloaded sources</strong> - this feature does what it says: if you turn it on, you don't need internet connection and you will be using already downloaded sources. This is useful if you don't want to use internet connection or if you want to distribute your own version of MLL which includes specific sources.
@ -290,13 +290,13 @@
<ul>
<div style="font-size: 10%;">&nbsp;</div>
<li>
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 4.4.6</strong>, <strong>GNU C library 2.23</strong> and <strong>BusyBox 1.24.2</strong>. The generated ISO image file is ~4MB larger due to glibc overhead and requires more RAM (64MB is enough).
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 4.4.6</strong>, <strong>GNU C library 2.23</strong> and <strong>Busybox 1.24.2</strong>. The generated ISO image file is ~4MB larger due to glibc overhead and requires more RAM (64MB is enough).
</li>
<li>
The build architecture has been revised and now the only core dependency to the host OS is the actual C compiler along with the related binary utils. Kernel headers and main C library (which used to be implicit dependencies) are now automatically generated and used as part of the overall build process.
</li>
<li>
The DNS resolving issue has been fixed and the network/internet related BusyBox applets (ping, wget, etc.) now work fine.
The DNS resolving issue has been fixed and the network/internet related Busybox applets (ping, wget, etc.) now work fine.
</li>
<li>
The ISO image generation process is now in a separate script file, completely detached from the kernel build infrastructure. This allows the Minimal Linux Live users to modify the ISO image file/directory structure before the actual ISO generation.
@ -322,7 +322,7 @@
<ul>
<div style="font-size: 10%;">&nbsp;</div>
<li>
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 4.1.6</strong> and <strong>BusyBox 1.23.2</strong>.
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 4.1.6</strong> and <strong>Busybox 1.23.2</strong>.
</li>
<li>
The build process is now parallelized between all available CPU cores, therefore the overall build time is significantly reduced.
@ -334,7 +334,7 @@
The ISO image is now generated by using <strong>genisoimage</strong>. This fixes some issues with Debian and Arch based host operating systems.
</li>
<li>
In addition to the above changes, if you <a href="#download" onclick="javascript:loadTab(this.href); return false;">download</a> the current stable build scripts, you will notice a folder named <strong>experimental</strong>. This folder contains some interesting scripts which produce ISO based on Linux kernel and <a href="http://landley.net/toybox" target="_blank">ToyBox</a> instead of BusyBox. Please have in mind that this is work in progress and these scripts may not work on your host OS.
In addition to the above changes, if you <a href="#download" onclick="javascript:loadTab(this.href); return false;">download</a> the current stable build scripts, you will notice a folder named <strong>experimental</strong>. This folder contains some interesting scripts which produce ISO based on Linux kernel and <a href="http://landley.net/toybox" target="_blank">ToyBox</a> instead of Busybox. Please have in mind that this is work in progress and these scripts may not work on your host OS.
</li>
</ul>
</div>
@ -351,7 +351,7 @@
<ul>
<div style="font-size: 10%;">&nbsp;</div>
<li>
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.18.6</strong> and <strong>BusyBox 1.23.1</strong>.
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.18.6</strong> and <strong>Busybox 1.23.1</strong>.
</li>
</ul>
</div>
@ -368,7 +368,7 @@
<div style="font-size: 10%;">&nbsp;</div>
<ul>
<li>
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.16.1</strong> and <strong>BusyBox 1.22.1</strong>.
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.16.1</strong> and <strong>Busybox 1.22.1</strong>.
</li>
<li>
The boot process is now based on <strong>/sbin/init</strong> and <strong>/etc/inittab</strong>. There are four available consoles. You can switch between them with <strong>Alt + F1</strong> up to <strong>Alt + F4</strong>.
@ -391,7 +391,7 @@
<div style="font-size: 10%;">&nbsp;</div>
<ul>
<li>
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.15.6</strong> and <strong>BusyBox 1.22.1</strong>.
<strong>Minimal Linux Live</strong> is now based on <strong>Linux kernel 3.15.6</strong> and <strong>Busybox 1.22.1</strong>.
</li>
<li>
The boot process is based on simple <strong>/init</strong> script.

View File

@ -199,12 +199,12 @@
command line tools like ls, cat, mkdir, etc. This environment is called "initramfs" which
stands for "initial RAM file system". This is what we are going to do:
1) We are going to download & compile BusyBox. This will give us the basic command line
1) We are going to download & compile Busybox. This will give us the basic command line
tools that we need for normal work in console mode.
2) We will use BusyBox to provide us with some default directory/file structure, which
2) We will use Busybox to provide us with some default directory/file structure, which
we are going to modify into our own initramfs file.
One by one - we need to download and unpack the BusyBox sources. Let's take a look at the
One by one - we need to download and unpack the Busybox sources. Let's take a look at the
script file "3_get_busybox.sh":
#/bin/sh
@ -224,7 +224,7 @@
explained earlier. Long story short - we get the source archive with "wget" and then we
unpack the sources with "tar". That's it. Nothing complex at all.
Now that we have BusyBox sources, we need to compile them. Let's take a look at the next
Now that we have Busybox sources, we need to compile them. Let's take a look at the next
script "4_build_busybox.sh" which we need to execute:
#/bin/sh
@ -245,32 +245,32 @@
make clean
The command above ensures that we will get rid of all build artefacts, assuming this
is not the first time we go through the BusyBox build process.
is not the first time we go through the Busybox build process.
make defconfig
This command creates new ".config" file, which contains the defaults for proper
BusyBox build process. Again, nothing extraordinary here.
Busybox build process. Again, nothing extraordinary here.
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
The command above is very important, because we inform the build process to build
a static version of BusyBox, meaning that the BusyBox executable file will not
a static version of Busybox, meaning that the Busybox executable file will not
be dependent on any external library. We cannot skip this step, otherwise our OS will
fail with "kernel panic" when we try to boot.
make busybox
The command above compiles BusyBox. Nothing interesting here. The build should be
The command above compiles Busybox. Nothing interesting here. The build should be
significantly faster compared to the kernel build.
make install
The command above creates new "_install" folder and installs BusyBox in it. We
The command above creates new "_install" folder and installs Busybox in it. We
will use this folder as a base for our new initramfs file.
At this point, we should have kernel compiled with default settings (yes, we changed
one of them, but it's no big deal) and we should also have BusyBox compiled with
one of them, but it's no big deal) and we should also have Busybox compiled with
static option enabled and all other default settings.
Now we come to the part where we create our own initramfs folder, which later on we
@ -336,7 +336,7 @@
cd ../../rootfs
The code snippet above removes the old initramfs folder called "rootfs", then
copies the "_install" folder (the one created by BusyBox) with a new name - "rootfs".
copies the "_install" folder (the one created by Busybox) with a new name - "rootfs".
This folder is going to be our new initramfs focal point.
rm -f linuxrc
@ -434,7 +434,7 @@
"rootfs" folder.
We are almost finished. At this point, we have already compiled the Linux kernel and we
have also created initramfs file based on BusyBox and our own set of configurations.
have also created initramfs file based on Busybox and our own set of configurations.
The last thing to do is to generate a bootable ISO file. Let's take a look at the last
script "7_generate_iso.sh":
@ -569,8 +569,8 @@
Even though we haven't discussed this topic, you might have already noticed that the
file ".config", which comes along with the other build scripts, contains the URL
locations for the kernel sources and the BusyBox sources. You can easily build live
Linux OS based on different kernel/BusyBox versions if you provide different
locations for the kernel sources and the Busybox sources. You can easily build live
Linux OS based on different kernel/Busybox versions if you provide different
URLs in the ".config" file. Here is the content of the default ".config" file:
# You can find the latest Linux kernel source bundles here:
@ -579,7 +579,7 @@
#
KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.15.6.tar.xz
# You can find the latest BusyBox source bundles here:
# You can find the latest Busybox source bundles here:
#
# http://busybox.net
#
@ -660,7 +660,7 @@
http://git.busybox.net/busybox/tree/examples/inittab
Note that the details above are specific to BusyBox. Usually, the "init" process
Note that the details above are specific to Busybox. Usually, the "init" process
supports runlevels, but that's not the case here.
--- --- ---
@ -704,7 +704,7 @@
2) GNU Coreutils - these are the real shell command line utilities (ls, cd, etc.).
You need them as later on, we would "escape" from "initramfs" and use the
actual file system available in the compressed file. Alternatively, you can
overlay the whole "BusyBox" environment on top of the compressed file system but
overlay the whole "Busybox" environment on top of the compressed file system but
that's not really a professional approach.
3) You need to "switch_root" to the actual file system (the compressed one) which

View File

@ -19,7 +19,7 @@ KERNEL_SOURCE_URL=http://kernel.org/pub/linux/kernel/v5.x/linux-5.0.4.tar.xz
#
GLIBC_SOURCE_URL=http://ftp.gnu.org/gnu/glibc/glibc-2.29.tar.bz2
# You can find the latest BusyBox source bundles here:
# You can find the latest Busybox source bundles here:
#
# http://busybox.net
#
@ -67,7 +67,7 @@ FIRMWARE_TYPE=bios
#
USE_PREDEFINED_KERNEL_CONFIG=false
# Use predefined '.config' file when building BusyBox. This overrides the
# Use predefined '.config' file when building Busybox. This overrides the
# config generation in 'xx_build_busybox.sh' and the build process uses the
# config file provided in this parameter. Place the configuration file here:
#

View File

@ -24,7 +24,7 @@ GLIBC_SRC=`ls -d $WORK_DIR/glibc/glibc-*`
cd $GLIBC_OBJECTS
# 'glibc' is configured to use the root folder (--prefix=) and as result all
# libraries will be installed in '/lib'. Note that on 64-bit machines BusyBox
# libraries will be installed in '/lib'. Note that on 64-bit machines Busybox
# will be linked with the libraries in '/lib' while the Linux loader is expected
# to be in '/lib64'. Kernel headers are taken from our already prepared kernel
# header area (see xx_build_kernel.sh). Packages 'gd' and 'selinux' are disabled

View File

@ -21,7 +21,7 @@ cp -r $KERNEL_INSTALLED/include $SYSROOT
# 3) Hack for the missing '/work/sysroot/usr' folder. We link
# the existing libraries and the kernel headers. Without
# this hack the BusyBox compilation process fails. The proper
# this hack the Busybox compilation process fails. The proper
# way to handle this is to use '--prefix=/usr' in the glibc
# build process but then we have to deal with other issues.
# For now this hack is the easiest and the simplest solution.

View File

@ -13,10 +13,10 @@ DOWNLOAD_URL=`read_property BUSYBOX_SOURCE_URL`
# Grab everything after the last '/' character.
ARCHIVE_FILE=${DOWNLOAD_URL##*/}
# Download BusyBox source archive in the 'source' directory.
# Download Busybox source archive in the 'source' directory.
download_source $DOWNLOAD_URL $SOURCE_DIR/$ARCHIVE_FILE
# Extract the BusyBox sources in the 'work/busybox' directory.
# Extract the Busybox sources in the 'work/busybox' directory.
extract_source $SOURCE_DIR/$ARCHIVE_FILE busybox
# We go back to the main MLL source folder.

View File

@ -7,15 +7,15 @@ set -e
echo "*** BUILD BUSYBOX BEGIN ***"
# Remove the old BusyBox install area.
echo "Removing old BusyBox artifacts. This may take a while."
# Remove the old Busybox install area.
echo "Removing old Busybox artifacts. This may take a while."
rm -rf $BUSYBOX_INSTALLED
# Change to the source directory ls finds, e.g. 'busybox-1.24.2'.
cd `ls -d $WORK_DIR/busybox/busybox-*`
# Remove previously generated artifacts.
echo "Preparing BusyBox work area. This may take a while."
echo "Preparing Busybox work area. This may take a while."
make distclean -j $NUM_JOBS
# Read the 'USE_PREDEFINED_BUSYBOX_CONFIG' property from '.config'
@ -32,23 +32,23 @@ if [ "$USE_PREDEFINED_BUSYBOX_CONFIG" = "true" ] ; then
cp -f $SRC_DIR/minimal_config/busybox.config .config
else
# Create default configuration file.
echo "Generating default BusyBox configuration."
echo "Generating default Busybox configuration."
make defconfig -j $NUM_JOBS
fi
# Now we tell BusyBox to use the sysroot area.
# Now we tell Busybox to use the sysroot area.
sed -i "s|.*CONFIG_SYSROOT.*|CONFIG_SYSROOT=\"$SYSROOT\"|" .config
# Configure the compiler flags and explicitly link Busybox with GLIBC from sysroot.
sed -i "s|.*CONFIG_EXTRA_CFLAGS.*|CONFIG_EXTRA_CFLAGS=\"$CFLAGS -L$SYSROOT/lib\"|" .config
# Compile busybox with optimization for "parallel jobs" = "number of processors".
echo "Building BusyBox."
echo "Building Busybox."
make \
busybox -j $NUM_JOBS
# Create the symlinks for busybox. The file 'busybox.links' is used for this.
echo "Generating BusyBox based initramfs area."
echo "Generating Busybox based initramfs area."
make \
CONFIG_PREFIX="$BUSYBOX_INSTALLED" \
install -j $NUM_JOBS

View File

@ -10,7 +10,7 @@ echo "*** GENERATE ROOTFS BEGIN ***"
echo "Preparing rootfs work area. This may take a while."
rm -rf $ROOTFS
# Copy all BusyBox generated stuff to the location of our 'rootfs' folder.
# Copy all Busybox generated stuff to the location of our 'rootfs' folder.
cp -r $BUSYBOX_INSTALLED $ROOTFS
# Copy all rootfs resources to the location of our 'rootfs' folder.
@ -24,7 +24,7 @@ find $ROOTFS/* -type f -name '.keep' -exec rm {} +
rm -f $ROOTFS/linuxrc
# This is for the dynamic loader. Note that the name and the location are both
# specific for 32-bit and 64-bit machines. First we check the BusyBox executable
# specific for 32-bit and 64-bit machines. First we check the Busybox executable
# and then we copy the dynamic loader to its appropriate location.
BUSYBOX_ARCH=$(file $ROOTFS/bin/busybox | cut -d' ' -f3)
if [ "$BUSYBOX_ARCH" = "64-bit" ] ; then
@ -38,7 +38,7 @@ fi
# Copy all necessary 'glibc' libraries to '/lib' BEGIN.
# BusyBox has direct dependencies on these libraries.
# Busybox has direct dependencies on these libraries.
cp $SYSROOT/lib/libm.so.6 $ROOTFS/lib
cp $SYSROOT/lib/libc.so.6 $ROOTFS/lib
cp $SYSROOT/lib/libresolv.so.2 $ROOTFS/lib

View File

@ -34,7 +34,7 @@ if [ "$OVERLAY_LOCATION" = "iso" ] && \
echo "Using sparse file for overlay."
# This is the BusyBox executable that we have already generated.
# This is the Busybox executable that we have already generated.
BUSYBOX=$ROOTFS/bin/busybox
# Create sparse image file with 3MB size. Note that this increases the ISO

View File

@ -68,7 +68,7 @@ prepare_boot_bios() {
# Genrate 'El Torito' boot image as per UEFI sepcification 2.7,
# sections 13.3.1.x and 13.3.2.x.
prepare_boot_uefi() {
# Find the build architecture based on the BusyBox executable.
# Find the build architecture based on the Busybox executable.
BUSYBOX_ARCH=$(file $ROOTFS/bin/busybox | cut -d' ' -f3)
# Determine the proper UEFI configuration. The default image file

View File

@ -29,10 +29,10 @@ clean:
fi ; \
USE_PREDEFINED_BUSYBOX_CONFIG=`grep -i ^USE_PREDEFINED_BUSYBOX_CONFIG= .config | cut -f2- -d'=' | xargs` ; \
if [ ! "$$USE_PREDEFINED_BUSYBOX_CONFIG" = "true" ] ; then \
echo "Removing predefined BusyBox config file." ; \
echo "Removing predefined Busybox config file." ; \
rm -rf minimal_overlay/busybox.config ; \
else \
echo "Local BusyBox config file is preserved." ; \
echo "Local Busybox config file is preserved." ; \
fi ; \
echo "Removing source level overlay software." ; \
mv -f minimal_overlay/rootfs/README /tmp/mll_overlay_readme ; \

View File

@ -1,21 +1,21 @@
The build process allows you to use predefined configuration files for the
kernel and for BusyBox. This is what you need to do in order to use your own
kernel and for Busybox. This is what you need to do in order to use your own
predefined configuration files:
1) First of all you need to have '.config' configuration file. The assumption is
that you already know what '.config' file is and how it is used during the
kernel & BusyBox build process. Take the '.config', place it in this folder
kernel & Busybox build process. Take the '.config', place it in this folder
and finally rename the file. The predefined configuration file name is:
kernel.config - for kernel (obviously)
busybox.config - for BusyBox (what a surprise)
busybox.config - for Busybox (what a surprise)
2) Change the corresponding property in the main '.config' (that's the minimal's
config file) to value 'true':
USE_PREDEFINED_KERNEL_CONFIG - for kernel
USE_PREDEFINED_BUSYBOX_CONFIG - for BusyBox
USE_PREDEFINED_BUSYBOX_CONFIG - for Busybox
3) That's it. Now during the build process instead of generating default
'.config' files, the predefined configuration files will be used, That's
@ -23,5 +23,4 @@ predefined configuration files:
options. In this case it's easier to use configuration file instead of using
the scripts in order to generate tons of options. Another useful scenario is
when you distribute your OS based on 'Minimal Linux Live' and you want to use
non-default kernel and/or BusyBox options 'out of the box'.
non-default kernel and/or Busybox options 'out of the box'.

View File

@ -199,12 +199,12 @@
command line tools like ls, cat, mkdir, etc. This environment is called "initramfs" which
stands for "initial RAM file system". This is what we are going to do:
1) We are going to download & compile BusyBox. This will give us the basic command line
1) We are going to download & compile Busybox. This will give us the basic command line
tools that we need for normal work in console mode.
2) We will use BusyBox to provide us with some default directory/file structure, which
2) We will use Busybox to provide us with some default directory/file structure, which
we are going to modify into our own initramfs file.
One by one - we need to download and unpack the BusyBox sources. Let's take a look at the
One by one - we need to download and unpack the Busybox sources. Let's take a look at the
script file "3_get_busybox.sh":
#/bin/sh
@ -224,7 +224,7 @@
explained earlier. Long story short - we get the source archive with "wget" and then we
unpack the sources with "tar". That's it. Nothing complex at all.
Now that we have BusyBox sources, we need to compile them. Let's take a look at the next
Now that we have Busybox sources, we need to compile them. Let's take a look at the next
script "4_build_busybox.sh" which we need to execute:
#/bin/sh
@ -245,32 +245,32 @@
make clean
The command above ensures that we will get rid of all build artefacts, assuming this
is not the first time we go through the BusyBox build process.
is not the first time we go through the Busybox build process.
make defconfig
This command creates new ".config" file, which contains the defaults for proper
BusyBox build process. Again, nothing extraordinary here.
Busybox build process. Again, nothing extraordinary here.
sed -i "s/.*CONFIG_STATIC.*/CONFIG_STATIC=y/" .config
The command above is very important, because we inform the build process to build
a static version of BusyBox, meaning that the BusyBox executable file will not
a static version of Busybox, meaning that the Busybox executable file will not
be dependent on any external library. We cannot skip this step, otherwise our OS will
fail with "kernel panic" when we try to boot.
make busybox
The command above compiles BusyBox. Nothing interesting here. The build should be
The command above compiles Busybox. Nothing interesting here. The build should be
significantly faster compared to the kernel build.
make install
The command above creates new "_install" folder and installs BusyBox in it. We
The command above creates new "_install" folder and installs Busybox in it. We
will use this folder as a base for our new initramfs file.
At this point, we should have kernel compiled with default settings (yes, we changed
one of them, but it's no big deal) and we should also have BusyBox compiled with
one of them, but it's no big deal) and we should also have Busybox compiled with
static option enabled and all other default settings.
Now we come to the part where we create our own initramfs folder, which later on we
@ -336,7 +336,7 @@
cd ../../rootfs
The code snippet above removes the old initramfs folder called "rootfs", then
copies the "_install" folder (the one created by BusyBox) with a new name - "rootfs".
copies the "_install" folder (the one created by Busybox) with a new name - "rootfs".
This folder is going to be our new initramfs focal point.
rm -f linuxrc
@ -434,7 +434,7 @@
"rootfs" folder.
We are almost finished. At this point, we have already compiled the Linux kernel and we
have also created initramfs file based on BusyBox and our own set of configurations.
have also created initramfs file based on Busybox and our own set of configurations.
The last thing to do is to generate a bootable ISO file. Let's take a look at the last
script "7_generate_iso.sh":
@ -569,8 +569,8 @@
Even though we haven't discussed this topic, you might have already noticed that the
file ".config", which comes along with the other build scripts, contains the URL
locations for the kernel sources and the BusyBox sources. You can easily build live
Linux OS based on different kernel/BusyBox versions if you provide different
locations for the kernel sources and the Busybox sources. You can easily build live
Linux OS based on different kernel/Busybox versions if you provide different
URLs in the ".config" file. Here is the content of the default ".config" file:
# You can find the latest Linux kernel source bundles here:
@ -579,7 +579,7 @@
#
KERNEL_SOURCE_URL=https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.15.6.tar.xz
# You can find the latest BusyBox source bundles here:
# You can find the latest Busybox source bundles here:
#
# http://busybox.net
#
@ -660,7 +660,7 @@
http://git.busybox.net/busybox/tree/examples/inittab
Note that the details above are specific to BusyBox. Usually, the "init" process
Note that the details above are specific to Busybox. Usually, the "init" process
supports runlevels, but that's not the case here.
--- --- ---
@ -704,7 +704,7 @@
2) GNU Coreutils - these are the real shell command line utilities (ls, cd, etc.).
You need them as later on, we would "escape" from "initramfs" and use the
actual file system available in the compressed file. Alternatively, you can
overlay the whole "BusyBox" environment on top of the compressed file system but
overlay the whole "Busybox" environment on top of the compressed file system but
that's not really a professional approach.
3) You need to "switch_root" to the actual file system (the compressed one) which