$ boot citra-os

Citra OS

A bare-metal operating system built from scratch

A minimalist x86 kernel written in C++17 and x86 assembly. It boots directly on hardware or under QEMU, with no host OS underneath.

citra - boot.log

$ qemu-system-i386 -kernel citra.bin

[ok] citra: multiboot handoff

[ok] citra: vga text mode 80x25

[ok] citra: idt - 256 gates

[ok] citra: heap allocator - 64 kb

[ok] citra: scheduler - 16 tasks

[ok] citra: in-memory filesystem

[ok] citra: security scanner armed

citra: shell ready - 14 commands

// 01 - about

What is Citra OS?

Citra OS is a from-scratch, bare-metal operating system for x86 (i686) hardware. It boots directly on real machines or under QEMU with no underlying operating system. Every byte of the kernel, from the GRUB handoff to the interactive shell, is hand-written in C++17 and x86 assembly.

It is an open-source hobby project by Andrew Aliela, built to demonstrate the core concepts of operating systems: interrupts, memory management, multitasking, filesystems, and security. All of it fits in a few thousand lines of freestanding code.

arch.cfgi686
[kernel]
name        = citra-os
arch        = i686
lang        = c++17 + x86 asm
boot        = multiboot (grub)
display     = vga text 80x25
heap        = 64 kb
tasks       = 16
fs          = in-memory inode
security    = signature scanner
shell       = 14 commands

// 02 - features

What's under the hood

Every subsystem is implemented from scratch. No borrowed kernels, no legacy code. Just bare-metal engineering.

[01]

Bare-Metal Boot

Multiboot-compliant handoff via GRUB. Citra takes control of the machine from the first instruction, with no host OS underneath.

[02]

Hardware Abstraction

Direct VGA text-mode display and PS/2 keyboard drivers talk to real hardware, with no BIOS calls after boot.

[03]

Interrupt System

A full IDT with PIC remapping and IRQ handling routes every hardware interrupt through the kernel.

[04]

Memory Management

A custom 64 KB heap allocator manages kernel memory with explicit allocation and release.

[05]

Multitasking

A cooperative scheduler juggles up to 16 concurrent tasks with full context switching.

[06]

Filesystem

An in-memory, inode-based filesystem provides hierarchical storage without a disk driver.

[07]

Security Engine

A signature-based scanner inspects loaded content against known-bad patterns at runtime.

[08]

Interactive Shell

A built-in shell with 14 commands for exploring the system, including memory dumps and task listing.

// 03 - tech stack

System specifications

Architecturex86 (i686)
LanguageC++17 + x86 Assembly
DisplayVGA Text Mode 80x25
Memory64 KB custom heap
Tasks16 max
Compileri686-elf-gcc/g++

// 04 - get started

Boot it yourself

The source is open and the build is reproducible. Clone the repo, compile with the i686-elf toolchain, and boot it in QEMU, or follow along with the docs.