Running in QEMU
QEMU provides a complete virtualized x86_64 environment with UEFI support, enabling rapid development and testing without physical hardware.
Quick Start
make runThis command builds everything and launches QEMU with the NØNOS desktop.
Run Modes
Graphical
make run
Window with desktop
Normal development
Serial
make run-serial
Terminal only
Debugging boot issues
Debug
make debug
GDB server on :1234
Kernel debugging
Graphical Mode
make runOpens a window displaying the NØNOS desktop environment.
Keyboard shortcuts:
Ctrl+Alt+G
Release mouse from QEMU
Ctrl+Alt+F
Toggle fullscreen
Ctrl+A X
Force quit QEMU
Serial Mode
Redirects all output to your terminal. Essential for debugging boot failures:
Debug Mode
Starts QEMU paused with GDB server listening on port 1234.
Connect with GDB:
Common GDB commands:
break kernel_main
Set breakpoint
continue
Resume execution
stepi
Single instruction step
info registers
Show CPU registers
x/16x $rsp
Examine stack
QEMU Configuration
The Makefile generates this QEMU invocation:
Parameter Reference
-m
512M
Guest RAM allocation
-cpu
qemu64
CPU model emulation
-machine
q35
Modern PCIe chipset
-drive
fat:rw:target/esp
Mount ESP as FAT filesystem
-pflash
OVMF.fd
UEFI firmware
-vga
std
VGA graphics adapter
-serial
mon:stdio
Serial output to terminal
-no-reboot
—
Exit on triple fault
OVMF Firmware Locations
The Makefile auto-detects OVMF based on your platform:
Debian/Ubuntu
/usr/share/OVMF/OVMF_CODE.fd
Fedora
/usr/share/edk2/ovmf/OVMF_CODE.fd
Arch Linux
/usr/share/edk2-ovmf/x64/OVMF_CODE.fd
macOS Intel
/usr/local/share/qemu/edk2-x86_64-code.fd
macOS ARM
/opt/homebrew/share/qemu/edk2-x86_64-code.fd
Hardware Acceleration
Linux (KVM)
Linux (KVM)QEMU uses KVM automatically when available:
If KVM isn't available, QEMU falls back to TCG (software emulation).
macOS (Hypervisor.framework)
macOS (Hypervisor.framework)Modern macOS systems provide hardware virtualization through Hypervisor.framework. QEMU uses it automatically.
Note: Apple Silicon Macs emulate x86_64 via Rosetta 2 + QEMU TCG, which is slower than native ARM virtualization.
Troubleshooting
"Could not initialize SDL"
Missing graphics libs
apt install libsdl2-2.0-0 or use make run-serial
"OVMF not found"
OVMF not installed
apt install ovmf or brew reinstall qemu
Boot hangs
Kernel panic during init
Use make run-serial to see error messages
Triple fault loop
Early boot crash
Use make debug + GDB to find crash point
Black screen
GPU not initialized
Check serial output; may need driver work
Mouse not captured
QEMU focus issue
Click window, then Ctrl+Alt+G to toggle
Advanced Configuration
Custom RAM Size
Enable Networking
Record Boot Trace
What's Next
Creating Bootable Media — Build USB installer
Booting on Hardware — Test on real hardware
Last updated
Was this helpful?


