nexboot README

README проекта с github.com/waterlemon0108/nexboot. Одним файлом markdown: README.md.

NexBoot: diskless boot server for Windows and Linux

Boot a whole internet cafe, LAN center or computer lab from one master image. PXE + iSCSI + ZFS in a single Go binary, with a web console and an optional HA cluster.

English · 简体中文

Star

License Go Platform CI

NexBoot demo: from the web console to a client booting into Windows

Online demo

Open the demo · Username: demo · Password: demo

Explore menus, searches and detail views with simulated business data. Buttons for modifying data remain visible, but their actions are disabled. The demo runs independently of the real storage and diskless boot services.

Login logs contain real visitor IP addresses, login times and client information, and are visible to all demo visitors. Do not enter personal or production passwords.

Why NexBoot

Keeping 50 or 500 PCs on the same Windows build is a chore. Every game patch, driver update or bad install means walking from seat to seat.

With NexBoot the PCs have no system disk of their own. They boot over the network, and each one gets its own writable copy of a master image. You update the image once. Every PC picks it up on the next reboot, and a reboot always brings a PC back to a clean state.

Without NexBoot With NexBoot
Patch every PC by hand Patch one image, reboot the room
A broken PC needs a reinstall A reboot restores it
Disks fail, PCs go down No local system disk to fail
No easy way back after a bad update Apply an earlier restore point in one click

Quick start

On an Ubuntu 22.04 / 24.04 server with a spare disk for the ZFS pool:

sudo apt install ./ndiskless_<version>_amd64.deb
sudo ndiskless-configure --bootstrap-password '<admin password>'

Then open http://<server-ip>:8080, sign in as admin and follow the setup wizard:

  1. Pick the network card that faces the clients.
  2. Create a storage pool on the spare disk.
  3. Import a Windows or Ubuntu image (.vmdk, .vhdx, .qcow2, .raw or an exported .zfs stream).
  4. Create a group (IP range + image) and register the clients by MAC address.
  5. Set the clients to boot from the network. Done.

No internet at the site? Use the offline bundle: sudo ./install.sh from nexboot-offline-ubuntu24.04-amd64.tar.gz. See Install for all options.

How it works

 client PC                 NexBoot server (one Go binary)
 ─────────                 ──────────────────────────────────────────────
 PXE ROM ──DHCP/TFTP────▶  dnsmasq (managed)  ──▶ iPXE
 iPXE ────HTTP /boot────▶  boot script for this MAC (which image, which disk)
 iPXE ────iSCSI─────────▶  LIO target ──▶ ZFS clone of the restore point
 Windows / Linux boots     ▲
 from the network disk     └─ image ─▶ config ─▶ restore point ─▶ per-PC clone

Features

Area What you get
Delivery One static binary with the web UI built in; .deb package and an offline bundle for sites without internet
Client OS Windows (BIOS and UEFI) and Ubuntu, including Ubuntu Server's default LVM layout
Image import .vmdk / .vhd(x) / .qcow2 / .raw / .zfs streams; Windows and Linux images are adapted for iSCSI boot automatically
Image management Configs, restore points, one-click apply, save as new image, export, overwrite base image, health check
Groups and clients Fixed IP per MAC via DHCP, data disks per group, client status matrix, cross-subnet groups via DHCP relay
Hardware models Discovers the NIC. When the image has no configuration for a Windows NIC, the server writes that PC's boot configuration from the image's already-installed NIC and a matching driver (built into the image, or an uploaded x64 pack), so there is no per-model adaptation step. The models page shows each model's actual boot result (OK, boot failed, waiting for first boot) and offers a full WinPE adaptation only after a failed boot
Storage ZFS pools with mirrors, cache and spare disks, managed from the UI; scheduled backups to a second pool
High availability keepalived VIP, catalogue replication with resume, epoch fencing, planned switchover; grow from one node to a cluster online
Operations Alarms (nodes, pools, replication, boot failures, image health), audit log, task center

Screenshots

Overview
Overview: nodes, clients, groups and storage at a glance
Images
Images: system disks, data disks, and create from ISO
Restore points
Restore points: apply, save as image, export
Groups
Groups: IP range, system disk and data disks
Clients
Client matrix
Storage pools
Storage pools per node
Create cluster
Create a cluster with just a VIP
Add node
Add nodes found on the network
Windows client
Windows 11 client booted over the network
Ubuntu client
Ubuntu 24.04 client booted over the network
Hardware models
Hardware models: OK, boot failed, or waiting for first boot
Driver packs
Driver packs: signed x64 NIC drivers, enabled or disabled

More screenshots are in the Chinese README.

Requirements

Each server

Item Requirement
OS Ubuntu 22.04 / 24.04 (other systemd + ZFS distributions should work)
Disks At least one disk besides the system disk, for the ZFS pool
Memory 8 GB minimum, 32 GB or more recommended (enough ZFS ARC for your hot images)
Network Same layer-2 segment as the clients; cluster nodes share it too (VRRP runs there)
IP address Every server needs a static IP, not DHCP
Packages dnsmasq, dnsmasq-utils, qemu-utils, targetcli-fb, zfsutils-linux, keepalived, curl, libhivex-bin, libwin-hivex-perl (pulled in by the .deb, bundled in the offline package)

