Bare-Metal Boot
Multiboot-compliant handoff via GRUB. Citra takes control of the machine from the first instruction, with no host OS underneath.
$ boot 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.
$ 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
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.
[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
Every subsystem is implemented from scratch. No borrowed kernels, no legacy code. Just bare-metal engineering.
Multiboot-compliant handoff via GRUB. Citra takes control of the machine from the first instruction, with no host OS underneath.
Direct VGA text-mode display and PS/2 keyboard drivers talk to real hardware, with no BIOS calls after boot.
A full IDT with PIC remapping and IRQ handling routes every hardware interrupt through the kernel.
A custom 64 KB heap allocator manages kernel memory with explicit allocation and release.
A cooperative scheduler juggles up to 16 concurrent tasks with full context switching.
An in-memory, inode-based filesystem provides hierarchical storage without a disk driver.
A signature-based scanner inspects loaded content against known-bad patterns at runtime.
A built-in shell with 14 commands for exploring the system, including memory dumps and task listing.
// 03 - tech stack
// 04 - get started
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.