Introduction

rlxos GNU/Linux

rlxos is a general purpose and independent operating system based on Layered Filesystem with Android linux UX and feel on desktop PC.

rlxos ships its own homegrown

  • PKGUPD Package manager.
  • BOLT Personal virtual Assistant.
  • Source Programming Language.
  • And will more.

Requirements

TYPEREQUIREMENTMINIMUM
CPUintel (sky-lake)x86_64
MEMORY4 GiB1 GiB
STORAGE10 GiB5 GiB
BOOT FIRMWAREUEFILEGACY will deprecate soon

Architecture

Layered Architecture

Layered Architecture divides the system into layers one above the other, the top most layer is a read-n-write layer that holds the user changes (or cache data) while the below layers provided different functionalities to the system at different permission levels.

rlxos 2200 System Structure

The above diagram represents a very simple representation of layer architecture, or first generation of rlxos layered architecture.

File system protection

To get a better understanding of the Layered Architecture assume you have to color a flower drawing if you are using permanent colors, and you made a mistake then there is no way back, your drawing is damaged, and you need to redraw it.

So what the other thing you can do ? You can put a transparent sheet on it and fill the colors on that transparent sheet, So if you made any mistake you just need to replace the above sheet.

This is the simplest example for how the rlxos Layered architecture works. All the changes are store in the top layer (i.e. user cache layer). If you made some changes that break the system just replace the cache layer.

Factory Reset

As in the File System Protection section we replaced the transparent sheet from the drawing on a mistake. rlxos Factory reset works the same way. You can either load of new cache data or delete the older.

Multiple Layers

Now suppose you have colored your flower with red. After some time you want to repaint with yellow or pink. Now this can be achieved by simply changing the transparent sheet. and recolor it with different color and that's how the current architecture of rlxos works.

With this you can have different DE or app collections on different profiles.

Bootable media

Bootable media is a CD, DVD, USB flash drive, or other removable media that enables you to run the agent without the help of an operating system.

Bootable media is required to configure rlxos into the hardware, So our first step is to prepare it. Method to prepare the bootable media depends on your current existing operating system. But before that we need the stable rlxos ISO (download-rlxos)

From GNU/Linux

or any Unix like system with dd tool

Its pretty simple in linux, just plug you usb and execute a command and wait for the success message.

    sudo dd bs=4M if=/path/to/rlxos.iso of=/dev/sdX status=progress oflag=sync

replace /path/to/rlxos.iso with rlxos ISO path and /dev/sdX with your USB device node

From Windows

It is preferred to use rufus a simple opensource GUI tool to create bootable usb download from here

rufus

Configuration

Boot ModePartition SchemeTarget SystemMode
LegacyMBRBIOS or UEFIISO
UEFIGPTUEFIDD

Partition

Gparted is a GTK frontend to GNU Parted and an official GNOME partition-editing application. GParted is used for creating, deleting, resizing, moving, checking, and copying disk partitions and their file systems

Gparted

Gparted is a GTK frontend to GNU Parted and an official GNOME partition-editing application. GParted is used for creating, deleting, resizing, moving, checking, and copying disk partitions and their file systems

gparted

Partition Table

If you are using an unallocated disk (in the case of a virtual system) then you need to create a new partition table.

  • From Device Menu, Select Create New Partition Table

rlxos Partitions Layout

Primarily rlxos need only a single partition of at least 10 GiB for a system to boot and work properly.

MBR on BIOS

PartitionSizeDescriptionFlagsLabel (optional)
root>= 10GiBroot parition for rlxos system Imagerlxos

GPT on BIOS

PartitionSizeDescriptionFlagsLabel (optional)
boot>= 1MiBA atleast 1MiB partition for bios system with gpt schemeBIOS bootEFI
root>= 10GiBroot parition for rlxos system Imagerlxos

EFI GPT

PartitionSizeDescriptionFlagsLabel (optional)
EFI>= 100MiBEFI partition with format fat32boot espEFI
root>= 10GiBroot parition for rlxos system Imagerlxos

Installer

Once you are booted into the rlxos live media you will prompt to the System Installer that helps in the installation process.

Installer

Live user

Installation media allows you auto-login as liveuser to perform the installation. This account only reside in the installation media so no changes are saved into the installed system.

  • Default access password for liveuser is liveuser
  • liveuser is a member of adm for admin access.

