- Introduction
- System Requirements
- Installation
- System Architecture
- Core Components
- Package Management
- Development Environment
- System Administration
- Troubleshooting
RegicideOS is a specialized fork of Xenia Linux focused on:
- Rust-First Architecture: System components migrated to Rust for memory safety and performance
- Immutable System Architecture: Read-only base filesystem for enhanced security and reliability
- AI-Integrated: AI capabilities at the system level for predictive maintenance and context-aware assistance
| Feature | Xenia Linux | RegicideOS |
|---|---|---|
| Desktop Environment | Multiple choices | Cosmic Desktop only |
| Language Focus | Mixed ecosystem | Rust-first approach |
| System Updates | Traditional | Immutable/atomic |
| Package Management | Standard repositories | Direct download + overlay system |
- Processor: 64-bit x86 CPU (Intel/AMD)
- Memory: 4GB RAM
- Storage: 20GB available disk space (20GB ROOTS + 12GB HOME recommended for LUKS encrypted systems)
- Firmware: UEFI or Legacy BIOS
- Processor: Multi-core x86-64
- Memory: 8GB+ RAM
- Storage: 30GB+ SSD storage
- Firmware: UEFI with Secure Boot support
Currently supported:
x86_64(AMD64)
RegicideOS requires installation from a Linux live environment. We recommend Fedora Live:
- Download Fedora Live Workstation: https://getfedora.org/workstation/download/
- Create bootable USB: Use tools like
dd, Rufus, or balenaEtcher - Boot target machine: From the live USB environment
Once booted into the live environment:
# Install dependencies
sudo dnf install -y git curl gcc sgdisk rust cargo
# Clone RegicideOS repository
git clone https://github.com/awdemos/RegicideOS.git
cd RegicideOS/installer
# Build installer (now without warnings)
cargo build --release
# Verify build completed successfully
./target/release/installer --version
⚠️ IMPORTANT: Prevent system suspend during installation to avoid state corruption, especially when using LUKS encryption. The installer now handles this automatically, but manual prevention is recommended for reliability.
The easiest installation method is to use the pre-built installer binary:
# Download and run the pre-built installer
sudo ./binaries/regicide-installer
# Or run with configuration file
sudo ./binaries/regicide-installer -c regicide-config.tomlThe installer will guide you through:
- Drive Selection: Choose target installation drive
- Filesystem Layout: BTRFS with LUKS encryption (recommended)
- User Setup: Create administrative user account
- Application Sets: Choose minimal or recommended packages
If you prefer to build the installer from source or need to customize it:
# Build the installer from source
cargo build --release
# Verify build completed successfully
./target/release/installer --version
# Run interactive installation
sudo ./target/release/installer
# Or run with configuration file
sudo ./target/release/installer -c regicide-config.toml
# For development/testing with dry run
cargo run --bin installer -- --dry-runFor scripted deployments, create a configuration file:
# Create configuration
cat > regicide-config.toml << EOF
drive = "/dev/sda"
repository = "https://repo.xenialinux.com/releases/"
flavour = "cosmic-fedora"
release_branch = "main"
filesystem = "btrfs_encryption_dev"
username = "admin"
applications = "recommended"
EOF
# Run with pre-built installer (recommended)
sudo ./binaries/regicide-installer -c regicide-config.toml
# Or run with source-built installer
sudo ./target/release/installer -c regicide-config.tomlThe RegicideOS installer performs these steps:
-
System Preparation
- Validate system dependencies (gdisk, cryptsetup, etc.)
- Check network connectivity to Xenia repositories
-
Drive Partitioning (4-Partition Overlayfs Layout)
- EFI System Partition (512MB, FAT32) with boot flag
- Root Partition with LUKS-encrypted BTRFS (ROOTS label)
- OVERLAY Partition (BTRFS, writable layers)
- HOME Partition (BTRFS, user data)
-
Filesystem Setup
- Create BTRFS filesystem on ROOTS and HOME partitions
- Setup LUKS encryption on ROOTS partition with cryptsetup
- Set up overlay directory structure
-
System Image Download
- Download compressed system image from Xenia repositories
- Uses
cosmic-fedoraflavor - Verify image integrity with checksums
-
Bootloader Installation
- Install GRUB for EFI or Legacy BIOS
- Configure boot parameters for immutable system
- Configure LUKS initramfs support BEFORE GRUB installation
- Install GRUB with crypto modules for encrypted boot
-
Post-Installation Configuration
- Set up overlay filesystem mounts (/etc, /var, /usr)
- Configure LUKS initramfs scripts and crypttab
- Generate GRUB configuration with dynamic UUID detection
-
User Account Creation
- Create administrative user with sudo access
- Setup user home directory
- Configure user groups (wheel, video, audio, etc.)
-
Application Installation
- Install Flatpak applications from Flathub
- Setup application containers (Distrobox) for isolated workspaces
-
System Configuration
- Install official dotfiles (regicide-dotfiles)
- Configure system services
- Setup networking
-
Cleanup and Verification
- Verify all mounts and services
- Generate installation report
**See INSTALLATION_ARCHITECTURE.md for complete technical details on the 4-Partition Overlayfs architecture and LUKS boot implementation.
RegicideOS uses a 4-Partition Overlayfs architecture inherited from Xenia Linux:
/dev/sda1 512 MB FAT32 label "EFI"
/dev/sda2 ~12-20GB BTRFS label "ROOTS" (read-only base system)
/dev/sda3 ~4-8GB BTRFS label "OVERLAY" (writable overlay layers)
/dev/sda4 Remaining LUKS-encrypted BTRFS label "HOME" (user data)
Overlay Structure:
/mnt/gentoo/ # Read-only system image from ROOTS (SquashFS)
/mnt/root/overlay/ # Writable overlay for /etc, /var, /usr
/mnt/root/home/ # User home directory (bind-mounted to overlay/home)
Boot Process:
- UEFI → GRUB → kernel (from
/boot/vmlinuzin SquashFS) - initrd loads and mounts:
- SquashFS image to
/(read-only) - Overlayfs layers for
/etc,/var,/usr(writable) /homesub-volume (writable)
- SquashFS image to
- systemd starts with overlays in place
- Simplicity: Proven approach from Xenia Linux
- Reliability: Read-only base cannot be corrupted during normal operation
- Instant Rollback: Simply download previous system image
- Atomic Updates: System updates via new SquashFS images
- LUKS Encryption: Full LUKS encryption support with dynamic partition detection
- No Subvolume Management: Overlays are flat directories, not BTRFS sub-volumes
- Limited Rollback: Only to previous system image, not granular
- No Snapshots: Cannot snapshot individual system states
Note: BTRFS-Native architecture is planned for a future major version and will provide:
- Subvolume-based system layout (@etc, @var, @usr, @home)
- Instant snapshots via
btrfs subvolume snapshot - Granular rollback to specific system states
- Better storage efficiency with copy-on-write
**See INSTALLATION_ARCHITECTURE.md for complete details on current architecture, LUKS boot implementation, and future roadmap.
RegicideOS exclusively ships with Cosmic Desktop:
- Rust Implementation: Built with Iced framework
- Wayland Native: Modern display protocol support
- Tiling Window Manager: Efficient workspace organization
# Cosmic settings are stored in
~/.config/cosmic/
# Example: Enable tiling by default
cosmic-settings set tiling.default true- systemd: Service and process management
- Distrobox: Application containerization for isolated workspaces
- Podman Backend: Secure, rootless containers
RegicideOS uses NetworkManager:
# View network status
nmcli general status
# Connect to WiFi
nmcli dev wifi connect "SSID" password "password"The installer does not use Foxmerge for package management. Instead:
Base System:
- Downloads pre-built SquashFS system images from Xenia Linux repositories
- Root image contains:
cosmic-fedoraflavor with minimal packages - No package management during installation
- System updates via atomic image replacement
Overlay Packages:
- Installed into overlay directories (
/etc,/var,/usr) - Managed by direct system package tools (dnf, emerge, etc.)
- No overlay-specific package manager
Architecture Decision:
- Direct download model was chosen for simplicity and reliability
- Package management happens post-installation by system package tools
- Foxmerge integration is planned but not currently implemented
During Installation:
# No package installation - uses pre-built system image
# Post-Installation (user-initiated):
sudo dnf install <package> # Fedora-style
sudo emerge <package> # Gentoo-style overlays
flatpak install <app> # Flatpak applicationsSystem Updates:
- Atomic: Download new SquashFS image, reboot
- Incremental: Overlay packages updated via system tools
RegicideOS is optimized for modern development with comprehensive tooling. After installing official dotfiles (see Section 7.3), you have a complete development environment:
Zed Editor:
# Install Zed via Flatpak
flatpak install flathub dev.zed.Zed
# Recommended extensions
zed --install-extension rust-analyzer
zed --install-extension lldb
zed --install-extension crates# Essential Rust tools
cargo install cargo-watch cargo-edit cargo-audit cargo-tarpaulin
# Code formatting and linting
cargo install rustfmt clippy
# Documentation generation
cargo install cargo-doc
# Cross-compilation support
rustup target add x86_64-unknown-linux-muslSome recommended Rust-native ML frameworks:
# PyTorch bindings for Rust
cargo add tch
# Candle - Rust-native ML framework
cargo add candle-core candle-nn
# Tokenizers and NLP
cargo add tokenizers hf-hubAI development environments in containers:
# Create ML development environment
distrobox create --name ml-dev --image fedora:39
distrobox enter ml-dev
# Install additional tools
pip install jupyter transformers datasetsRegicideOS provides official dotfiles for a consistent, modern development experience:
The official dotfiles package provides a Rust-focused shell configuration with RegicideOS theming:
# Add RegicideOS dotfiles overlay
sudo eselect repository enable regicide-dotfiles
sudo emaint sync -r regicide-dotfiles
# Install dotfiles package
sudo emerge -av app-misc/regicide-dotfiles
# Install dotfiles for your user
install-regicide-dotfiles
# For specific users (system administrators)
sudo install-regicide-dotfiles --user usernameFeatures included:
- Modern Rust CLI tools (eza, bat, fd, ripgrep, zoxide)
- Enhanced bash with intelligent aliases and functions
- RegicideOS-themed tmux configuration
- Starship prompt with castling theming
- OpenRC/systemd service management
- BTRFS optimization tools
- Portage helper functions
After installation, you can customize your environment:
# Edit shell configuration
nano ~/.bashrc
# Customize tmux
nano ~/.tmux.conf
# Configure prompt
nano ~/.config/starship.toml
# Set up Git configuration
nano ~/.gitconfig# Uninstall dotfiles (creates backup)
uninstall-regicide-dotfiles
# Restore from backup
uninstall-regicide-dotfiles --restore-backupRegicideOS provides comprehensive Rust development support:
# Install Rust toolchain (if not present)
sudo dnf install -y rust cargo rustfmt clippy
# Install additional targets
rustc target add thumbv6m-none-eabi # ARM Cortex-M
rustc target add riscv32imc-unknown-none-elf # RISC-V
rustc target add wasm32-unknown-unknown # WebAssemblyRegicideOS includes special support for embedded development:
# Install embedded tools
cargo install cargo-embed cargo-flash probe-run
# Create embedded project
cargo generate --git https://github.com/rust-embedded/cortex-m-quickstart
# Flash to hardware
cargo embed --target thumbv6m-none-eabiDevelopment environment for RegicideOS itself:
# Clone development repositories
git clone https://github.com/awdemos/RegicideOS.git
cd RegicideOS
# Set up development environment
cargo build
cargo test
# Run installer in development mode
cargo run --bin installer -- --dry-runRegicideOS inherits Xenia Linux's atomic update system using SquashFS images:
# First-time setup (one-time)
sudo emerge --sync xenia
# Check for available updates
curl -s https://repo.xenialinux.com/releases/Manifest.toml
# Automated update process
sudo xenia-update # Updates base system image
sudo foxmerge update # Updates overlay packages (when implemented)
# Manual update process
sudo mount -L ROOTS /mnt/roots
sudo wget https://repo.xenialinux.com/releases/amd64/main/root.img
sudo umount /mnt/roots
sudo rebootPackage overlays are updated using system package management tools:
# Update overlay packages
sudo dnf update
sudo emerge --sync @world
# Update specific package
sudo dnf update package-name
# Check for available updates
sudo dnf check-updates
# Clean up old packages
sudo dnf clean
sudo emerge --depcleanThe installer automates base system updates:
- Download newest
root.imgfrom Xenia repositories - Copy to ROOTS partition
- Touch to ensure newest timestamp
- Sync filesystem
- Reboot
GRUB's 10_linux helper automatically picks the newest root-*.img by modification time.
System configuration persists in overlay filesystems:
# Edit configuration (automatically goes to overlay)
sudo nano /etc/systemd/system.conf
# View overlay changes
sudo btrfs subvolume show /overlay/etc
# View package status
sudo foxmerge config showThe current 4-Partition architecture does not support granular snapshots. For rollback:
# Boot from live environment
sudo mount -L ROOTS /mnt/regicide
sudo mount -L EFI /mnt/regicide/boot/efi
# Reinstall bootloader
sudo chroot /mnt/regicide
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
# RebootNote: BTRFS-native architecture with subvolume snapshot support is planned for future versions (see INSTALLATION_ARCHITECTURE.md).
The phrase "OS personality" refers to ability to replace the read-only SquashFS system image while keeping your local changes and home directory intact. This is one of the most powerful features of RegicideOS's architecture.
An "OS personality" is essentially the complete system environment contained in a SquashFS image file. This includes:
- Base system:
/usr,/bin,/lib,/sbin, and other core directories - Desktop environment: Cosmic Desktop, GNOME, or other environments
- System configuration: Default settings and skeletons
- Package set: Pre-installed applications and libraries
Your personal data remains in separate locations:
- Overlay: Local modifications to
/etc,/var, and/usr - Home directory: User files in
/home - Persistent configuration: Custom settings and installed packages
Because RegicideOS's boot loader (GRUB) always picks the newest root-*.img by modification time, swapping personalities is as simple as copying a new image file to ROOTS partition.
While running RegicideOS or from a live USB:
-
Mount ROOTS partition
sudo mount /dev/disk/by-label/ROOTS /mnt
-
Drop new image in place
sudo cp root-cosmic.img /mnt/ sudo touch /mnt/root-cosmic.img # ensure it has newest timestamp sync -
Reboot
sudo reboot
On the next boot:
- The initrd loopquash-mounts
root-cosmic.img - The system overlays your writable BTRFS sub-volumes
- You are instantly running the new personality
Keep old file for easy rollback:
# Backup current personality
sudo mv /mnt/root-gnome.img /mnt/root-gnome.img.bakIf you want to switch back to GNOME:
sudo touch /mnt/root-gnome.img.bak # make it newest again
rebootYou can keep multiple personalities available:
# List available personalities
ls -la /mnt/root-*.img
# Switch to a specific personality
sudo touch /mnt/root-desired-personality.img
rebootClean up old personalities to save space:
# Remove old personality
sudo rm /mnt/root-old.img
# Free space immediately (BTRFS-specific)
sudo btrfs filesystem sync /mntYou can create your own personalities:
# Create a custom personality from current system
sudo mksquashfs /tmp/rootfs /mnt/root-custom.img -comp zstd -Xcompression-level 19
# Ensure it's newest for next boot
sudo touch /mnt/root-custom.imgLUKS Device Not Found:
# Check if LUKS partition is detected
lsblk -f NAME,FSTYPE,UUID | grep crypto
# Verify mapper device
sudo ls -la /dev/mapper/
# Manual LUKS setup workaround
sudo cryptsetup luksFormat /dev/sdX3 # Replace with your partition
sudo cryptsetup open /dev/sdX3 XENIA
sudo mkfs.btrfs -L XENIA /dev/mapper/XENIA
sudo cryptsetup close XENIABoot Issues After Installation:
# Check boot partition mount
mount | grep efi
# Verify GRUB files exist
ls -la /boot/efi/EFI/
# Check GRUB configuration
cat /boot/efi/grub/grub.cfgNote: As of v2.0 (January 2026), the installer includes comprehensive LUKS boot improvements including dynamic partition detection and proper UUID handling. The issues below describe legacy problems that should no longer occur.
No Password Prompt at Boot (Legacy - Should Not Occur in v2.0+):
Legacy Causes (Fixed in v2.0):
GRUB installed before initramfs configured→ Now configures initramfs BEFORE GRUB installationHardcoded→ Now uses dynamic/dev/sda3partition referencefind_luks_partition()detection- Missing crypttab entry
- Initramfs lacks encrypt hooks
Current Troubleshooting (if issues persist):
# Check LUKS partition is detected (v2.0+ uses dynamic detection)
sudo blkid -o device -t TYPE=crypto_LUKS
# Verify initramfs has LUKS support
lsinitramfs /boot/initrd.img-* | grep cryptsetup
# Check crypttab
cat /etc/crypttab
# Reinstall GRUB with proper modules (v2.0+ does this automatically)
sudo grub-install --modules="cryptodisk luks gcry_rijndael gcry_sha256 gcry_sha1 aesni part_gpt lvm" --target=x86_64-efi --efi-directory=/boot/efi
# Regenerate initramfs
sudo update-initramfs -u -k allLUKS Device Not Found (v2.0+ Enhancement):
The installer v2.0 now uses find_luks_partition() to dynamically detect LUKS partitions across multiple schemes:
/dev/sda3,/dev/sdb3(standard SATA/SCSI)/dev/nvme0n1p3,/dev/nvme1n1p3(NVMe drives)/dev/mmcblk0p3(eMMC storage)
If detection fails:
# Manually verify LUKS partition
sudo blkid -o device -t TYPE=crypto_LUKS
# Check all block devices
sudo lsblk -f | grep cryptoIf system fails to boot:
-
Boot from live environment
sudo mount -L ROOTS /mnt/regicide sudo mount -L EFI /mnt/regicide/boot/efi
-
Reinstall bootloader:
sudo chroot /mnt/regicide grub-install --target=x86_64-efi --efi-directory=/boot/efi grub-mkconfig -o /boot/grub/grub.cfg
-
Try different desktop environments:
- Cosmic Desktop (default)
- GNOME (via different image)
- Wayland-only mode
Since current architecture doesn't support granular snapshots, rollback requires personality swapping (see Section 8.4).
# List available personalities (system images)
ls -la /mnt/root-*.img
# Boot from live USB and mount
sudo mount -L ROOTS /mnt/regicide
# Copy previous working image
sudo cp /mnt/root-working.img /mnt/
# Reboot to use previous personality
sudo reboot# Manage core services
sudo systemctl status networking
sudo systemctl restart bluetooth
# View service logs
sudo journalctl -u systemd-networkd# Control AI agents
sudo systemctl enable portcl
sudo systemctl start portcl
# Monitor agent performance
portcl dashboard
btrmind monitor# Check filesystem status
sudo btrfs filesystem df /
# Balance filesystem
sudo btrfs balance start /
# Scrub for errors
sudo btrfs scrub start /Enable Verbose Boot:
# Add kernel parameter for detailed boot output
# In GRUB: append "verbose" to kernel params
# Or edit /etc/default/grub: GRUB_CMDLINE_LINUX="verbose"Enable Installer Debugging:
# Run installer with debug output
RUST_LOG=debug RUST_BACKTRACE=1 sudo ./installer
# Enable dry-run mode
./installer --dry-runA: No, the current implementation uses flat overlay directories (/etc, /var, /usr) instead of BTRFS sub-volumes. BTRFS-native architecture with subvolume support is planned for a future major version (2026-2027). See INSTALLATION_ARCHITECTURE.md for details.
A: Currently only Cosmic Desktop is supported. GNOME and other Wayland compositors are planned for future releases.
A: Use the btrfs_encryption_dev filesystem layout during installation:
sudo ./installer
# Select: btrfs_encryption_dev
# Enter LUKS password when promptedA: The current 4-Partition architecture supports personality swapping:
- Download previous system image from Xenia repositories
- Copy to ROOTS partition:
sudo cp root.img /mnt/ROOTS/ - Reboot and select older image in GRUB
Note: BTRFS-native architecture with subvolume snapshots will provide granular rollback when implemented.
A: User settings are stored in overlay filesystem:
/etc/config/regicide/- System-wide settings/home/$USER/.config/regicide/- User-specific settings/etc/hosts,/etc/resolv.conf- Network configuration
A: Foxmerge was described in early planning but was not implemented in favor of a simpler direct download model. The installer uses pre-built system images from Xenia Linux repositories, and post-installation package management is handled by standard system tools (dnf, emerge). Foxmerge integration may be considered for future releases for advanced package management scenarios.
A:
# Check partition type
sudo blkid /dev/sda3
# Should show: TYPE="crypto_LUKS"
# Check mapper device
sudo ls -la /dev/mapper/
# Should show: regicideos -> ../sda3
# Check crypttab
cat /etc/crypttab
# Should show: regicideos UUID=<uuid> none luks
# Test initramfs
sudo update-initramfs -u -k all
lsinitramfs /boot/initrd.img-* | grep cryptsetup- INSTALLATION_ARCHITECTURE.md - Complete technical architecture details, LUKS boot implementation
- HANDBOOK_ISSUES.md - Discrepancies analysis between documentation and implementation
- README.md - Project overview and quick start
- DEVELOPMENT_ROADMAP.md - Long-term technical roadmap
- AGENTS.md - AI agent development guidelines
- iso-config.toml - ISO build configuration
- Xenia Linux Documentation
- GRUB Documentation
- BTRFS Documentation
- LUKS/cryptsetup Documentation
- Cosmic Desktop Documentation
GRUB Boot Entry (Encrypted):
menuentry "RegicideOS (Encrypted)" {
linux /boot/vmlinuz-*
initrd /boot/initrd.img-*
options "cryptdevice=UUID=<detected-uuid>:regicideos root=/dev/mapper/regicideos quiet splash rw"
}
Kernel Parameters:
cryptdevice=UUID=<uuid>:regicideos- Tell GRUB which device to openroot=/dev/mapper/regicideos- Root filesystem after LUKS decryptionquiet splash rw- Boot options
Initramfs Components:
cryptsetup- LUKS management utilityencrypthook - Handles LUKS decryption during bootcrypttab- Persistent LUKS device mapping
Detection Algorithm:
- Try
blkid -o device -t TYPE=crypto_LUKS(most reliable) - Fall back to device enumeration (sda3, sdb3, nvme0n1p3, nvme1n1p3)
- Extract UUID from detected partition via
blkid -s UUID -o value - Use device name as ultimate fallback if all methods fail
Supported Partition Schemes:
/dev/sda3,/dev/sdb3(standard SATA/SCSI)/dev/nvme0n1p3,/dev/nvme1n1p3(NVMe drives)/dev/mmcblk0p3(eMMC storage)
Added:
- Dynamic LUKS partition detection via
find_luks_partition()helper function - LUKS UUID extraction for boot configuration
- Comprehensive LUKS initramfs configuration
- GRUB cryptodisk module installation for encrypted boot support
- Improved error handling throughout installer
Changed:
- Updated 3 hardcoded
/dev/sda3references to use dynamic partition detection - LUKS initramfs now configured BEFORE GRUB installation
- Complete rewrite of architecture documentation to accurately reflect 4-Partition Overlayfs implementation
- Removed Foxmerge references (not implemented)
Removed:
verify_grub_environment()function (~200 lines of redundant debugging)create_grub_configuration()function (~182 lines of duplicate logic)
Fixed:
- LUKS boot failures due to hardcoded partition references
- Missing password prompt at boot time
- Incorrect UUID usage in GRUB boot parameters
- Documentation inaccuracies about architecture and package management
Initial release
- 4-Partition overlayfs architecture
- Cosmic Desktop integration
- Xenia Linux base system
- Basic LUKS encryption support
- Basic installer functionality
Document Version: 2.0 Last Updated: January 2026