Network

Client images

Create an image from an ISO: the ISO wizard supports Windows 10/11 and Server 2016+, Ubuntu 24.04, and Anaconda-based CentOS / RHEL / Rocky Linux / AlmaLinux 7/8/9 full DVDs (x86_64, UEFI). Linux installation uses packages on the ISO and exposes the ISO as a read-only iSCSI installation medium; boot/netinstall media missing required offline packages are rejected with a specific reason. RHEL-family installs use Kickstart and dracut/iBFT, with separate preparation and Anaconda logs. The CentOS 7 DVD is covered by media checks and automated regression tests; actual installation, reboot, and another client's diskless boot still require hardware acceptance. This does not add automatic adaptation of arbitrary imported RHEL disk images. See ISO acceptance steps.

OS Status Before you capture the image
Windows Supported Set the network card to obtain an IP automatically. Windows 11 24H2 / 25H2 builds 26100.7705 / 26200.7705 or later are recommended (KB5074105 fixes a possible iSCSI boot failure). Earlier or unknown revisions show an advisory and can still be installed; compatibility requires an actual diskless boot test
Ubuntu Supported sudo apt install open-iscsi. Plain partitions and linear LVM volumes both work
CentOS / RHEL / Rocky / AlmaLinux Full-DVD ISO installation implemented; hardware acceptance pending Automatic adaptation of imported disk images is not extended; see the Chinese README for manual dracut setup

Don't set a static IP inside the image. Every PC boots the same image, so a fixed address would be claimed by all of them at once. NexBoot gives each MAC its own address over DHCP. Ubuntu images are switched to DHCP automatically on import.

Turn off automatic updates, automatic restarts, sleep and hibernation in Windows images. Every boot starts from a clean copy, so each PC downloads the same updates again, restarts on its own and can end up powered off halfway through, because the iSCSI system disk is already disconnected during the restart. Install updates on a super machine and save them as a restore point instead.

Install

Every server runs the same install and starts as a standalone node. Whether it joins a cluster is decided later in the web UI.

# .deb package (recommended)
sudo apt install ./ndiskless_<version>_amd64.deb
sudo ndiskless-configure --bootstrap-password '<admin password>'

# offline bundle, for sites without internet
mkdir nexboot && tar -xzf nexboot-offline-ubuntu24.04-amd64.tar.gz -C nexboot && cd nexboot
sudo ./install.sh
sudo ndiskless-configure --bootstrap-password '<admin password>'

# from source (see Development for build prerequisites)
make build-static
sudo bash scripts/install-go.sh --install-deps --binary ./bin/ndiskless-linux-amd64 \
  --bootstrap-password '<admin password>'

Check it is up:

systemctl is-active ndiskless            # active
curl -s http://127.0.0.1:8080/healthz    # {"status":"ok"}

Upgrading a .deb does not restart the service. Run sudo systemctl restart ndiskless; in a cluster, upgrade the standbys first and the active node last.

High availability

Single node Two nodes Three or more
Who accepts changes This node Active node Active node
Who serves client disks This node Both, balanced (or pinned per group) All nodes, balanced (or pinned per group)
One node fails All clients down Only its clients reboot once Only its clients reboot once

Failover is automatic and takes seconds to minutes, not zero. Clients running on a failed node blue-screen and reboot once, then come back on another node. The VIP moves in about a second.

To build a cluster:

  1. On the first node: System → Parameters → High availability → Create cluster, and enter a free VIP.
  2. Servers → Cluster nodes → Add node. NexBoot scans the client network for installed but unconfigured servers.
  3. Create a storage pool on every node.
  4. Wait for the first replication to finish (shown under High availability).

A single node that already has images and clients can be turned into a cluster in place. Nothing is reinstalled or migrated.

Project structure

cmd/ndiskless/   entry point, wiring, HA role selection
internal/
  api/           HTTP routes, auth, /boot
  boot/          iPXE scripts and embedded TFTP assets
  control/       images, configs, restore points, groups, clients, drivers, alarms, backup, cluster ops
  dhcp/          dnsmasq config generation
  ha/            role state machine, epoch fencing, replication endpoints
  storage/       ZFS, iSCSI (LIO), image import and adaptation
  store/         SQLite repositories and goose migrations
web/             React web console, embedded into the binary
deploy/          systemd unit, keepalived template, health scripts
packaging/       .deb and offline bundle builders
tools/e2e/       end-to-end test matrices run against real servers
docs/images/     screenshots, demo GIF and project artwork

Development

Use the Go version specified in go.mod and Node.js 22 (at least 22.22.2) or 24 (at least 24.15.0), with npm. Build and verification targets install frontend dependencies with npm ci, build web/dist and embed it before compiling Go. Generated files are not committed.

