Warning
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.
Currently, MINI-OS is a very small x86 32-bit pure assembly operating system.
MINI-OS supports running C90-standard C programs that do not use dynamic memory allocation (malloc/free) or floating-point operations (float/double).
(Use QEMU)
- BIOS boot sector loader with kernel load to memory
- Protected-mode kernel entry (
[org 0x8000]) - VGA text console and polling keyboard input
- ATA PIO disk I/O (
LBA28, sector read/write) - Custom filesystem with persistent directory tree
- IDT Interrupt Table &
int 0x80System Call Engine (sys_exit,sys_write) - Executable loader (
run <file>) for multi-sector flat binaries at0x00040000 - C90 application runtime (
CRT0+MiniLibC) - Host-side disk transport tool (
tools/inject_transport.c) for inject/external/files - 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)transport/: host files injected into/external/on disk image (includes C90hello.c,minilibc,crt0.asm)docs/: project documentationbuild/: generated binaries and disk image
nasmcc/clang/gcc(host C compiler forinject_transportbuild)qemu-system-i386- standard shell tools used by
Makefile(dd,wc,mkdir,rm)
make clean
make
make runBuild artifacts:
build/boot.binbuild/kernel.binbuild/inject_transportbuild/mini_os.img
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
ls
run hello.bin
run calc.bin
Sector layout in current implementation:
LBA 0: boot sectorLBA 1..100: reserved kernel areaLBA 101: superblockLBA 102: inode bitmapLBA 103..110: data bitmapLBA 111..366: inode tableLBA 367+: data blocks
- 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 - Real hardware boot guide:
docs/Real_Hardware_Guide.md - Known limitations:
docs/Limitations_and_Roadmap.md
Caution
MINI-OS uses a very primitive file system implementation and has known flaws (such as aggressive, brute-force disk read/write operations). Therefore, long-term use may increase hardware wear and tear.
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.
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.
