Quickstart Guide
Get Portix OS up and running on your system in just a few minutes. This guide walks you through installing prerequisites, building the kernel, and running it in QEMU.Prerequisites
Before building Portix, ensure you have the following tools installed on your system:Required Tools
Install Rust Nightly
Portix uses unstable Rust features that require the nightly toolchain.
The
rust-src component is required because Portix compiles its own core and alloc libraries for the bare-metal target.Optional Tools
These tools are optional but provide additional functionality:- xorriso or genisoimage: For creating proper ISO9660 CD-ROM images with El Torito boot
- qemu-img: For generating VDI and VMDK disk formats
- pycdlib: Python library for ISO generation (
pip install pycdlib)
Building Portix OS
Run the Build Script
The build script handles everything: assembling the bootloader, compiling the kernel, and creating disk images.This command will:
- Verify all required tools are installed
- Assemble
boot.asm(Stage 1 bootloader) - Compile the Rust kernel with custom target
- Assemble
stage2.asm(Stage 2 loader) - Create a raw disk image (
portix.img) - Generate ISO, VDI, and VMDK formats
- Automatically launch QEMU
The build process uses Rust’s
-Z build-std flag to compile core and alloc from source for the bare-metal target.Running Portix OS
Quick Start with QEMU
If you ranpython scripts/build.py without the --no-run flag, QEMU will launch automatically after building. Otherwise, you can run Portix manually:
- Raw Disk Mode
- ISO CD-ROM Mode
- VMDK Mode
- Ventoy Simulation Mode
Boot from the raw disk image (default mode):This boots Portix as an IDE hard disk in QEMU.
Build Script Options
Thebuild.py script supports several command-line options:
| Option | Description |
|---|---|
--mode=<mode> | Specify boot mode: raw, iso, vmdk, vmi, ventoy-sim |
--no-run | Build without launching QEMU |
--no-iso | Skip ISO generation |
--no-vm | Skip VDI/VMDK generation |
--clean | Clean all build artifacts |
What to Expect When It Boots
When Portix successfully boots, you’ll see:Boot Sequence
The boot process transitions through:
- Stage 1 loads Stage 2 from disk
- Stage 2 sets up Long Mode and loads the kernel
- Kernel initializes hardware and enters the main loop
System Tab (F1)
The default view shows:
- CPU information (brand, cores, features)
- Memory information
- Boot status with green checkmarks:
Terminal Tab (F2)
An interactive terminal with commands:
ayuda- Show available commandssystem- Display system informationcpu- Show CPU detailsdisk- List disk partitionspci- Show PCI devicesclear- Clear terminaledit <filename>- Open text editor
Navigation
Keyboard Shortcuts
| Key | Action |
|---|---|
| F1 | System information |
| F2 | Terminal |
| F3 | Devices (PCI, ACPI) |
| F4 | IDE (code editor) |
| F5 | File Explorer |
| Tab | Cycle through tabs |
| Esc | Close menus / Clear terminal |
| PgUp/PgDn | Scroll terminal history |
| Home/End | Jump to top/bottom of terminal |
Mouse Controls
- Left Click: Select, interact with UI elements
- Right Click: Context menus (in Explorer)
- Scroll Wheel: Scroll terminal history
- Drag: Move scrollbars
Running in VirtualBox
To run Portix in VirtualBox:Create a New VM
- Open VirtualBox
- Click “New” to create a virtual machine
- Name: “Portix OS”
- Type: Other
- Version: Other/Unknown (64-bit)
Configure VM Settings
- Memory: At least 256 MB
- Hard disk: Use existing - select
build/dist/portix.vdi - System → Motherboard → Enable “IO APIC”
- System → Processor → 1 CPU (more if available)
- Display → Video Memory → 16 MB minimum
Running on Real Hardware
To run Portix on real hardware:Configure BIOS
- Boot into your system’s BIOS/UEFI settings (usually F2, Del, or F12)
- Disable Secure Boot (Portix uses BIOS Legacy mode)
- Set boot order to boot from USB first
- Save and exit
Troubleshooting
Build Errors
Error: nasm not found
Error: nasm not found
Install NASM using your package manager (see Prerequisites section).
Error: objcopy not found
Error: objcopy not found
Install binutils or mingw-w64 packages:
Error: rust-src component missing
Error: rust-src component missing
Kernel panic or boot failure
Kernel panic or boot failure
Check the serial log for detailed error messages:Debug logs are also available:
Runtime Issues
Black screen in QEMU
Black screen in QEMU
This may indicate a boot failure. Check:
- QEMU is using the correct boot mode
- The disk image was built successfully
- Review
build/logs/serial.logfor errors
Keyboard not responding
Keyboard not responding
PS/2 keyboard initialization may have failed. This is common in some VM configurations. Try:
- Restarting the VM
- Checking QEMU version (older versions may have PS/2 issues)
No graphics / VGA text mode
No graphics / VGA text mode
Portix requires VESA framebuffer support. Ensure:
- QEMU is using
-vga std(default in build script) - VirtualBox has sufficient video memory allocated
Next Steps
Now that you have Portix running:Explore the Terminal
Try commands like
system, cpu, disk, and pci to explore your systemWrite Some Code
Press F4 to open the IDE and create text files
Browse Files
Press F5 to explore the FAT32 file system
Contribute
Learn how to contribute to Portix OS development
Additional Resources
- Build Logs: Check
build/logs/build.logfor detailed build information - Serial Output: Debug kernel messages in
build/logs/serial.log - QEMU Debug: Hardware-level debug info in
build/logs/debug.log
Having issues? Check the serial log first - it contains detailed kernel-level debug output that can help diagnose problems.
Congratulations! You’ve successfully built and run Portix OS. Explore the system, try different commands, and see what this bare-metal kernel can do.