-
Notifications
You must be signed in to change notification settings - Fork 2
ze install
Pre-Alpha. This page describes behavior that may change.
ze install remote is a one-command provisioning server that PXE-boots target machines with a gokrazy image containing Ze.
- The operator runs
ze install remoteon an existing Ze device connected to the provisioning network. - Ze generates a config enabling DHCP (with PXE extensions), TFTP, and an HTTP image server, then forks itself (
ze -) with the config piped to stdin. - A target machine PXE-boots: DHCP assigns an IP and directs it to the TFTP bootloader, which chain-loads the installer kernel and initrd via HTTP.
- The installer writes the gokrazy image to disk and reboots.
- The target boots into Ze in bootstrap mode: discovers all interfaces, enables a DHCP client on each ethernet NIC, and starts SSH for operator access.
ze install remote \
--interface eth0 \
--network 192.168.1.0/24 \
--image /path/to/gokrazy.img \
--ssh-username admin \
--ssh-password changemeThis starts three servers on eth0:
| Protocol | Port | Purpose |
|---|---|---|
| DHCP | 67/udp | IP assignment with PXE options (bootfile, next-server). |
| TFTP | 69/udp | Bootloader delivery (iPXE for BIOS/UEFI), read-only per RFC 1350. |
| HTTP | 80/tcp | Disk image and boot file serving (supports Range requests). |
The server IP is resolved from the interface's first IPv4 address. Use --address to override.
| Flag | Required | Default | Description |
|---|---|---|---|
--interface |
Yes | Network interface to bind all servers. | |
--network |
Yes | Provisioning subnet CIDR (/8 to /30). | |
--image |
Yes | Path to gokrazy disk image file. | |
--ssh-username |
Yes | Admin username for the installed target. | |
--ssh-password |
Yes | Admin password (bcrypt-hashed before embedding). | |
--address |
No | First IPv4 on interface | Server IP override. |
--kernel |
No | Path to installer kernel (auto-staged to TFTP). | |
--initrd |
No | Path to installer initrd (auto-staged to TFTP). |
The DHCP server detects PXE clients via option 60 (PXEClient:) and reads option 93 (client architecture) to select the bootfile. It also serves PXE-related options 43 (vendor-specific), 66 (next-server / TFTP server name), 67 (bootfile name), and 77 (user-class for iPXE detection).
| Architecture | Bootfile |
|---|---|
| BIOS (type 0) | ipxe.pxe |
| UEFI (type 6, 7, 9) | ipxe.efi |
iPXE chainloading is automatic: the DHCP server detects iPXE clients via user-class option 77 and responds with a boot-script-url pointing to a dynamically generated boot.ipxe script that includes ze.server, ze.image, and ze.port kernel command-line parameters. Stock iPXE binaries are bundled in tools/ipxe-binaries/ and auto-staged to the TFTP directory.
The TFTP server implements RFC 2347 option negotiation (OACK), which is required for UEFI PXE boot.
The target PXE-boots an installer kernel plus initrd, not the disk image directly. The installer initrd (tools/installer-initrd/) is a minimal busybox-based Linux image that performs the disk write on the target:
- Parses
ze.server,ze.port, andze.imagefrom the kernel command line. - Downloads the gokrazy disk image over HTTP from the install server.
- Writes it to the first non-removable block device (selected via the sysfs
removableattribute; virtual, optical, floppy, andmtdblockflash devices are skipped). - Mounts partition 4 (ext4,
/perm) and injectsdatabase.zefs(the pre-provisioned SSH credentials) onto it. - Reboots into Ze.
Build it with:
make -C tools/installer-initrdOn a download failure, missing disk, or missing server IP, the init script drops to a shell for debugging instead of rebooting.
When Ze starts with a zefs database but no config file and no template (the state after a freshly-provisioned device boots), it enters bootstrap mode:
- Interface discovery enumerates all OS network interfaces.
- A minimal config is generated: a DHCP client on every ethernet interface, SSH server enabled.
- DHCP clients acquire addresses and SSH becomes reachable.
Non-ethernet interfaces (bridge, veth, dummy, loopback, wireguard, xfrm) are skipped. The SSH credentials come from zefs (written by the installer initrd), not from the generated config. Once you SSH in, configure Ze with ze config edit and commit; the committed config replaces the bootstrap config on the next restart.
- Root privileges (DHCP, TFTP, and HTTP bind to privileged ports).
- Bootloader files in
/var/lib/ze/install/tftp/(iPXE binaries). - Installer kernel and initrd in
/var/lib/ze/install/boot/. - Disk image at the path specified by
--image.
Adapted from main/docs/guide/ze-install.md.
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology