WikiArchitecture

Architecture

Priente-OS, layer by layer.

What each layer does, from the firmware to your product, and how each one trusts the next. First what a kernel is, then the rest of the system, with diagrams.

Priente-OS 3.1.10amd64 · arm64 · riscv64

What is a kernel?

Every program on a computer — a web server, a database, a security product — needs the processor, memory, disks and the network. The part that shares these resources between programs, decides who may reach what and talks to the hardware is called the kernel. The kernel is the heart of the operating system: it manages everything that happens on the system.

The kernel: the layer between applications and hardwareAPPLICATIONSKERNELHARDWAREWeb serverDatabaseSecurity productSystem call interfacerequest ↓↑ responsepriente-kernelThe heart of the OS · checks every requestProcessesMemoryFilesNetworkSignaturesProcessorMemoryDiskNetwork card
Programs reach the hardware through the kernel; the kernel checks every request, carries it out and answers.

Programs never touch the hardware directly; they ask the kernel. Every request, such as “open this file”, “connect to that address” or “start a new program”, reaches the kernel in a common language called the system call interface. The kernel checks the request, carries it out and returns the result. This is where the final word on what a program may or may not do is spoken.

Why our own kernel?

Most operating systems are built on a kernel someone else developed, and inherit its design decisions, its attack surface and its release schedule. Priente-OS is different: we developed the kernel ourselves, from its first line, in Rust, a language that puts memory safety at the centre of the design. Security decisions, such as which program may run and which signature is valid, are made in the lowest layer, in our own code.

  • Signed execution inside the kernel. Before a file runs, the kernel checks that it is in a signed list. There is no exception, not even for root.
  • Unsafe code in a small core. The little code that must touch the hardware directly lives in a small, auditable core; everywhere else the compiler does not allow unsafe code.
  • No code added later. The running kernel has no module loading interface; the kernel changes only with a signed system image.
  • Compatibility kept. The kernel offers the system call interface applications expect. Unmodified open-source tools such as PostgreSQL, nginx, Suricata and WireGuard run as they are.

The big picture

Priente-OS is built from layers that verify each other from the bottom up. Each layer checks the signature of the one above before starting it, while persistent data lives apart from the system, on its own partition.

Priente-OS layers and disk partitionseach layer verifies the one abovePriente products and packagessigned .ppk · each product in its own accountSecurity platformweb panel :7143 · pspServicespinit · prienteconf · firewallpriente-kernelsigned execution · system call interfaceSystem imageloader + kernel + base system · one signatureBoot managerA/B slots · trial and rollbackUEFI firmwareSecure Boot · measured bootHardwareamd64 · arm64 · riscv64Data partition/data/etc/priente/var/lib · /var/log/opt · /home · /root/data/packagespersistent · TPM encryptionEFI partitionSlot ASlot Bboot state, two copiesTPM 2.0measurements · data key seal
From the bottom up, each layer verifies the one above. Persistent data sits on the data partition, the system slots on the EFI partition.
  • Hardware and firmware: amd64, arm64 and riscv64; UEFI and Secure Boot.
  • Boot manager: decides which of the two system slots boots. Boot chain
  • System image: the loader, the kernel and the base system in one signed file. System image
  • Kernel: manages the hardware and checks every execution against the signatures. Integrity
  • Services: pinit starts and watches services; prienteconf sets up the network and the firewall. Services
  • Security platform: the web panel and psp, on every installation. Security platform
  • Packages and products: signed optional packages and Priente products running under their own accounts. Product packages
  • Data partition: settings, logs, databases and installed packages. Data partition

The boot chain

From the moment the machine powers on until your application runs, each link verifies the next. If a single byte changes anywhere in the chain, that link is refused.

