Skip to content

Installation Guide

This guide will help you install and set up SAGE OS on your system or in a virtual environment.

🎯 Prerequisites

System Requirements

Component Minimum Recommended
RAM 2 GB 8 GB
Storage 10 GB 50 GB
CPU x86_64, ARM64, or RISC-V Multi-core
Graphics VGA compatible Hardware acceleration

Supported Architectures

  • x86_64: Intel/AMD 64-bit processors
  • ARM64: ARM 64-bit processors (AArch64)
  • RISC-V: RISC-V 64-bit processors

🛠️ Development Environment Setup

Install Dependencies

=== "Ubuntu/Debian"

sudo apt update
sudo apt install -y \
    build-essential \
    nasm \
    grub-pc-bin \
    grub-efi-amd64-bin \
    xorriso \
    mtools \
    qemu-system-x86 \
    qemu-system-arm \
    qemu-system-misc \
    gcc-multilib \
    libc6-dev-i386

=== "Fedora/RHEL"

sudo dnf install -y \
    gcc \
    nasm \
    grub2-pc \
    grub2-efi-x64 \
    xorriso \
    mtools \
    qemu-system-x86 \
    qemu-system-arm \
    qemu-system-riscv

=== "Arch Linux"

sudo pacman -S \
    base-devel \
    nasm \
    grub \
    xorriso \
    mtools \
    qemu-system-x86 \
    qemu-system-arm \
    qemu-system-riscv

Install Rust Toolchain

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env

# Add required targets
rustup target add x86_64-unknown-none
rustup target add aarch64-unknown-none
rustup target add riscv64gc-unknown-none-elf

# Install required components
rustup component add rust-src
rustup component add llvm-tools-preview

📥 Getting the Source Code

Clone Repository

# Clone the main repository
git clone https://github.com/AshishYesale7/SAGE-OS.git
cd SAGE-OS

# Switch to development branch
git checkout dev

# Initialize submodules (if any)
git submodule update --init --recursive

Verify Setup

# Check build environment
make check-env

# Verify all dependencies
./scripts/verify-dependencies.sh

🏗️ Building SAGE OS

Quick Build

# Build for x86_64 (default)
make build

# Build for specific architecture
make build ARCH=x86_64
make build ARCH=aarch64
make build ARCH=riscv64

Detailed Build Process

# Clean previous builds
make clean

# Build bootloader
make bootloader ARCH=x86_64

# Build kernel
make kernel ARCH=x86_64

# Build user space
make userspace ARCH=x86_64

# Create ISO image
make iso ARCH=x86_64

Build Configuration

Create a .config file to customize the build:

# .config
ARCH=x86_64
DEBUG=1
OPTIMIZATION=2
FEATURES=network,graphics,usb
TARGET_CPU=native

💿 Creating Installation Media

ISO Image Creation

# Create bootable ISO
make iso ARCH=x86_64

# The ISO will be created at:
# dist/sage-os-x86_64.iso

USB Drive Creation

# Create bootable USB drive (replace /dev/sdX with your USB device)
sudo dd if=dist/sage-os-x86_64.iso of=/dev/sdX bs=4M status=progress
sudo sync

Virtual Machine Images

# Create QEMU disk image
make vm-image ARCH=x86_64

# Create VirtualBox image
make vbox-image ARCH=x86_64

# Create VMware image
make vmware-image ARCH=x86_64

🖥️ Installation Methods

QEMU

# Run in QEMU
make run ARCH=x86_64

# Or manually:
qemu-system-x86_64 \
    -cdrom dist/sage-os-x86_64.iso \
    -m 2G \
    -enable-kvm \
    -cpu host \
    -smp 2

VirtualBox

  1. Create new VM with:
  2. Type: Other
  3. Version: Other/Unknown (64-bit)
  4. Memory: 2048 MB
  5. Hard disk: Create new (20 GB)

  6. Mount the ISO and boot

VMware

  1. Create new VM
  2. Select "I will install the operating system later"
  3. Choose "Other" as guest OS
  4. Allocate resources
  5. Mount ISO and boot

Method 2: Physical Hardware

Hardware Installation

Installing on physical hardware will erase existing data. Ensure you have backups!

  1. Boot from USB/CD
  2. Insert installation media
  3. Boot from USB/CD in BIOS/UEFI
  4. Select SAGE OS from boot menu

  5. Installation Process

  6. Follow on-screen instructions
  7. Select installation disk
  8. Configure partitions
  9. Set up user account
  10. Complete installation

Method 3: Network Boot (PXE)

# Set up PXE server
./scripts/setup-pxe-server.sh

# Configure DHCP for PXE boot
# Boot target machine from network

⚙️ Post-Installation Configuration

First Boot

  1. System Configuration
  2. Set timezone
  3. Configure network
  4. Create user accounts
  5. Set up SSH keys

  6. Package Management

    # Update system
    sage-pkg update
    
    # Install additional packages
    sage-pkg install development-tools
    

  7. Security Setup

    # Enable firewall
    sage-firewall enable
    
    # Configure secure boot
    sage-secureboot setup
    

Development Setup

# Install development tools
sage-pkg install build-essential rust-toolchain

# Set up development environment
./scripts/setup-dev-env.sh

# Configure editor/IDE
sage-config editor vim  # or code, emacs, etc.

🔧 Troubleshooting

Common Issues

Build Failures

# Check dependencies
./scripts/check-dependencies.sh

# Clean and rebuild
make clean && make build

# Verbose build output
make build V=1

Boot Issues

  1. UEFI Boot Problems
  2. Disable Secure Boot in BIOS
  3. Enable Legacy Boot mode
  4. Check boot order

  5. Hardware Compatibility

  6. Check supported hardware list
  7. Update firmware/BIOS
  8. Try different boot parameters

Virtual Machine Issues

  1. Performance Problems
  2. Enable hardware acceleration (KVM/VT-x)
  3. Increase allocated memory
  4. Use virtio drivers

  5. Graphics Issues

  6. Try different graphics modes
  7. Disable 3D acceleration
  8. Use software rendering

Getting Help

📊 Installation Verification

System Check

# Check system information
sage-info system

# Verify installation
sage-verify --full

# Run system tests
sage-test --basic

Performance Benchmarks

# Run performance tests
sage-benchmark --all

# Memory test
sage-test memory

# Storage test
sage-test storage

# Network test
sage-test network

🔄 Updates and Maintenance

System Updates

# Check for updates
sage-update check

# Install updates
sage-update install

# Automatic updates
sage-update auto-enable

Backup and Recovery

# Create system backup
sage-backup create --full

# Restore from backup
sage-backup restore --file backup.tar.gz

# Recovery mode
# Boot with 'recovery' kernel parameter

🔗 Next Steps

After successful installation:

  1. Quick Start Guide - Get familiar with SAGE OS
  2. First Boot - Initial system configuration
  3. Development Setup - Set up development environment
  4. Architecture Overview - Understand the system

📚 Additional Resources