Skip to content

BITMOTECO Core OS

The operating system of the BITMOTECOsystem is called BITMOTECO Core OS or in its short form Core OS.

Introduction

The BITMOTECO Core OS is a robust and versatile operating system designed to serve as the foundation for the BITMOTECO Platform, which supports a wide range of Internet of Things (IoT) and Artificial Intelligence (AI) applications. This platform is adaptable to various hardware configurations, transforming standard industrial computers into decentralized edge devices or deploying as virtual machines on centralized servers.

At the heart of BITMOTECO Core OS is a base operating system built on Linux, configured for stability and security. The OS integrates multiple components, including RPC microservices known as "Managers" that mediate interactions between containers, the container runtime, and the operating system, ensuring secure and isolated operations. The system employs Docker for container management and utilizes a unique filesystem structure with a static root filesystem and overlay capabilities for dynamic updates.

BITMOTECO Core OS emphasizes security, reliability, and flexibility, supporting atomic upgrades, independence from specific Linux distributions, and robust backup and restore features, making it a powerful solution for modern edge computing environments.

Key benefits

The key benefits of the BITMOTECO Core OS for users include:

  • Versatility and flexibility: Supports a wide range of IoT and AI applications across various hardware platforms, enabling deployment on industrial computers or as virtual machines.

  • Security: Provides a secure, encapsulated environment where containerized applications are isolated, preventing unauthorized access or modification of system functions.

  • Simplified upgrades: Enables atomic upgrades through single-file core updates, reducing the complexity and risk associated with system upgrades.

  • Robust backup and restore: Utilizes snapshots for efficient backup and quick restoration of system states, allowing safe rollback in case of failures.

  • Decentralized edge computing: Transforms almost any industrial computer into a decentralized edge device, enhancing the capabilities of edge computing environments.

  • Modular architecture: Features a modular design with separate Managers handling specific tasks, ensuring high security, reliability, and ease of management.

Components

The BITMOTECO Core OS is an aggregation of multiple software components:

Base operating system

The BITMOTECO Core OS is built using Ubuntu packages in a Long-term support (LTS) version as its foundation but customizes the configuration entirely, ensuring it is not a fork of Ubuntu but a distinct system tailored for specific needs. Ubuntu Server is a Linux distribution based on Debian, which is a collaboratively developed open source operating system.

It is specially configured to provide all the basic operating system functions required for stable and secure operation of encapsulated software environments.

Managers

The Managers are providing interfaces to the containers and also to the operating system. They are capable of communicating with the OS via interfaces and also to the containers and the container-runtime via other interfaces. They build a secure encapsulated layer between those components.

Due to the container architecture and our safety concept, the software inside a container is capsuled and therefore incapable of changing or accessing system functions at operating system level.

The Managers are able to access system functions of the operating system level according to strict safety regulations. Via an interface, the Managers can be triggered by the containers to perform predefined actions on the system level. This includes, for example, shutting down the system or changing the network settings or the retrieval of system information such as listing the connected devices (cameras, gateways, etc.)

To ensure high security and reliability, there are several Managers with different tasks and permissions.

These different Managers are explained individually and in detail in the separate Managers documentation.

Detailed documentation: Managers documentation

Container runtime stack

The BITMOTECOsystem uses the Docker Engine and Docker Compose to provide and manage containerized software solutions. Docker uses containerd for managing the container lifecycle, which includes creating, starting, and stopping containers. By default, containerd uses runc as its container runtime.

Licensing

The WiBU CodeMeter Runtime Service is used to manage and enforce software licenses for modules and/or single applications.

Scripts and configuration

Creating a bootable operating system from a Linux root filesystem (rootfs) requires additional steps and configuration. After extending the base operating system with the additional components, a bootable disc image is created. This image is deployed in an ISO file for installation on virtual machines or edge devices.

Here’s an overview of some of the required scripts and configurations:

  • Disk partitioning and filesystem configuration:

    Configure an overlay filesystem to enable writable layers on top of the read-only root filesystem, allowing temporary changes during runtime. Verify that all files and directories within the root filesystem have the correct permissions and ownership settings.

  • Initramfs creation and bootloader setup:

    Generate an initramfs image that includes the necessary drivers and scripts for mounting the root filesystem. Install GRUB to the target disk and configure the bootloader to point to the correct kernel and initramfs image.

  • Boot scripts:

    Ensure proper configuration of the chosen init system (systemd) and set up all system and custom services to start in the appropriate order during boot. Configure networking scripts to bring up interfaces at boot time and include default network settings.

  • Services and metrics:

    Add and configure additional services for logging and metrics collection.

  • Users and access:

    Create necessary user accounts, set appropriate permissions and enable local shell login and SSH service.

  • Deploy:

    Compress the rootfs into a read-only SquashFS image and create an ISO file for BITMOTECO Core OS and GUI module installation.

Features

Detailed explanation of notable features.

Filesystem

The Core OS doesn't have a separate partition containing the root filesystem but uses a compressed and static (read-only) root filesystem from a SquashFS file within the boot partition. These files are called cores and contain everything that is needed to boot and run the BITMOTECO Core OS.

A disk containing an installed BITMOTECO Core OS contains three partitions:

type filesystem mountpoint content
bootloader FAT32 /boot/efi UEFI bootloader
boot ext4 /boot GRUB bootloader and core files
storage Btrfs /.storage persistent data (configuration, installed modules, user data)

During the early boot process the active core file is mounted as read-only. The disadvantage of this setup is that no files within a core filesystem can be changed or updated, so no settings can be adjusted. To mitigate this, an overlay filesystem is used on top as the root filesystem. This allows changes and updates to be temporarily applied to all files within the root filesystem. By default, all changes are saved to memory and discarded on shutdown.

The persistent storage file system mainly stores the system configuration, installed modules and their data. The saved system configuration is applied to the system at startup.

Atomic Upgrades

Since every core file contains all files necessary to boot and run the operating system, a full operating system upgrade can be done by uploading one single file to a BITMOTECOsystem.

During the upgrade process, the extracted core file is placed in the boot partition and marked as active for the next boot. The kernel file is then extracted from the core, the necessary initramfs is created and both are also placed in the boot partition.

To maintain a working and bootable system, an additional migration script ensures that any changes made to the persistent data layout in the storage partition are applied to be consistent with the new core.

Independence

Since OS and application independence is desired, and all cores are self-contained, the OS in each core can be based on either a different Linux distribution or even a custom embedded distribution.

Even completely different operating systems such as BSD might be possible.

However, whatever operating system is started from a core file must provide all runtimes and APIs defined for the BITMOTECO Platform and migrate and apply all persistent settings.

Backup and restore capabilities

The copy-on-write (COW) nature of Btrfs means that snapshots can be taken quickly on an active filesystem, while initially using very little disk space.

Each core upgrade creates a snapshot of the core-dependent persistent data of the replaced core. Thus a rollback to the previous core with its latest configuration is always possible.

During the module upgrade process, a temporary snapshot of the module and its data is taken, and if the upgrade process throws any exceptions, the state before the upgrade was initiated is restored. If the upgrade was successful, the temporary snapshot will be discarded.

Attention: This only secures the existence of a running module. The user must create their own permanent snapshot of a module to be able to rollback if a module does not work as expected for them after an upgrade, or if its contents are running but corrupted.

Changelog

The latest releases and changes are listet in the CHANGELOG.