Installation

  • Click 'Next' to Start the process, If you have not set up your disk you will prompt to the gparted. You should have a partition layout according to the one specified on the docs.

  • Once you are done with partitions you need to select the root partition of rlxos

Select Target Device

  • After that Installer performs the compatibility checkups.

Compatibality Checkup

  • You need to be 100% sure with the configurations before clicking 'Next' because after that there is no way back.

Installation

  • If things go right you will be asked to reboot the system after clicking 'Next'

Finised

QEMU

QEMU is a free and open-source emulator. It emulates the machine's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems

Website: https://www.qemu.org/

Installations

QEMU is packaged by most Linux distributions:

rlxos GNU/Linux:

pkgupd install qemu

ArchLinux:

pacman -S qemu

Debian/Ubuntu:

apt-get install qemu

Fedora:

dnf install @virtualization

Gentoo:

emerge --ask app-emulation/qemu

Virtual Disk

We need a virtual disk that is needed to emulate the storage device and on that device we are going to install our rlxos.

    qemu-img create disk.img 10G

You can configure the disk size as per your requirement, rlxos need atleast 10GiB of disk space.

KVM Acceleration

QEMU is a type 2 hypervisor and emulate all of the virtual machine's resources, which can be extremely slow. Using KVM (Linux Kernel Module), which is a type 1 hypervisor for full virtualization and can be used as accelerator so that the physical CPU virtualization extensions can be used

So we need to check if the system supports KVM virtualization (most hardware does).

file /dev/kvm

and it should print something like

/dev/kvm: character special (../...)

Starting virtual machine

qemu-system-x86_64  \
    -m 4G           \
    -vga virtio     \
    -display default,show-cursor=on \
    -usb \
    -smp 2 \
    -cdrom **/path/to/rlxos.iso** \
    -drive file=disk.img,if=qcow2 \
    -enable-kvm \
    -cpu host \

Parameters you can customize

ParameterDescription
-mvirtual memory to allocate
-vgagraphics driver
-smpcpu core
-cdrompath to rlxos ISO
-enable-kvmif KVM is available

Now follow the installation and partition GUIDE as it is

Gnome Boxes

A simple GNOME application to view, access, and manage remote and virtual systems.

GNOME QEMU frontend? (can say)

Its pretty simple to use, just Install, Select ISO and done.

Installation

Flatpak method is prefered but you can install it from your package manager (named gnome-boxes)

flatpak install org.gnome.Boxes

Run

flatpak run org.gnome.Boxes

or start it from shell

gnome-shell

Create and Boot into rlxos Box

  • You need to select Create Virtual Machine from file and the select the rlxos iso

select

  • Use Unknown OS as rlxos is independent distro. prepare

  • And go with the default configurations.

Now follow the installation and partition GUIDE as it is

Initial Setup

The first time a new system is booted is a special situation. There is no user account yet, and a few basic setup steps need to be performed before it can be considered fully usable. The initial-setup mode offers a series of steps to

  • Select your language

select-your-language

  • Select your keyboard layout

select-keyboard-layout

  • Configure user privacy

user-privacy

  • Set location and timezone

location-timezone

  • Configure online accounts

online-accounts

  • Create a new user account

create-new-user

  • Create password for it

create-password

Finish

finish

Interface

The welcome screen

rlxos provide a traditional interface that feels like home out-of-the-box. A minimal interface with only bottom taskbar that holds your favourite apps, system-tray.

welcome-screen

App menu

Open app-menu by '⌘' (the super-key) or 'Show-Application' button to view all apps

app-menu

Press '⌘' and start typing your query

global-search

Switch to dark mode

Auto switch to dark mode in night time is supported out-of-the-box. Immediate switch between dark or day mode can be done by using '🌜' from the task bar.

dark-mode

Customization

You can make rlxos work and look in the way you want.

Basic Theming - Fonts, Icons, Themes and wallpaper.

Installing new themes, icons and fonts are pretty easy in rlxos.

  • Just go to Bazaar
  • Look up for fonts, icons, theme in the search or categories
  • Download and paste them in ~/Applications directory
  • Open the gnome-tweak tool and select your installed item

gnome-tweaks

gnome-tweaks

Extensions

Extension system of GNOME is too great to describe. You can make the system look like Macintosh, windows or any mixture of that.

PKGUPD

PKGUPD is the core package management scheme used in rlxos (2107 builds).

