Skip to content
kazah-png edited this page Aug 1, 2026 · 4 revisions

FAQ

Common questions about NyxOS. For symptom-first help see Troubleshooting.

See also: Home, Architecture, Building, Glossary

General

What is NyxOS?

A from-scratch x86_64 operating system written in C and assembly — no libc, no third-party kernel code. It boots into a windowed desktop, runs ring-3 ELF programs preemptively across multiple cores, speaks TCP/IP and TLS 1.2 to the live internet, and ships its own web browser.

Is it a Linux distribution?

No. It shares no code with Linux. The interface is POSIX-influencedfork, execve, waitpid, pipes, signals, mmap behave as you would expect — but nothing beyond that is compatible. Linux binaries do not run on NyxOS, and NyxOS binaries do not run on Linux.

Can I use it for anything real?

No. It is a hobby operating system built for learning. There is no privilege model beyond ring 0/3, no filesystem permission enforcement, no ASLR, no exploit mitigations, and none of the cryptographic code has been reviewed by anyone outside the project. See Security.

Does it run on real hardware?

It is developed and tested under QEMU. The requirements are a Multiboot 2 bootloader, a Bochs-compatible VBE framebuffer, a PS/2 keyboard and mouse, an ATA PIO disk and an RTL8139 NIC — a combination far more common in emulation than on modern machines.

Why the name?

Nyx is the Greek goddess of night. The browser is named Selene, after the moon, and the desktop theme is called Nightfall.

Architecture

Monolithic or microkernel?

Monolithic. Drivers, filesystems, the TCP/IP stack, TLS, the compositor and the web browser all run in ring 0 and link into a single nyx-kernel.bin.

Why is the web browser in the kernel?

Because the compositor is. Every built-in application is a kernel window with a draw function and callbacks. It is not a defensible design for a production system — a malformed page reaches ring-0 code — and it is documented as such in Security.

How big is the kernel?

Around 130 source files in kernel/. build.ps1 prints the binary size after each build.

What is the .wiki repository?

GitHub Wikis are separate git repositories. This wiki lives in nyx-os.wiki.git, alongside the code in nyx-os.git. AGENTS.md requires both to be updated together — see Contributing.

Building and running

Do I need a cross-compiler?

No. A host GCC with -m64 works, which is what build.ps1 uses. x86_64-elf-gcc also works.

Why does the build go through WSL on Windows?

grub-mkrescue and GNU ld are Unix tools. build.ps1 invokes make inside WSL and then runs QEMU on the Windows side.

My change did nothing. Why?

Almost certainly a stale build. This Makefile has shipped stale kernels through three separate mechanisms — a hijacked default goal, untracked header dependencies, and a linker script that did not force a relink. All three are fixed, but the reflex is still correct:

host $ make -C kernel clean && make -C kernel

How many CPUs should I give it?

run.ps1 defaults to 4. Use -Cpus 1 to distinguish a locking bug from a logic bug — if a failure disappears on one core, it is a locking bug. See SMP.

Why does DOOM quit immediately?

It needs /mnt/doom1.wad. Attach ext2-test.img, which run.ps1 does automatically when the file is present.

Are [CPU] SMEP=unavailable and [SB16] DSP reset failed errors?

No. The default qemu64 CPU model does not expose SMEP/SMAP, and no SB16 device is attached unless you pass -Sound. Both messages are informational.

Userspace

What can I write programs in?

C, against user/libc.h — a freestanding library that grew compiler-complete in the Phase 2 toolchain work (stdio, ctype, strtod, …), though still not a full standard C library. Also assembly, and Nyx C, a typed subset of C that transpiles to C. See HOWTO-Write-a-userspace-program.

Can I compile programs inside NyxOS itself?

Yes. NyxOS ships an in-OS C compiler — a port of TinyCC driven by the cc builtin. cc hello.c -o hello compiles, links and produces a runnable NyxOS executable without a host or a network. The compiler is complete enough to compile the OS's own libc, its shell, real coreutils byte-identically, and even tcc's own source. See Toolchain.

Is there a package manager?

No. Programs are compiled into the initramfs at build time — though you can now also compile C at runtime with cc (see above).

Why does my program need -mno-red-zone?

