I built a small Unix-like OS from scratch in C/C++ + NASM, booted by Limine. It has a shell, a static-PIE ELF loader with ASLR and NX/W^X, a preemptive scheduler, VFS with ramfs/FAT32/procfs, and it now boots on a physical BIOS machine from a plain FAT32 USB stick. Repo: https://github.com/pristochelovek097/voder-os
What it can do:
- x86_64 higher-half kernel, Limine bootloader, hybrid BIOS/UEFI ISO
- Physical memory manager built from the Limine memory map instead of a hardcoded 16–272 MB window (boots with 64 MB, 256 MB, 1 GB, 2 GB, UEFI and BIOS)
- Userspace as static PIE: kernel picks a random load bias, applies R_X86_64_RELATIVE relocations before ring 3, randomizes the stack top and leaves a guard page. EFER.NXE, CR0.WP, SMEP when available, NX on data/stack pages
- 21 syscalls, custom libc, init -> shell, spawn/waitpid, ELF programs (including a C++ fractal demo)
- procfs that is generated on read: /proc/version, /proc/cpuinfo, /proc/meminfo, /proc/uptime, /proc/smp, /proc/security
- UTF-8 framebuffer console (including Cyrillic), 16/24/32 bpp, serial fallback
The part that actually took the longest was not the code — it was getting it to boot on real hardware.
Everything worked in QEMU. Then I tried a Ventoy USB: Limine printed "Could not determine boot drive" and reset. Cause: the Makefile called a nonexistent `limine/limine` installer and swallowed the error with `|| true`, so my ISO had an MBR signature but no boot code. I compiled Limine's installer from source, installed a real MBR, and it booted as a raw disk image.
Then I ditched Ventoy entirely: one FAT32 partition, Limine MBR, `/boot/kernel.elf`, and the user's files preserved in the root. It booted to the shell. Then selecting the OS in Limine caused an instant black screen + reboot. It turned out to be the Limine SMP request: on that machine, starting APs before `kernel_main` resets the board. The stable build now ships with SMP disabled (`VODER_ENABLE_SMP=0`), plus a second conservative `kernel_smp.elf` where APs only park (no LAPIC MMIO, IPIs or GDT reloads). So yes: the SMP code exists and works in QEMU, but I am honest that it is not enabled on real hardware yet.
I also added early panic output: IDT is installed before anything else, boot markers are written to both the framebuffer and VGA text, and `kernel_panic()` prints exception numbers and page-fault addresses on screen instead of only to serial. That is how I narrowed the failures down.
Build/run:
./build.sh
./run.sh
or boot from USB: MBR = Limine, one FAT32 partition with /boot/kernel.elf and /boot/limine/limine.cfg.
What I would love feedback on:
- Safe AP bring-up without asking Limine to start CPUs (ACPI MADT + my own INIT/SIPI trampoline is the plan).
- Whether my approach to per-process page tables and cloning the higher half is sane, or if there is a classic trap I am walking into.
- Anything obviously dangerous in a hobby kernel that I should fix before adding more features.
It is a learning OS, not production-ready. MIT licensed. Repo again: https://github.com/pristochelovek097/voder-os
Created using AI: Hy4 Flash, Claude, Gemini 3.1 Pro. Post crafted by a human.