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:
9
emmc-provisioning/scripts/disable-rescue-cmdline-on-lxc.sh
Executable file
9
emmc-provisioning/scripts/disable-rescue-cmdline-on-lxc.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# Restore serial-specific cmdline to symlink to root (disable rescue).
|
||||
# Usage: ./disable-rescue-cmdline-on-lxc.sh [LXC_HOST] [SERIAL]
|
||||
|
||||
set -e
|
||||
LXC="${1:-root@10.20.30.153}"
|
||||
SERIAL="${2:-0d1ddbda}"
|
||||
|
||||
ssh "$LXC" "rm -f /srv/tftpboot/$SERIAL/cmdline.txt && ln -s ../cmdline.txt /srv/tftpboot/$SERIAL/cmdline.txt && echo 'Rescue disabled; cmdline restored to symlink.'"
|
||||
26
emmc-provisioning/scripts/enable-rescue-cmdline-on-lxc.sh
Executable file
26
emmc-provisioning/scripts/enable-rescue-cmdline-on-lxc.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env bash
|
||||
# On the LXC TFTP server, replace the serial-specific cmdline with one that has
|
||||
# provisioning_rescue=1 so the device drops to a shell and can run /rescue-eeprom.sh.
|
||||
# Usage: ./enable-rescue-cmdline-on-lxc.sh [LXC_HOST] [SERIAL]
|
||||
# Example: ./enable-rescue-cmdline-on-lxc.sh root@10.20.30.153 0d1ddbda
|
||||
|
||||
set -e
|
||||
LXC="${1:-root@10.20.30.153}"
|
||||
SERIAL="${2:-0d1ddbda}"
|
||||
|
||||
echo "Enabling rescue cmdline for serial $SERIAL on $LXC ..."
|
||||
ssh "$LXC" "bash -s" "$SERIAL" << 'REMOTE'
|
||||
SERIAL="$1"
|
||||
CD="/srv/tftpboot/$SERIAL"
|
||||
ROOT_CMDLINE="/srv/tftpboot/cmdline.txt"
|
||||
if [[ ! -d "$CD" ]]; then
|
||||
echo "Error: $CD does not exist. Create the serial dir first (see NETWORK-BOOT-TROUBLESHOOTING.md)."
|
||||
exit 1
|
||||
fi
|
||||
rm -f "$CD/cmdline.txt"
|
||||
# One line: root cmdline + space + provisioning_rescue=1
|
||||
( cat "$ROOT_CMDLINE" 2>/dev/null | tr -d '\n'; echo -n ' provisioning_rescue=1' ) > "$CD/cmdline.txt"
|
||||
echo "Rescue cmdline written to $CD/cmdline.txt"
|
||||
echo "Reboot the device; from the rescue shell run: /rescue-eeprom.sh"
|
||||
REMOTE
|
||||
echo "Done. Reboot the reTerminal; then run /rescue-eeprom.sh in the rescue shell."
|
||||
Reference in New Issue
Block a user