The boot chain: each link verifies the next01UEFI firmwareSecure Boot02Boot managerA/B slot03System imageone signature04Kernelembedded keys05Servicessigned code onlyTPM 2.0 · every link is measuredThe data partition’s key opens only with the same chain
From the firmware to the services, each link verifies the next one’s signature and is measured into TPM 2.0.
  1. UEFI firmware

    With Secure Boot on, it starts only boot files signed with Priente’s keys. The keys come with the Secure Boot signed media and are enrolled in the firmware once.

  2. Boot manager

    Decides which of the two slots on the disk boots and counts trial boots. Press a key at boot to pick a slot once.

  3. System image

    The loader, the kernel and the base system sit under the same signature. When the firmware verifies the image, it has verified the kernel too.

  4. Kernel

    Verifies the signed package manifests with the keys embedded in it. From then on only files listed in the manifests run.

  5. Services and applications

    The data partition is mounted, packages are verified and unpacked, the firewall is loaded before the network, and the services start.

TPM 2.0 measured boot: every link of the chain is measured into the TPM. When the data partition is encrypted, its key is protected by a TPM seal that opens only with the same chain; if the disk is moved to another machine or the boot chain is changed, the data cannot be read.

The system image, unpacked in memory

The kernel and the base system come in one signed file: the system image. The root file system is unpacked from it into memory at every boot. A change to the system files disappears by itself at the next boot; there is no room for a persistent back door.

  • Every machine boots from the same image: what runs where is never in question.
  • Settings, logs and data are kept on the data partition, not in the image, and survive an image change.
  • Updating the system means replacing the image as a whole with a new one; there is no half-done update. A/B updates

Signed packages and the repository

All software outside the base system — OpenSSH, PostgreSQL, nginx, Suricata, the Priente products — comes as a signed package archive (.ppk). Packages are picked on the installer’s screen, or installed later from the repository with priente-fetch or from the installation medium with priente-pkg.

A signed package’s journey from the repository to runninglist: signed · numbered · expiringevery archive: kernel signatureRepositorysigned list · mirrorspriente-fetchsize + SHA-256Kernelchecks the signatureData partition/data/packagesEvery bootverify and unpackUnsigned or corruptrefused · nothing changes
The repository signature keeps the list fresh, the kernel signature protects the code. If one archive is refused, nothing changes.

Two layers of trust

  • The repository signature keeps things fresh. The package list is signed, numbered and expires. A mirror that serves an old list, freezes it, or serves another channel’s or architecture’s list is refused.
  • The kernel signature protects the code. Each archive’s manifest is handed to the kernel, which verifies the signature with the keys embedded in it. If one archive is refused, nothing changes. Even if the repository were taken over, unsigned code could not run.

Installation, step by step

  1. Plan

    The required packages are worked out and installed first. A package another one needs cannot be removed.

  2. Download first

    Everything is downloaded first and its size and SHA-256 are compared with the signed list. An interrupted download resumes; if a mirror does not answer, the next one is tried.

  3. The kernel verifies

    The kernel checks every archive’s signature.

  4. Journalled changes

    The changes are applied step by step under an operation journal. Even after a power cut, an interrupted operation is completed at the next run.

  5. Least disruption

    Only the upgraded package’s services that were running before are restarted; unrelated services are not touched.

Installed archives are kept on the data partition and are verified and unpacked again at every boot. Packages’ settings under /etc live on the data partition too; upgrades and removals never touch what the administrator changed.

Channels and mirrors

  • stable is the default channel, with releases proven in the field.
  • The feature channel gets new releases first and also includes everything in stable. You can tie a single package to feature and keep the rest of the system on stable.
  • Several mirrors are configured; the one with the highest valid serial is used. If the main repository cannot be reached, updates continue from a mirror.
  • On networks without internet access, signed packages travel offline; for example, NameDefence Manager serves as a repository mirror for its own Defenders.

Integrity: only signed files run

The core rule of Priente-OS is simple: no file runs unless a signed manifest lists it. The kernel compares the digest of every program, script and shared library it loads with the signed manifests. Even an attacker with root cannot run their own tools.

Signed execution: the kernel compares every file with the manifestsExecution requestprogram, script, libraryfor everyone, root includedKernelthe file’s SHA-256In a signedmanifest?yesRunssigned codenoRefusednot even root can run itAudit log → alarmcritical · mail
The kernel compares the digest of every executed file with the signed manifests. Anything not listed is refused and becomes an alarm.
  • Programs, scripts, libraries: the executed file, its loader and every library it loads are checked.
  • A running file cannot change: a verified program cannot be written to while it runs; its contents cannot be swapped underneath it.
  • No execution from network file systems: files whose contents a remote server controls never run.
  • Every attempt is recorded: each refused execution goes to the audit log; the security platform turns it into the critical alarm “An unsigned program was blocked” and can mail it to you.
  • Containers in their own cage: containers run, while the host’s signature rule never loosens.