The SysV ABI lets a leaf function use the 128 bytes below RSP without adjusting it. An interrupt landing there clobbers them. Omitting the flag produces a binary that works until the wrong interrupt arrives, then corrupts silently.

Why did getdents return nothing?

The kernel copies into your buffer and cannot fault in a lazy-sbrk heap page on your behalf. Use a .bss array, or memset the buffer first. The same applies to getprocs.

How many file descriptors do I get?

32 per process (PROC_MAX_FDS), shared across a thread group. They are closed automatically at reap, so a crash cannot leak them.

Are there real threads?

Yes — clone(CLONE_VM) plus futex. Threads share the address space, the heap, the mmap table and the fd table. A thread group stays pinned to one core, because it shares page tables. See Process-Management.

Networking and TLS

Does HTTPS actually work?

Yes. TLS 1.2 with ECDHE key agreement, AES-128-GCM records, ServerKeyExchange signature verification, and X.509 chain verification to pinned anchors with hostname and validity checks. tls example.com from the shell, or open Selene-Browser.

Should I trust the TLS stack?

No. Every primitive was written from scratch for this project and reviewed by nobody else. Constant-time behaviour is not claimed. The trust store holds five anchors, not a real root set. It is a working implementation, not a safe one.

Why does a site fail with X509_INCOMPLETE?

Its root is not among the five bundled anchors. That verdict means "I could not anchor this", not "this is forged" — the distinction is deliberate, because collapsing the two would either cry wolf or hide an attack. See Cryptography-and-TLS.

Why does a site refuse to load in strict mode?

That is what strict mode is for. It refuses any handshake that fails chain, hostname, date or signature verification. Use tlsstrict off during development.

IPv6?

No. IPv4 only, with no fragmentation or reassembly.

Does NyxOS support Wi-Fi?

No — Ethernet only. rtl8139.c is the only NIC driver compiled in; there is no 802.11 stack, no WPA supplicant, and no other network card driver of any kind. There is one load_wifi_firmware(void) {} stub in kernel.c, but nothing in the tree calls it — it's dead code, not a hidden feature. See Networking-Stack.

Filesystem

Does anything persist across reboots?

Yes, on the EXT2 disk mounted at /mnt — including /etc/passwd, so user accounts survive. Since v6.0.6 the logged-in user's home lives on the disk at /mnt/home/<user>, so files created there (from the Terminal, File Manager or Text Editor) survive too. The ramdisk does not persist. See Filesystem#persistent-home-directory.

Why didn't my write to /mnt survive?

Mount-backed nodes flush on close. Close the file.

Is the EXT2 driver trustworthy?

The write path is verified with e2fsck, not against itself — a driver that reads back what it wrote can be self-consistently wrong. The sector cache is write-through, so it cannot lose data on a crash. That said, do not point it at a filesystem you care about.

SMP

Do user processes really run on other cores?

Yes, in ring 3. Each core has its own TSS descriptor, so a ring-3 → ring-0 entry lands on the kernel stack of the process that core is running. smpuser demonstrates it.

Why is automatic balancing off by default?

It is safe for long-lived processes but not under heavy fork/exec churn. smpbalance on enables it explicitly. Thread groups always stay pinned.

Is preempt_disable() enough to protect shared state?

No. It stops a context switch on the local core and means nothing to another one. Cross-core state needs a spinlock. This distinction is the single most common source of SMP bugs in this codebase.

Contributing

How do I get started?

AGENTS.md ends with a maintained "Next features to add" list. Small entry points: a userspace coreutil, a self-test command, a GUI app, or wiki corrections. See Contributing.

Why are there so many releases?

Development is deliberately incremental — most releases add exactly one capability and verify it. As of v5.9.180 there are 342 tagged releases. This makes each change small enough to bisect and to explain, which is why Version-History is useful rather than noise.

Why do the docs describe old bugs?

Because they explain why the code looks the way it does. A reader who knows the TSS once had three extra reserved bytes will check that offset first when the IST stops working. These are kept deliberately.

Do I have to update the documentation?

Yes. AGENTS.md makes wiki, docs/, README.md and the release table a commit requirement. A change to a constant, syscall number or capacity limit makes the wiki wrong until it is updated.

See also

External resources

Clone this wiki locally