From 31995a330985ee7abad84ecc103aceae1f2bd916 Mon Sep 17 00:00:00 2001 From: Jeffrey Alan Scudder Date: Sun, 29 Mar 2026 00:08:37 -0700 Subject: [PATCH] fix: init debug logging + logo history report update Set PATH at top of init (fixes sleep not found), silence scaling_governor error, add console diagnostics for Mac boot debugging, 30s pause before ac-native to read GPU/USB status. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/native/initramfs/init | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/fedac/native/initramfs/init b/fedac/native/initramfs/init index 63efb6bda4..a23231029f 100755 --- a/fedac/native/initramfs/init +++ b/fedac/native/initramfs/init @@ -82,12 +82,15 @@ mount_usb_partition() { } echo "[init] mounting USB..." > /dev/tty0 2>/dev/null +echo "[init] block devs: $(ls /dev/sd* /dev/nvme* 2>/dev/null | tr '\n' ' ')" > /dev/tty0 2>/dev/null for attempt in 1 2 3 4 5 6 7 8 9 10; do mount_usb_partition config && break mount_usb_partition boot && break [ "$USB_MOUNTED" = "1" ] && break + echo "[init] USB attempt $attempt failed, retrying..." > /dev/tty0 2>/dev/null sleep 1 done +echo "[init] USB_MOUNTED=$USB_MOUNTED (on $(mount | grep /mnt | head -1))" > /dev/tty0 2>/dev/null # Run ac-native in a loop — if it crashes, restart; if clean exit, shutdown export LD_LIBRARY_PATH="/lib64:/usr/lib64:${LD_LIBRARY_PATH:-}" @@ -113,7 +116,14 @@ ls /dev/sd* /dev/nvme* >> $LOG 2>&1 sync echo "[init] pre-launch log written" > /dev/tty0 2>/dev/null echo "[init] GPU: $(ls /dev/dri/ 2>/dev/null || echo NONE)" > /dev/tty0 2>/dev/null -echo "[init] starting ac-native..." > /dev/tty0 2>/dev/null +echo "[init] fb: $(ls /dev/fb* 2>/dev/null || echo NONE)" > /dev/tty0 2>/dev/null +echo "[init] block: $(ls /dev/sd* 2>/dev/null | tr '\n' ' ')" > /dev/tty0 2>/dev/null +echo "[init] USB_MOUNTED=$USB_MOUNTED" > /dev/tty0 2>/dev/null +echo "" > /dev/tty0 2>/dev/null +echo "=== AC NATIVE OS DEBUG ===" > /dev/tty0 2>/dev/null +echo "Kernel booted. Pausing 30s before ac-native." > /dev/tty0 2>/dev/null +echo "Read the lines above then report back." > /dev/tty0 2>/dev/null +sleep 30 # Start Swank server in background (if SBCL image exists) SWANK_PID=0 @@ -127,7 +137,8 @@ CRASH_COUNT=0 while true; do /ac-native /piece.mjs 2>/tmp/ac-native-stderr.log EXIT_CODE=$? - echo "[init] ac-native exited: $EXIT_CODE (crash #$CRASH_COUNT)" > /dev/tty0 2>/dev/null + echo "[init] ac-native exited: code=$EXIT_CODE crash=$CRASH_COUNT" > /dev/tty0 2>/dev/null + echo "[init] stderr: $(tail -5 /tmp/ac-native-stderr.log 2>/dev/null)" > /dev/tty0 2>/dev/null # Save crash info to USB if mounted if [ "$USB_MOUNTED" = "1" ]; then echo "exit=$EXIT_CODE crash=$CRASH_COUNT $(date 2>/dev/null)" >> /mnt/ac-crash.log -- knotmirror 0.0.1