# Booting Bare-Metal AI: How NightRun Replaces Linux with a Local LLM on Raspberry Pi

> Learn how NightRun allows you to boot a local LLM directly from a USB drive on a Raspberry Pi 5 or x86 PC, bypassing Linux entirely for bare-metal AI.

- Canonical URL: https://coreiten.com/en/article/booting-bare-metal-ai-how-nightrun-replaces-linux-with-a-local-llm-on-raspberry-pi
- Language: en
- Section: Linux
- Author: Sami
- Published: 2026-09-04T02:02:53+03:00
- Modified: 2026-09-04T02:02:53+03:00
- Publisher: CoreITen (https://coreiten.com)
- Keywords: NightRun local LLM, Raspberry Pi 5 AI, bootable LLM USB, Llama 3.2 Raspberry Pi, Rust UEFI application, bare-metal AI

## Summary

NightRun is a new bare-metal project that lets users boot a local LLM directly from a USB drive on a Raspberry Pi 5 or x86 PC without loading Linux.

- The software is built as a single UEFI application in Rust that loads the language model into memory and draws a chat window directly on the framebuffer.
- Supported models are restricted to small-parameter sizes ranging from 1.3GB to 2.4GB, including Llama 3.2 1B and 3B, Granite 4.1 3B, and Qwen3 4B.
- NightRun features an intentionally minimalist command set offering only two options: /clear to start a fresh conversation and /bye to power off.
- Because the system lacks an operating system and network stack, it provides an isolated environment where no data can enter or leave the machine.
- The software's custom bitmap font lacks full Unicode support, meaning accented characters in foreign languages will not display correctly.

**Why it matters:** This approach eliminates traditional operating system vulnerabilities to create highly secure, air-gapped, single-purpose AI hardware.

---

Running a local LLM usually requires a bloated operating system, complex runtimes, and heavy hardware. A new bare-metal project called NightRun bypasses this entirely, allowing users to boot a local AI model directly from a USB drive on a Raspberry Pi 5 or x86 PC without ever loading Linux. This approach turns a standard single-board computer into a dedicated AI appliance that runs entirely within the system's RAM.

Most local AI setups rely on installing an OS, followed by a runtime environment like Lemonade or LM Studio. NightRun eliminates these foundational steps. Built as a single UEFI application written in Rust, the machine's firmware launches the software directly from a USB stick. It loads the language model into memory and draws a chat window pixel by pixel on the framebuffer.

Because there is no bootloader chain, no init system, and no network stack, the environment is completely isolated. Once the model is loaded, no data can enter or leave the machine. On the Raspberry Pi 5, the software even takes over hardware management, driving the cooling fan itself while verifying the model with CRC checksums as it streams into memory.

### Hardware Constraints and Supported Models

Because NightRun operates without an underlying OS, everything must fit directly into the system's RAM. The software relies exclusively on CPU-only decoding, which limits the size and scope of the models it can run. The current roster is restricted to highly optimized, small-parameter models ranging from 1.3GB to 2.4GB in size.

Users can choose between Llama 3.2 1B and 3B, Granite 4.1 3B, and Qwen3 4B. All models are pinned to specific quantizations and operate within a 4096-token context window. The feature set is intentionally minimalist, offering only two commands: `/clear` to start a fresh conversation and `/bye` to power off the machine.

### How to Install NightRun and Fix Build Errors

On paper, installing NightRun is a simple one-liner that clones the repository and launches an interactive installer. The script asks for a target device (x86_64 USB or Pi 5 SD card) and a model, downloads the GGUF file from a pinned Hugging Face revision, converts it to a custom `.nrm` format, and flashes it to the drive. However, because the project builds against a custom UEFI target spec on Rust nightly, toolchain updates can easily break the installation.

When building via WSL2 on Windows, users may encounter compiler errors related to soft-float ABI, SSE, or a missing `wcslen` function in newer LLVM versions. Furthermore, passing a USB stick into WSL2 using usbipd-win often results in a CRC mismatch during the final readback verification. To bypass these WSL2 flashing issues entirely on Windows, you should build the image directly using the following command:

```bash
cargo xtask image
```

Once the image is built, use Rufus in DD mode to write it to your USB drive. This method ensures the model file passes the strict CRC checksum verification upon boot.

### Real-World Performance and Limitations

Despite the severe hardware constraints, a 4B parameter model running on bare metal is surprisingly capable. In testing, NightRun successfully generated poetry, explained UEFI concepts, and solved logic puzzles, including accurately calculating train arrival times. When compared to running the same model via Lemonade on a standard OS, the response quality was remarkably similar, though Lemonade's answers were slightly longer.

However, the lack of an operating system introduces specific formatting limitations. Because NightRun relies on a pure terminal interface drawn directly to the framebuffer, it cannot render Markdown tables or formatting. Additionally, the custom bitmap font lacks full Unicode support, meaning accented characters in foreign languages will not display correctly.

### The Return of the Single-Purpose Appliance

NightRun represents a fascinating regression in computing architecture that actually pushes AI deployment forward. By stripping away the operating system, it mirrors the early days of microcomputers that booted directly into a BASIC prompt. This isn't just a nostalgic novelty; it is a blueprint for creating highly secure, single-purpose AI hardware.

For enterprise environments or privacy-conscious users, the absence of a network stack and kernel eliminates nearly the entire attack surface associated with modern computing. If this bare-metal approach matures, we could see a future where deploying an air-gapped, secure AI assistant is as simple as plugging in a flash drive, completely bypassing the vulnerabilities of traditional operating systems.

## Sources

- [lobste.rs](https://www.xda-developers.com/raspberry-pi-boots-straight-into-local-llm/)