A/B updates and automatic rollback

The disk has two system slots: A and B. While one runs, the new version is written to the idle one. The new version starts with a trial boot and becomes permanent once it passes the health check. If it does not, the machine returns to the previous version by itself; the device in the field stays up.

A/B update: trial boot, health check, then confirmation or rollback01Write and verifyAactiveBnewwritten to the idle slot,verified by reading back02Trial bootAactiveBtrialthe new version bootswithout the firmware03Health checkservicesnetworkproduct checksretried untilthe timeoutPassed → confirmedApreviousBactiveFailed → rolled backAactiveBcancelled
The new version is written to the idle slot and boots as a trial. If the health check passes it becomes permanent; if not, the machine returns to the previous version.
  1. Download and verify

    The signed image and its manifest are downloaded and the kernel verifies the signature. An older version, an unsigned image or an image for another architecture is refused before anything is written.

  2. Write the idle slot

    The image is written to the idle slot and verified by reading it back. A half-written slot is never tried; after a power cut the old system boots.

  3. Trial boot

    The new system boots directly, without waiting for the firmware; services are back as soon as possible.

  4. Health check

    Are the required services running, did the network interfaces get their addresses, did the products’ own checks pass?

  5. Confirm or roll back

    If everything passes, the new version becomes permanent. If not, or if the new system cannot boot, the machine returns to the previous version.

Products add their own health checks: if a product is not ready, the update is rolled back. The administrator can add conditions too. Commands

The data partition (/data)

An installed disk has two partitions. The EFI partition carries the boot manager and the two system slots. The data partition carries everything that persists: settings, logs, databases, home directories and installed packages. At boot the data partition is mounted at /data and the persistent directories are placed over the system.

An installed disk: EFI partition, data partition and the root file system in memoryDISK · GPTEFI partitionBoot managerSlot ASlot BBoot stateData partition · /datapersistent · TPM encryption available/etc/priente/etc/ssh/var/lib/var/log/var/www/opt/home/root/data/packagesMemory (RAM)the root file system is rebuilt at every bootunpacked from the system imagemounted from the data partition · persistent directoriesunpackedmounted
The system slots live on the EFI partition and everything persistent on the data partition. The root file system is unpacked from the image into memory at every boot, with the persistent directories mounted over it.
DirectoryContents
/etc/prienteSystem settings (system.conf), the security platform, repository and update settings, product accounts
/etc/sshThe SSH server’s keys and settings
/var/lib, /var/logService data, databases and logs
/var/www, /srv, /var/spoolWeb content, served files, queues
/opt, /home, /rootProduct directories and home directories
/etc/<package>Optional packages’ settings (such as /etc/nginx)
/data/packagesThe installed signed package archives
  • Everything outside these directories comes from the image at every boot.
  • A system update never touches the data partition.
  • The data partition can be encrypted with a TPM-sealed key: the key opens only with the right boot chain, and a recovery key is set up as well.

Services: pinit

pinit is the Priente-OS service manager: the first process at boot. It starts services in dependency order, watches them, restarts them when they fail and writes their output to the journal. Developed by us from scratch, pinit understands the service files and commands administrators and products are used to: systemctl, journalctl, timedatectl, hostnamectl.

Boot order

  1. Data partition

    Found, opened if encrypted and mounted at /data; the persistent directories fall into place.

  2. Packages

    Installed archives are verified again and unpacked; product accounts are prepared.

  3. Settings

    prienteconf applies the host name, time zone and DNS, loads the firewall before the network interfaces, then brings up the network.

  4. Services

    Enabled services and the packages’ services start; timers are set up.

  5. Session

    The console login opens; root’s shell is psh, with its status bar.

  • Timers: periodic jobs (such as automatic updates) run as timer units; a run missed while the machine was off is made once at boot.
  • Journal: every service’s output and the system log in one place; its size is set with prienteconf.
  • Separation of rights: root can do everything; product accounts manage only their own services and read only their own logs.

