Add network boot testing and monitoring documentation
Enhance the NETWORK-BOOT-LXC.md documentation with detailed steps for testing network boot functionality, including prerequisites, expected outcomes, and quick testing methods. Introduce a new section on monitoring network boot status on the LXC, outlining commands to check DHCP leases, dnsmasq status, and registered devices. Update the initramfs scripts to support a rescue mode for devices stuck in network-only boot, allowing users to change boot order settings. Include a new rescue script for eMMC management in the build process.
This commit is contained in:
@@ -21,15 +21,24 @@ if ! ip addr show | grep -q 'inet .* scope global'; then
|
||||
udhcpc -f -q -i eth0 -n 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Allow kernel cmdline to override: provisioning_server=http://10.20.50.1:5000
|
||||
# Allow kernel cmdline to override: provisioning_server=... and rescue mode
|
||||
RESCUE=0
|
||||
for arg in $(cat /proc/cmdline); do
|
||||
case "$arg" in
|
||||
provisioning_server=*) export PROVISIONING_SERVER="${arg#*=}"; ;;
|
||||
provisioning_rescue=1) RESCUE=1; ;;
|
||||
esac
|
||||
done
|
||||
PROVISIONING_SERVER="${PROVISIONING_SERVER:-http://10.20.50.1:5000}"
|
||||
export PROVISIONING_SERVER
|
||||
|
||||
if [ "$RESCUE" -eq 1 ]; then
|
||||
echo "=== RESCUE MODE (provisioning_rescue=1) ==="
|
||||
echo "Run /rescue-eeprom.sh to mount eMMC and change boot order (rpi-eeprom-config), then reboot."
|
||||
echo "Or run /bin/sh for a shell."
|
||||
exec /bin/sh -i
|
||||
fi
|
||||
|
||||
echo "Provisioning server: $PROVISIONING_SERVER"
|
||||
echo "Running provisioning client..."
|
||||
exec /bin/sh /provisioning-client.sh
|
||||
|
||||
Reference in New Issue
Block a user