Overview
Enable automatic discovery of Raspberry Pi devices without pre-registration. Currently, Pi network boot fails if the serial number directory doesn't exist in TFTP.
Problem
- Pi powers on, requests
/<serial>/start4.elf via TFTP
- If
/<serial>/ directory doesn't exist, TFTP returns "file not found"
- Pi fails to boot - no discovery possible
Proposed Solution
Option A: TFTP Fallback Directory (Recommended)
Create a pi-discovery/ directory that serves as fallback for unknown serials:
/srv/tftp/
├── pi-nodes/
│ ├── d83add36/ # Known Pi (registered)
│ └── a1b2c3d4/ # Known Pi
└── pi-discovery/ # Fallback for unknown
├── bootcode.bin
├── start4.elf
├── start.elf
├── fixup*.dat
├── *.dtb
├── kernel8.img
├── initramfs.img
├── config.txt # Generic discovery config
└── cmdline.txt # pureboot.mode=discover
Modify TFTP server to:
- Check if
/<serial>/ exists
- If not, serve files from
pi-discovery/
- Pi boots, runs deploy environment, calls API to register
Option B: Dynamic Directory Creation
TFTP server creates directory on-the-fly when unknown serial requests files:
- Unknown serial requests
/<serial>/start4.elf
- TFTP server creates
/<serial>/ with default files
- Serves the requested file
- Pi boots and registers via API
Implementation Tasks
Discovery Boot Flow
Pi powers on
↓
DHCP provides TFTP IP (192.168.168.66)
↓
Pi requests /<serial>/start4.elf
↓
TFTP checks: /<serial>/ exists?
├── Yes → Serve from node directory
└── No → Serve from pi-discovery/
↓
Pi boots kernel + initramfs
↓
Deploy env runs, detects pureboot.mode=discover
↓
Calls POST /api/v1/nodes/register-pi
↓
PureBoot creates /<serial>/ directory
↓
Node appears in UI as "discovered"
Test Hardware Available
- Raspberry Pi 3B+
- Raspberry Pi 4
Related
Acceptance Criteria
Overview
Enable automatic discovery of Raspberry Pi devices without pre-registration. Currently, Pi network boot fails if the serial number directory doesn't exist in TFTP.
Problem
/<serial>/start4.elfvia TFTP/<serial>/directory doesn't exist, TFTP returns "file not found"Proposed Solution
Option A: TFTP Fallback Directory (Recommended)
Create a
pi-discovery/directory that serves as fallback for unknown serials:Modify TFTP server to:
/<serial>/existspi-discovery/Option B: Dynamic Directory Creation
TFTP server creates directory on-the-fly when unknown serial requests files:
/<serial>/start4.elf/<serial>/with default filesImplementation Tasks
pi-discovery/directory structureconfig.txtfor discovery modecmdline.txtwithpureboot.mode=discoverDiscovery Boot Flow
Test Hardware Available
Related
Acceptance Criteria