The security platform

The Priente Security Platform is part of every installation: a modern web panel and the psp command that does the same work. Security is the first page; everything needed to run the machine is in the same place.

The Priente Security Platform: inputs, modules and outputsWeb panelbrowser · HTTPS :7143pspcommand lineEvent sourceslogin attemptsdropped packets · decoysSecurity serviceon every installation, panel on or offAttack RadarDecoysIntegrityAlarmsUsers · 2FAUpdatesServices · logsTerminalFirewallblocks attackersMailgrouped alarmsFleetmanager :7144 · TLS 1.3
The panel and psp talk to the same security service. Events flow into the radar; blocks go to the firewall, alarms to mail; the fleet is run from one panel.
  • Attack Radar: failed logins, port scans, packets the firewall drops and panel attempts in one stream. Every source address is scored by its events.
  • Log and Prevent modes: the default Log mode records and alarms everything and cuts nothing. Prevent blocks an attacker automatically once they cross the threshold. Management networks stay on the allowlist and are never blocked.
  • Built-in decoys: decoy ports with ssh, telnet, http, https, rdp, smb, mysql, postgres and redis profiles. Every connection that touches a decoy is hostile.
  • Integrity: the signed-execution mode, Secure Boot, measured boot, the system slots and the signature of every running process on one card.
  • Alarms and mail: critical events arrive by mail, grouped; with a daily summary if you like.
  • Running the system: updates, processes, services, logs, network, users, two-factor sign-in and a full terminal in the browser.
  • Fleet: one machine becomes the manager and the others join it; every server is managed from one panel. Every connection is protected by TLS 1.3 pinned to the manager’s certificate.

Product packages and product accounts

Priente products such as NameDefence, AccessVerifier, Priente Hub, Siem Verifier, MobileITM and Guardpot are signed packages in the repository’s Priente products group. Pick them on the installer’s screen or install them with one command; the database, web server and tools they need come with them. Product updates arrive the same signed way as the system’s.

A product account: what the product can do and what stays with the administratorCanManage its own servicesRead its own logsWrite its own data directoryAsk for updatesProduct accountno password · no logine.g. guardpotStays with the administratorOther products’ dataSystem settingsOther servicesRemoving packages · channelKernel: only signed programs run, whoever starts them
Every product runs under its own account: it manages its own area and the rest stays with the administrator. The signature rule is the same for everyone.
  • Every product has its own account: installing a product creates its system account, with no password and no login. The product’s services run as this account.
  • Only its own area: a product account can start and stop its own services, read its own logs and ask for updates through the update service. Other products’ data, the system’s settings and other services stay with the administrator.
  • The signature rule does not change: whoever starts it, the kernel runs only signed programs. The account separation limits the harm a faulty or compromised service can do to the system.
  • Product setup forms: a product asks for its first settings on the installer’s screen; the answers are written to the data partition and the product’s own setup program applies them at the first boot.

Installation

The installation image boots with UEFI and starts the graphical installer, used with the mouse or the keyboard. The installer writes the system image and the chosen signed packages to the disk, verifying each one.

  1. Welcome

    Keyboard layout and the hardware report: whether every network and storage device is supported, at a glance.

  2. Disk, name and network

    The target disk; host name, DHCP or a static address.

  3. Administrator and security

    The root password and root login over SSH; the security platform’s web panel and radar mode.

  4. Products and packages

    Priente products in a product installation, optional packages in a custom one; what they require is selected automatically.

  5. Product forms

    The chosen products’ first settings; secret fields never appear on the summary or in the log.

  6. Summary and install

    The disk is partitioned; the image and packages are copied with their signatures verified, and the machine boots from the disk.

  • Image flavours: Full carries every optional package on the medium (for offline installations); Mini holds everything the products need. Secure Boot signed media are offered for amd64. Download
  • Unattended installation: an answers file on the medium installs without a single question; the product forms’ fields come from the same file.
  • Reset: an installed device returns to the installer with priente-installer, no installation medium needed; the installed packages are offered again. Maintenance