SYS.BOOT/01 — x86_64 UEFI · from scratch · in C

An OS
from zero.

NaOS is a usable operating system written from scratch: its own UEFI bootloader, its own kernel, FAT32 storage, multitasking, USB keyboard and a TCP/IP stack. No GRUB. No libc. No prebuilt OS code.

tty0 — serial● LIVE
NaOS v0.1.0 - kernel OK blk: using ahci fat32: spc=1 fat@32 data@2050 root=2 tot=131072 dhcp: ack 10.0.2.15 NaOS> version NaOS v0.1.0 build 2026-10-14 (x86_64 UEFI, from scratch) NaOS>
0lines of prebuilt OS code
v0.1.0current verified release
3storage drivers — AHCI NVMe ATA
39shell commands, plain English
02/

Capabilities

Every line below the firmware is ours — bootloader, kernel, drivers, filesystem, scheduler, network stack.

01

Own UEFI bootloader

Custom BOOTX64.EFI in C: GOP framebuffer, ELF64 parsing, one-shot ExitBootServices, clean handoff — plus a shell auto-boot fallback.

02

Plain-English shell

A NaOS> prompt with 39 commands, history, scrollback, font sizes, output redirect and a themeable prompt.

03

Real storage

AHCI, NVMe and ATA under one block layer, writable FAT32, long filenames — and a live RAM copy of the boot volume, so the ISO boots with files anywhere.

04

Multitasking + fork

Ring-3 tasks with private address spaces, preemptive scheduler, syscalls, copy-on-write fork(), disk-loaded ELF programs with file I/O.

05

TCP/IP networking

E1000 driver with ARP, ping, UDP sockets, DHCP, DNS and a TCP client — fetch pages over HTTP, update pulls verified downloads.

06

USB HID keyboard

Polled XHCI stack with hotplug rescan next to the classic PS/2 driver. PC-speaker beeps included.

03/

Speak to it

No Unix-isms. Type what you mean at the NaOS> prompt.

Files

listreadgomake-foldermake-filecopymoverenameeditdeletenafs

System

helpversionaboutclearprintmemorytestcrashruntaskskilltimedateuptimebeeppcisettingsfont

Network

netdhcppingfetchdnsupdate

Hardware & power

usbnvmerebootshutdown
04/

Boot sequence

Seven steps from power-on to prompt. Measured on QEMU q35 + OVMF, typical run.

#StageWhat happensArtifact
00UEFI firmwareMounts the ESP, runs the fallback loader\EFI\BOOT\BOOTX64.EFI · ~17 KB
01BOOTX64.EFIGOP framebuffer, parses ELF64, stages a live RAM copy of the boot volume\NaOS\KERNEL.ELF → 0x100000
02ExitBootServicesOne-shot exit; hands a bootinfo struct downNAOS_BOOTINFO_MAGIC
03kernel_entryGDT · IDT · PIC · PIT 100Hz · PMM · own PML4 · heapCR3 switch, 16 task slots
04DriversBlock (AHCI → NVMe → ATA → RAM copy) · FAT32 · USB · E1000blk: using …
05NetworkStatic IP, then DHCP lease when a server answers10.0.2.15/24 via 10.0.2.2
06NaOS> shellSettings load, 39 commands, blinking cursor/SETTINGS.TXT

Detour path: if firmware drops to its shell instead, \startup.nsh auto-boots us after the countdown — no typing needed.

05/

Memory map

Physical layout. Values typical for QEMU q35 + 256M (PMM reports ~52K free pages at boot).

RangeUse
0x000000–0x09FFFFLow memory — firmware-owned until ExitBootServices
0x100000 …Kernel ELF LOAD segments, entry kernel_entry
< 0x40000000Live RAM copy of the boot volume (Block I/O, staged pre-exit)
0x40100000…Ring-3 programs (fixed base, private tables per task)
0 … 1G identityOwn PML4: identity 0–1G + framebuffer window, 2M pages
EfiConventionalMemoryPMM free-page stack · 4KB pages · 8KB kernel / 16KB user stacks
06/

Syscall table

Ring-3 gate: int 0x80. Ten calls, 0–9. Max 2048 bytes per call; 8 fds per task, opens start at 3.

#CallSignature
0exitexit()
1printprint(s, len) → written
2yieldyield()
3getpidgetpid() → id
4sleepsleep(ticks)
5forkfork() → child pid (CoW)
6openopen(path, 0=r|1=w|2=a) → fd
7readread(fd, buf, len) → bytes
8writewrite(fd, buf, len) → bytes
9closeclose(fd) — flushes writes
07/

Honest limits

What v0.1.0 does not do. No asterisks hidden anywhere else on this page.

AreaLimitTracks to
TCPClient only — no listen/acceptdone in v0.2.0
TLSNone — updates over plain HTTP onlylater
NVMe512-byte namespaces, one I/O queue pair, polledv0.2.0
Optical/USB storageNo ATAPI, no USB mass — CD/USB boot uses the RAM sessionlater
NaOS-FSRead-only guest; writes laterdone in v0.2.0
HardeningNo ASLR, no stack protector, no signatureslater
FirmwareUEFI-only 64-bit, Secure Boot offby design
08/

Versions

Each release is a frozen snapshot — source, tools, docs and changelog included. Browse all versions →

current · verified on QEMU + VirtualBox

NaOS v0.1.0

Shell · FAT32 + live RAM copy · multitasking + fork · USB keyboard · UDP/DHCP/DNS/TCP + updater · AHCI/NVMe/ATA · NaOS-FS reader.

09/

Build it

Windows + MSYS2 UCRT64, QEMU, and the /opt/cross toolchain. Full setup in the version README.

# inside versions/v0.1.0
export PATH=/opt/cross/bin:$PATH
./tools/check.sh  # verify every tool + OVMF
make all           # BOOTX64.EFI + KERNEL.ELF
make esp           # 64M FAT ESP image
make run           # QEMU + OVMF → NaOS> shell

  No build? Grab NaOS.v0.1.0.iso from the release, boot it with Rufus (DD mode, Secure Boot off) — or browse the code online.