Raising from a HOST system

A new phySystem can be raised from an existing HOST system. This HOST system can be either a working phySystem or another supported GNU/Linux distribution.

The process involves several steps described below, namely:

  • Prepare the HOST system for building a new system.

  • Raise a temporary BUILDER system using the HOST.

  • Raise the final TARGET system using the temporary system.

Once the new system is ready, it can be used in several ways, i.e.:

  • By entering and leaving the TARGET system from the HOST.

  • Making the new system bootable on its own.

  • Creating a container image from the generated filesystem.

Prepare the HOST system

Note

Preparing the HOST system requires working with root privileges. Log in as root user or use sudo command to obtain the necessary privileges for these operations.

Instructions requiring privileges are indicated with the # prompt sign:

# bandit --system host init

while non-privileged actions are indicated with the $ prompt sign:

$ bandit --system host check

Check the system requirements

A new phySystem requires very few resources to run. However, depending on the intended purpose of the final phySystem, lots of additional resources should be provisioned for the TARGET system.

When building from a HOST system, some requirements for this host macghine are necessary to succesfully raise the new TARGET phySystem.

See Checking The System Requirements for details.

Allocate disk space

The HOST system first has to be prepared to allocate some disk space for the TARGET system.

Check that enough free space is available for the BUILDER and TARGET filesystems folders. These are the folders that will be defined as the BANDIT_BUILDER_DIR and the BANDIT_HOST_TGT_MNT in the bandit.conf file when configuring the BANDIT toolkit in the next step.

Also, if this space is to be allocated in free disk partitions, prepare them in the HOST system. See Creating the TARGET partitions for details.

Install BANDIT on the HOST system

Install BANDIT

The raising process is indeed executed by the BANDIT, after properly configuring the bandit.conf file. Therefore, the BANDIT has to be installed in the HOST. When using a running phySystem a copy of BANDIT is already installed. You can use this copy or install a new, clean copy of the BANDIT toolkit just for this raising process.

See the BANDIT documentation about the installation of the toolkit.

Configure BANDIT

The BANDIT toolkit used in the raising process is configured by modifying the proper bandit.conf file. At this step is where the features of the new TARGET system, like the partitions used, if any, will be defined.

See Configuring BANDIT for raising for the detailed procedure.

Check the HOST building capabilities

Once BANDIT is installed and configured in the HOST, the BANDIT toolkit can check whether this HOST system is capable of raising a temporary BUILDER system and, later, the final TARGET systems.

For this process the HOST system needs to meet some building requirements.

See Checking the HOST building capabilities for the detailed procedure.

Initialize the HOST system

When the BANDIT is ready and the HOST has the necessary capabilities to build and install software, this HOST system needs to be initialized in order to add a new unprivileged user, to format the filesystems at the TARGET partitions, etc.

See Initializing the HOST system for details.

Download the BANDIT catalogs and needed bundles

In order to raise any new functionality the BANDIT needs some catalog to know how to build and install bundles.

The phyglos catalog is the reference catalog to install a new phySystem. The phyglos Catalog is available from the phyglos.org repository, which is configured and enabled by default in BANDIT toolkit.

See Downloading the phyglos Catalog for more details.

Raise the BUILDER system

Create the BUILDER system

Once the phyglos-builder bundle is ready, the BANDIT can raise the temporary BUILDER system, which will be then used to raise the final TARGET system.

See Raising the BUILDER system for details.

Raise the TARGET system

Initialize the BUILDER/TARGET systems

The BUILDER and TARGET systems will now be initialized according to the configuration of the phyglos-core bundle. The TARGET filesystem is created and a copy of BANDIT migrates to the new filesystem.

Raise the TARGET system

Raise the phyglos-core bundle

The phyglos-core bundle is the first bundle in the TARGET system. It can be installed by entering into the previously created BUILDER system. This way the phyglos-core bundle is built using a new toolchain which is independent from that of the HOST system.

Raise the phyglos-security bundle

The phyglos-security bundle provides a first layer of security to the new phy system before any connection to the Internet is made from inside the TARGET system.

Warning

You are about to create a new user in the TARGET system and lock the root user’s account. Ensure that the commands marked with the [TARGET] prompt are run from within the TARGET system.

Raise the phyglos-deck bundle

The phyglos-deck bundle adds now the rest of the functionality expected in a phySystem, after the phyglos-core bundle first created a minimal system capable of raising more functionality and the phyglos-security bundle was installed to provide a level of protection the system as soon as possible.

See Raising the TARGET system for details.

Make the TARGET system bootable

Adding the kernel

Raise the phyglos-kernel bundle

The phyglos-kernel bundle allows to configure, build and install the Linux kernel, needed to boot into the new phySystem.

However, there is no need for a kernel in order to enter into the TARGET system from the HOST system using the BANDIT command bandit -s target enter at any time.

Adding the bootloader

Raise the phyglos-bootloader bundle

The phyglos-bootloader bundle installs a bootloader in a disk in order to be able to boot into the new phySystem directly from the system’s firmware (e.g. BIOS or UEFI) of a machine.

However, there is no need to install a bootloader when the final system has more than one operating system and any of the provides its own bootloader properly configured to find the phySystem TARGET partition and load the TARGET Linux kernel.

See Making the TARGET system bootable for details.