PKGUPD is provide a high level abstraction for managing package in rlxos GNU/Linux. PKGUPD is capable of managing packages both from binary packages and source codes;

PKGUPD is capable to install/building universal AppImage (.app), native packages (.pkg and .rlx), subsystems (.machine) and system images (.img)

Basic Usage

Updating system and database

However upgradation of system packages is restricted with 2200 release and pkgupd-update only manage the AppImages and extra installed package updates.

sudo pkgupd update

Exclude packages from update via update.exclude=list,of,packages,

Installing package, appimage or machine

sudo pkgupd install <package-name>

Skip dependency checkup via installer.depends=false Force reinstallation via force=true Different root directory via dir.root=/path/to/root

Removing packages

Removal of system packages (or preinstalled packages) is resticted as per the layer-architecture. So pkgupd-remove is usefull for user installed packages and appimages

sudo pkgupd remove <package-name>

and then to cleanup unneeded dependencies

sudo pkgupd autoremove

Search package via name or description

pkgupd search <package-name> or <description>

Getting information about package

pkgupd info <package-name>

or to print information about specific parameter

pkgupd info <package-name> info.value=name

supported parameters are:

  • name
  • version
  • about
  • files
  • installed.time
  • files.count
  • repository
  • package

or to dump the package information into file

pkgupd info <package-name> info.dump=/path/to/file

Cleanup cache

/var/cache/pkgupd/ holds the temporary files and cache of downloaded packages

sudo pkgupd cleanup

PKGUPD Architecture

Recipe files

PKGUPD uses the yaml format files called recipes, that holds the information about the package, its source code, packaging format, license, build instructions etc.

id: nano
version: 6.3
about: Pico editor clone with enhancements
depends:
  runtime:
    - file
    - ncurses
license: GPL
category: accessories
tags:
  - cli
  - terminal
  - editor
  - text
  - notepad
sources:
  - https://www.nano-editor.org/dist/v6/nano-{{version}}.tar.xz

configure: >
  --enable-color
  --enable-nanorc

Above is the recipe file for nano (command line file editor tool).

Server-To-Local

pkgupd-build generates the binary package with .meta information for the package (take a look at core-repository)

these .meta files are them merged into stable and testing versions of server.stability level used by the pkgupd user to install and update the binary packages into the local system.

Type of packages

As PKGUPD is the most extensible package manager, it can handle a packages of type

  • Native Packages (.pkg or .rlx) packages the are binary packages the holds the filesystem of a specific application.
  • Universal AppImages (.app) universal self-containing applications that work on all linux systems
  • Machines (.machine) rlxos subsystem containers
  • System Images () System Images are the complete compressed root filesystem of rlxos that mount itself below overlay during boot.

Building packages

Its alway recommended to build packages inside rlxos-devel container/docker

To build package for rlxos we first need to write a recipe file. (read architecture to more about it)

recipe file must contains atlest id, version and about for the package

Basic Information

id unique name to the package version application version packed about a short description of package.

id: sample-package
version: 0.0.1
about: A sample package for demonstration

Source Code

Then we need to specify the list of source files accessible via http, https, ftp or file protocols.

sources:
    - https://url.com/for/package-0.0.1.tar.gz
    - new-name-0.0.2.tar.gz::https://url.com/for/package2-0.0.1.tar.gz

Compilation

Now we have the package information and source code and this infromation is more than enough in most of the cases as PKGUPD is intelligent enough to extract and autodetect the build tools for the source code and automatically compile it.

Sometime the source code is inside the sub-directory of source package tarball, to tell pkgupd to use specifiy subdirectory inside the source code.

build-dir: package-0.0.1/source/code

PKGUPD can detect and autobuild following build-tools

  • CMakeLists.txt (cmake)
  • Makefile (makefile)
  • configure (autoconf)
  • setup.py (pysetup)
  • meson.build (meson)
  • cargo.toml (cargo)
  • go.mod (go)

but some source code can have multiple build-tools and to specify pkgupd to use some specific tool

build-type: cmake

PKGUPD manage the configuration, compile time and installation flags and user can append its custom flags too.

configure: >
    --with-documentation
    --without-nls

compile: make-docs

install: install-docs PREFIX=/usr

To override pkgupd configuration flags specify the --prefix in meson, pysetup and autoconf and -DCMAKE_INSTALL_PREFIX in cmake.

Packaging

Pkgupd currently supports zstd compressed tarballs (and based machine) and squashfs packaging formats. To specify packaging format and package type

