A freestanding, 32-bit x86 toy operating system built from bare metal for Hack Club's Third Space sprint.
The kernel boots into Protected Mode via the Multiboot 1 standard, sets up a hardware-interfaced VGA text console, provides an in-memory virtual filesystem (RAMFS), and includes low-level debugging utilities (raw physical memory hex dumper and BIOS E820 memory map walker).
Want to try it without cloning or building anything? You only need QEMU.
-
Install QEMU:
- Fedora:
sudo dnf install qemu-system-i386 qemu-ui-gtk - Debian / Ubuntu:
sudo apt install qemu-system-x86 - Arch:
sudo pacman -S qemu-system-x86 - Windows / macOS: install from qemu.org/download
- Fedora:
-
Download
os.isofrom the Releases page. -
Boot it:
qemu-system-i386 -cdrom os.iso -display gtk
On Windows/macOS, if
-display gtkisn't available in your build, drop that flag and QEMU will pick its default display.
To exit, close the QEMU window (or press Ctrl+Alt+G to release the mouse first if it's grabbed).
Want to build it yourself? See Build Targets.
To compile and emulate the kernel on Linux:
# Fedora / RHEL
sudo dnf install gcc nasm qemu-system-i386 qemu-ui-gtk
# Ubuntu / Debian
sudo apt install build-essential nasm qemu-system-x86
# Arch Linux
sudo pacman -S base-devel nasm qemu-system-x86Compile and direct-boot into QEMU:
cd kernel
make runClean build artifacts:
make cleanBuild Final ISO:
make # Compiles all .s and .c files, links kernel.elf
make run # Boots kernel.elf directly in QEMU (bypasses ISO generation)
make iso # Copies kernel.elf into iso/boot/ and builds os.iso via genisoimage
make run-iso # Boots the complete bootable CD-ROM image via GRUB 0.97
make clean # Removes all compiled object files, kernel binaries, and ISO images-
Bootstrapping & Entry (
arch/x86/boot.s,linker.ld) -
Video Console & Hardware Cursor (
src/vga.c,include/io.h) -
Freestanding Standard Library & Logger (
src/string.c,src/kprintf.c) -
In-Memory Virtual Filesystem (RAMFS) (
src/fs.c) -
Debugging & Inspection Tools (
src/memdump.c)
Type these directly into the kernel console in QEMU:
help- Lists all available kernel commandsclear- Clears the 80x25 screen and resets cursor to top-leftls- Lists all files and sizes currently stored in the RAMFScat <file>- Displays the contents of a filewrite <file> <text>- Creates a new file in RAMFS or overwrites existing contentsdump <addr> [len]- Inspects raw physical memory at<addr>in canonical hex/ASCIImmap- Displays the physical BIOS E820 RAM layouttime- Reads real-world wall clock time from the CMOS Real-Time Clockuptime- Displays system uptime calculated from PIT timer hardware ticks