make dev          # dev binary at bin/ndiskless-dev
make verify       # gofmt, vet, go test, static build
make verify-web   # vitest, vite build
make verify-all   # all checks; shares the frontend build
make deb          # .deb package (on Linux)
make offline      # offline bundle (on the target Ubuntu version)

End-to-end matrices need real ZFS, LIO and keepalived, so they are not part of CI. See tools/e2e/README.md.

Contributing

Issues and pull requests are welcome. Read CONTRIBUTING.md first.

License

AGPL-3.0. You can use, study and modify NexBoot for free, including running it in your own internet cafe or school. If you distribute a modified version, or offer a modified version to others over a network, you must publish its full source under the AGPL.

The NexBoot name and logo are not covered by the license. Bundled third-party components (iPXE, wimboot) keep their own licenses; see THIRD_PARTY_NOTICES.md.


Built by waterlemon0108. If NexBoot saves you a walk around the room, a star helps others find it.

Star

nexboot (waterlemon0108/nexboot)

Ищем в базе…

Что это такое?NexBoot — это платформа для загрузки компьютеров без локального диска, которую разворачивают на собственном сервере. Она написана на Go и объединяет сетевую загрузку PXE, хранилище iSCSI и ZFS, поэтому интернет-кафе, компьютерный клуб или компьютерный класс может загружать множество ПК из одного главного образа, которым управляют через веб-консоль.
Это устанавливается на центральный сервер или каждому ПК нужна своя установка?Это серверная платформа: вы устанавливаете один бинарный файл Go на сервер с Linux, а клиентские ПК загружаются полностью по сети без локальной установки ОС. При каждой загрузке каждый ПК получает записываемый клон главного образа ZFS.
Как это запустить?Установите платформу на сервер с Ubuntu 22.04/24.04 и свободным диском под пул ZFS, затем откройте веб-интерфейс, войдите как admin и пройдите мастер настройки: выберите сетевой интерфейс, обращённый к клиентам, создайте пул хранения, импортируйте образ Windows/Ubuntu (.vmdk/.vhdx/.qcow2/.raw/.zfs), создайте группу и зарегистрируйте клиентов по MAC-адресам.
Что нужно серверу перед началом работы?Выделенный сервер с Linux (Ubuntu) и статическим IP, минимум один свободный диск помимо системного для пула ZFS, от 8 ГБ оперативной памяти и пакеты dnsmasq, qemu-utils, targetcli-fb, zfsutils-linux и keepalived. Они входят в .deb-пакет и офлайн-установщик.
Работает ли это с любой клиентской ОС?Официально поддерживаются только Windows (BIOS и UEFI; Windows 11 24H2/25H2 требует сборку 26100.7705+ из-за известного исправления загрузки по iSCSI) и Ubuntu. CentOS/RHEL/Rocky не тестировались. Образы клиентов также должны использовать DHCP, потому что статический IP, вшитый в образ, одновременно займут все ПК.
Нужен кластер из нескольких серверов или хватит одного?Один узел работает полностью самостоятельно. Позже его можно превратить в многоузловой кластер прямо из интерфейса, без переустановки. При отказе виртуальный IP переходит на другой узел примерно за секунду, а затронутые клиенты однократно перезагружаются на другом узле.
В чём подвох с лицензией AGPL?Использовать, изучать и изменять программу можно бесплатно, в том числе в коммерческих целях, например в своём интернет-кафе или школе. Но если вы распространяете изменённую версию или запускаете её как сетевую службу для других, вы обязаны опубликовать полный исходный код изменений по лицензии AGPL. Название и логотип NexBoot, а также встроенные сторонние компоненты действуют на своих условиях.
Как починить сломанный ПК без переустановки?Каждый ПК загружается из клона ZFS с копированием при записи, созданного из точки восстановления. Поэтому обычная перезагрузка отбрасывает все локальные изменения и возвращает машину в чистое сохранённое состояние. Также можно откатиться к более ранней точке восстановления одним кликом.
Можно ли развернуть NexBoot на объекте без доступа в интернет?Да, есть офлайн-архив (например, nexboot-offline-ubuntu24.04-amd64.tar.gz), в котором собраны все необходимые зависимости. Поэтому можно запустить sudo ./install.sh без доступа в интернет.
Что такое функция «супер-машина»?Она позволяет загрузить один клиентский ПК в редактируемом режиме, установить обновления или драйверы внутри него, выключить его и сохранить результат как новую точку восстановления. Затем эту точку смогут применить другие ПК с той же конфигурацией.
Проходит ли трафик клиентов через центральный сервер?Нет. DHCP, загрузочные файлы и трафик iSCSI для каждого ПК обслуживаются напрямую узлом, на котором он размещён. Ничего не маршрутизируется через центральный контроллер, даже при работе в кластере.
Какие есть похожие проекты?ceph, thanos, netboot.xyz, consul, automq, node_exporter, nezha, nodelume
Автор
waterlemon0108
Размер
6.8 MB
Звёзды
110
Возраст
1 мес
Коммиты · 90 дней