<message>Add a new step-by-step guide for deploying the CM4 eMMC provisioning service on a new Proxmox instance, enhancing clarity for users. Update existing documentation to reflect changes in network configuration options, including the introduction of LAN subnet settings for DHCP and TFTP. Modify cloud-init scripts to ensure proper management of DNS settings and improve the handling of network interfaces. Additionally, enhance the toggle script for network boot to dynamically read the LAN gateway from configuration files, streamlining the setup process and improving user experience.
reTerminal DM4 eMMC provisioning
Automatically deploy or backup the CM4 eMMC when the reTerminal is connected in USB boot mode or when it boots over the network. Uses cloud-init for first-boot configuration.
Revisions are tracked project-wide; see repo root README.md and scripts/bump-revision.sh.
Project layout
emmc-provisioning/
├── README.md ← You are here
├── docs/ Documentation
│ ├── DEPLOY-NEW-PROXMOX.md Step-by-step: deploy to a new Proxmox instance
│ ├── EMMC-PROVISIONING-GUIDE.md Full setup and usage
│ ├── NETWORK-BOOT-LXC.md Network boot (PXE/dnsmasq) and LXC
│ ├── PROXMOX-LXC-DEPLOYMENT.md Proxmox LXC + host setup (reference)
│ └── PORTAL_STYLING_GUIDE.md Dashboard UI styling reference
├── host/ Scripts that run on the provisioning host (Proxmox host)
│ ├── flash-emmc-on-connect.sh rpiboot + wait for Backup/Deploy choice, then dd
│ ├── cm4-flash-trigger.sh Called by udev; starts the flash job
│ ├── build-cloudinit-image.sh Build golden image with cloud-init
│ └── run-shrink-on-host.sh PiShrink (optional)
├── scripts/ Deployment and one-off scripts
│ ├── deploy-to-proxmox.sh Deploy to Proxmox host + LXC
│ ├── sync-portal-files-to-lxc.sh Sync cloud-init/first-boot assets to file server (LXC)
│ ├── deploy-dashboard-to-lxc.sh Deploy dashboard to LXC
│ └── ... (other deploy/monitor scripts)
├── dashboard/ Flask web UI (runs in LXC or standalone)
│ ├── app.py
│ └── README.md
├── cloud-init/ First-boot and file-server assets
│ ├── first-boot.sh Main first-boot script (two-phase provisioning)
│ ├── first-boot.conf Active config (not committed with secrets)
│ ├── first-boot.conf.example Reference config
│ ├── user-data-remote-gnss.example Example cloud-init user-data
│ └── fileserver/ Assets served by the portal file server
│ ├── README.md Layout reference
│ ├── steps/ Step scripts (01–13) sourced by first-boot.sh
│ ├── chromium-kiosk-no-select/ Chromium extension (disable text selection)
│ ├── start-chromium.sh Chromium kiosk launcher
│ ├── five-tap-close-chromium.py 5-tap overlay (Wayland layer-shell)
│ └── ... Desktop files, config, theme, splash
├── lxc/ LXC config snippets (dnsmasq, nftables)
└── network-client/ For network-booted devices
├── provisioning-client.sh Register + poll, then Deploy or Backup
└── README.md
Quick start
- Read docs/EMMC-PROVISIONING-GUIDE.md for setup and usage.
- Deploy to a new Proxmox: Follow docs/DEPLOY-NEW-PROXMOX.md for clear step-by-step instructions.
- Proxmox reference: scripts/deploy-to-proxmox.sh and docs/PROXMOX-LXC-DEPLOYMENT.md for options, layout, and troubleshooting.
- Manual host: Copy scripts from
host/to the host and install the udev rule (see the guide). - Put golden.img in
/var/lib/cm4-provisioning/(or your configured path). When a device is detected (USB or network), the dashboard asks Backup or Deploy.