Currently, MINI-OS is a very small x86 32-bit pure assembly operating system.
MINI-OS supports running strict C90 programs with dynamic memory allocation and a documented subset of familiar C library APIs. Floating-point operations are not supported. The runtime implementation itself uses modern C.
Note
MINI-OS is only an experimental system and is far from perfect.
Thanks to Gemini, Gork, GPT, and Mistral for their support.
The documentation and some comments were written by Gemini and GPT. A small part of the code was developed in collaboration with Gemini and GPT.
(Use QEMU)
- BIOS boot loader with EDD probing, per-sector retries, and CHS fallback
- Protected-mode kernel image at
0x8000, beginning with an executable entry jump tokernel_start - VGA text console and polling keyboard input
- checked ATA PIO disk I/O (
LBA28, primary-channel master sector read/write) with boot-image identity verification before mount - Custom filesystem with persistent directory tree and fail-stop detection of interrupted mutations
- IDT Interrupt Table &
int 0x80System Call Engine for console, heap, file, and cursor services - FAT-chain executable loader (
run <file>) for flat binaries up to 64 KiB at0x00040000 - Modern-C runtime implementation with Dynamic Memory Allocation (
malloc/free/realloc/calloc) - Tested API subset exposed through
<stdio.h>,<stdlib.h>,<string.h>,<ctype.h>,<limits.h>,<stddef.h>, and<assert.h> - Host-side transactional disk transport tool (
tools/inject_transport.c) for injecting/transport/files without exposing a partial output image - Built-in shell commands:
help,ls,pwd,cd,mkdir,touch,cat,edit,rm,mv,run <file>,format
OS_src/boot/: bootloader sourcesOS_src/kernel/: kernel, shell, drivers, filesystem, IDT & syscalls, and utilitiestools/: host build tools (inject_transport.c,elf2bin.c,check_image.c)transport/: host files injected into/transport/on disk imagetransport/lib/: modern-C runtime library,crt0.asm, and standard C header wrapperstransport/apps/: strict C90 applications (hello.c,calc.c,guess.c,banner.c,vedit.c)transport/lib_test/: strict C90 executable tests, including BSS coveragetransport/build/: compiled flat output binaries (apps/*.bin,lib_test/*.bin)
docs/: project documentationbuild/: generated kernel binaries and disk image
nasmccfor modern-C host toolsclangfor the freestanding modern-C runtime and strict-C90 apps/testsld.lldwhen available; otherwise the built-inelf2binpath is usedqemu-system-i386- Python 3.9 or newer for automated tests
- standard shell tools used by
Makefile(dd,wc,mkdir,rm,grep,tr,expr)
make clean
make
make runBuild artifacts:
build/boot.binbuild/kernel.binbuild/inject_transportbuild/elf2binbuild/check_imagebuild/mini_os.img
The image target always runs the read-only integrity checker. Run the complete automated suite with make test.
Typical flow after boot:
mkdir docs
cd /docs
touch note.txt
edit note.txt
cat note.txt
mv note.txt note2.txt
ls
cd /transport/build/apps
ls
run hello.bin
run calc.bin
Sector layout in current implementation:
LBA 0: boot sector, including a per-image 48-bit identityLBA 1..100: reserved kernel areaLBA 101: superblock, including the unfinished-mutation markerLBA 102: inode bitmapLBA 103..118: FATLBA 119..374: inode tableLBA 375..4470: 4,096 data blocks
The generated image is exactly 4,471 sectors (2,289,152 bytes).
- Project overview:
docs/Project_Overview.md - Architecture:
docs/Architecture.md - Code structure:
docs/Code_Structure.md - Build and run:
docs/Build_and_Run.md - Shell and usage:
docs/Shell_and_Usage.md - C90 development guide:
docs/C90_Development_Guide.md - Filesystem (current implementation):
docs/Filesystem_Current.md - Filesystem design draft:
docs/DIY-FS.md - Complete system call ABI:
docs/Syscall_ABI.md - Runtime support matrix:
docs/Library_Support.md - Automated testing:
docs/Testing.md - Real hardware boot guide:
docs/Real_Hardware_Guide.md - Known limitations:
docs/Limitations_and_Roadmap.md
Caution
MINI-OS uses a small experimental filesystem without journaling or crash recovery. It is not intended for valuable or long-term storage.
Apart from this, MINI-OS does not perform any destructive operations on the machine. Nevertheless, to prevent potential data loss or hardware damage, it is still recommended to run it on a non-critical machine.
This project currently targets BIOS/CSM-style boot flows.
After BIOS loading, filesystem access requires the boot disk to remain exposed as the primary legacy ATA/IDE master.
make run configures QEMU accordingly, but many firmware USB paths do not provide this mapping.
Before mounting, the kernel compares immutable boot/kernel bytes and a per-image 48-bit identity with that ATA target and refuses mismatches without writing.
For USB boot on physical machines, read docs/Real_Hardware_Guide.md carefully.
Writing images to raw devices can destroy existing data on that device.
