Chrysalis OS is a custom operating system built from scratch in C/C++, designed as a hands-on learning and research project in low-level systems programming. It currently provides a terminal-based interface and is architected with future GUI support in mind.
The project was initially considered under names like cppOS and herryOS, but neither fully captured its purpose.
The name Chrysalis was chosen to reflect the core idea behind the project: transformation.
Just like a chrysalis represents the transitional stage before a butterfly emerges, Chrysalis OS begins as a minimal, terminal-based system and gradually evolves into a more complex operating system with advanced features and, eventually, a GUI.
The name symbolizes:
- gradual growth
- continuous learning
- evolution from simplicity to complexity
- Name: Chrysalis OS
- Language: C/C++ with x86 Assembly for bootstrapping
- Architecture: x86 (i386)
- Bootloader: GRUB (Multiboot-compliant)
- Development Platform: Linux (Debian-based recommended)
- Testing: QEMU virtual machine
- Current Status: Pre-alpha / active development
- Build an operating system from scratch (bare metal)
- Understand low-level concepts such as:
- boot process
- interrupts and IRQs
- memory management
- paging and virtual memory
- Start with a terminal/CLI interface
- Design the kernel with future GUI and multitasking expansion in mind
- Learn by implementing, debugging, and evolving real kernel code
build-essentialgcc,g++nasmmakebinutilsgdb
qemu-system-x86qemu-utils
grub-pc-binxorrisomtools
gitclanglldbvalgrindcmake(optional, future use)
A helper script (install.sh) is provided to simplify environment setup.
The script:
- Detects the Linux distribution (Debian, Ubuntu, Arch, Fedora, etc.)
- Allows selective installation of package groups
- Handles package name differences between distros
- Can remove installed packages if needed
chmod +x install.sh
sudo ./install.shThe script presents an interactive menu for package management.
Check that GRUB utilities are installed:
which grub-mkrescueExpected output:
/usr/bin/grub-mkrescue
If missing (Debian/Ubuntu):
sudo apt install grub-pc-bin xorriso mtoolsGRUB (Grand Unified Bootloader) was chosen because:
- It is not Linux-specific
- Fully supports the Multiboot specification
- Handles low-level boot complexity
- Is well-tested and widely used
- Allows focusing on kernel development instead of custom boot code
Important note:
GRUB is not installed on the host system.
Its binaries are bundled directly into the bootable ISO image using grub-mkrescue.
chrysalis/
โโโ boot/ # Bootloader configuration
โ โโโ grub.cfg
โโโ kernel/ # Kernel source code
โ โโโ kernel.cpp # Kernel entry point
โ โโโ interrupts/ # ISR / IRQ handling
โ โโโ drivers/ # Hardware drivers (PIT, keyboard, etc.)
โ โโโ arch/ # Architecture-specific code (x86)
โโโ include/ # Kernel headers
โโโ lib/ # Kernel-side library code
โโโ build/ # Compiled object files (generated)
โโโ iso/ # ISO build output (generated)
โ โโโ boot/grub/
โโโ Makefile
Typical workflow during development:
- Write or modify kernel code
- Run
maketo build the kernel and ISO image - Run
make runto boot the OS in QEMU - Debug using serial output or GDB
- Iterate and improve
- Multiboot: The kernel follows the Multiboot specification so GRUB can load it
- Freestanding Environment: The kernel is built without relying on a host OS
- Interrupt Safety: Special care is taken to avoid race conditions during early boot
- Testing: QEMU provides a safe sandbox for kernel experimentation
- OSDev Wiki โ https://wiki.osdev.org/
- Multiboot Specification โ https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
- Intelยฎ 64 and IA-32 Architectures Software Developerโs Manuals
- GRUB Manual โ https://www.gnu.org/software/grub/manual/
MIT License (see LICENSE file).
Chrysalis OS is primarily a personal learning and research project. Contributions, suggestions, and constructive feedback are welcome, but expectations should align with its experimental nature.
Project Status: Pre-alpha Current Version: 0.0.1 Last Updated: December 31, 2025