type: pkg

Supported types are:

  • pkg
  • app
  • machine
  • system

Each package type have some specific externsions which we check later.

Dependencies

Package might expect to have some libraries and tools to preinstalled during builing and installations.

depends:
    runtime:
        - package1
        - package2
    buildtime:
        - package3
        - package4

Pre/Post scripts

Process to be done before and after compilation of package

pre-script: |
    patch -Np1 -i /path/to/file.patch

post-script: |
    rm -r ${pkgupd_pkgdir}/usr/doc/

Including packages

PKGUPD can include package within the package itself and these are avaiable during the compilation.

include:
    - some-runtimes
    - other-runtime

included packages can have dependencies and that can be managed with

include.depends: false

meta data for included packages are store in /usr/share/{{id}}/included/ and can be modified with

include.path: /var/lib/pkgupd/data

Installation script

This script execute during package installation

install-script: |
    echo "do some installation things"
    ls -al

Users and groups

Package might expect the existence of some users or groups in the system to work properly

users:
    - id: 100
      name: user-one
      about: An example user
      group: 100
      shell: /bin/false
      dir: /dev/null

groups:
    - id: 100
      name: a group

    - id: 120
      name: other group

Subsystem 1st Generation

Subsystem in rlxos are guest system that share the hardware and OS kernel with rlxOS.

Enable PKGUPD repository

First we need to enable the pkgupd repository to access the prebuilt guest systems.

  • Create a new file with super user permission

sudo vim /etc/pkgupd.yml.d/repos.yml

  • Past the below content in the file
repos:
    - core
    - extra
    - apps
    - machine
  • Refresh PKGUPD database

sudo pkgupd update

Installing Guest System

Install the guest system via pkgupd, In this example we are going to setup debian-stable subsystem. Same process can be used for other subsystems too.

sudo pkgupd install debian-stable

After the message of successful installation we can boot up the subsystem via machinectl.

Starting Guest system

sudo machinectl start debian-stable

No output for this command means success, and debian-stable is booted successfully

To checkout the logs use sudo journalctl -xe

Login into Guest system

After the successful bootup guest system is ready to login or shell access.

sudo machinectl shell root@debian-stable

List running sub systems

List of currently active subsystems

machinectl list

Enable subsystem to run on every start

sudo machinectl enable debian-stable

Restart subsystem

sudo machinectl reboot debian-stable

Exiting for gest system

Press the ctrl and ] key 3 times to exit the guest system

Use host Networking

To use host network connection add the following option:

/etc/systemd/nspawn/debian-stable.nspawn
---------------------------------
[Network]
VirtualEthernet=no

Enable Graphical apps

xhost +local: can be used to share the X server to subsystems

$ xhost +local:
$ machinectl shell root@debian-stable -E DISPLAY=${DISPLAY}

3D Graphics acceleration

To enable accelerated 3d graphics we need to bind /dev/dri

/etc/systemd/nspawn/debian-stable.nspawn
----------------------------------------
[Files]
Bind=/dev/dri

Sharing files

Files and directories can be shared with bind mount and/or readonly mounts

/etc/systemd/nspawn/debian-stable.nspawn
----------------------------------------
[Files]
Bind=/path/to/shared/directory

or

From host to machine machinectl copy-to debian-stable /path/to/file/in/host /path/in/machine

From machine to host machinectl copy-from debian-stable /path/to/file/in/machine /path/in/host

Run docker inside machine

Its not recommends as rlxos itself provide a good support to docker and its have no benifit of using docker inside machine

/etc/systemd/nspawn/debian-stable.nspawn
----------------------------------------
[Exec]
SystemCallFilter=add_key keyctl bpf

[Files]
Bind=/dev/fuse

Factory reset

Factory reset, also known as hard reset or master reset, is a software restore of an electronic device to its original system state by erasing all the information stored on the device. A keyboard input button factory reset is used to restore the device to its original manufacturer settings.

Factory reset will delete the cache layer and system with boot into the initial setup stage.

It is recommended to create a new profile (or cache layer) instead of deleting the previous one (that might contain data you need)

To Factory reset rlxos:

  • Reboot the system and enter in GRUB bootloader.

  • Press 'e' to enter EDIT mode.

  • Navigate with bottom arrow key to linux command-line arguments and add reset and secure=<your-security-key> at the end of it.

  • Press ctrl-x to factory reset rlxos