rpi: drop to interactive shell on boot failure, add initcall_debug
Instead of returning 1 (which triggers kernel panic via set -e before emergency_shell runs), exec an interactive shell on /dev/console so the user can run dmesg and debug interactively. Add initcall_debug and loglevel=7 to cmdline.txt to show every driver probe during boot. Also dump last 60 lines of dmesg before dropping to shell. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -84,8 +84,20 @@ if [ ! -b "$KUBESOLO_DATA_DEV" ]; then
|
||||
dmesg 2>/dev/null | grep -i -e 'error' -e 'fail' -e 'unable' | while read -r line; do
|
||||
log_err " $line"
|
||||
done
|
||||
log_err "--- Full dmesg (last 60 lines) ---"
|
||||
dmesg 2>/dev/null | tail -60 | while read -r line; do
|
||||
log_err " $line"
|
||||
done
|
||||
log_err "=== End diagnostics ==="
|
||||
return 1
|
||||
log_err ""
|
||||
log_err "Dropping to debug shell in 10 seconds..."
|
||||
log_err "Run 'dmesg' to see full kernel log."
|
||||
log_err "Run 'ls /sys/class/block/' to check block devices."
|
||||
log_err ""
|
||||
sleep 10
|
||||
# Drop to interactive shell instead of returning failure
|
||||
# (returning 1 with set -e causes kernel panic before emergency_shell)
|
||||
exec /bin/sh </dev/console >/dev/console 2>&1
|
||||
fi
|
||||
|
||||
# Mount data partition (format on first boot if unformatted)
|
||||
|
||||
Reference in New Issue
Block a user