diff --git a/init/init.sh b/init/init.sh index 1ad9088..cd99091 100755 --- a/init/init.sh +++ b/init/init.sh @@ -14,6 +14,12 @@ # kubesolo.cloudinit= Path to cloud-init config # kubesolo.flags= Extra flags for KubeSolo binary +# Redirect ALL output to /dev/console for visibility during early boot. +# This is temporary v0.3 ARM64 debugging — revert when generic ARM64 is stable. +exec >/dev/console 2>&1 +echo "[KSOLO-DBG] init.sh PID=$$ shell=$(readlink -f /proc/$$/exe 2>/dev/null || echo unknown)" +echo "[KSOLO-DBG] uname=$(uname -a 2>&1)" + set -e # --- Switch root: escape initramfs so runc pivot_root works --- @@ -22,11 +28,22 @@ set -e # set up container root filesystems. To fix this, we copy the rootfs to a # tmpfs and switch_root to it. The sentinel file prevents infinite loops. if [ ! -f /etc/.switched_root ]; then + echo "[KSOLO-DBG] entering switch_root block" + echo "[KSOLO-DBG] mount proc..." mount -t proc proc /proc 2>/dev/null || true + echo "[KSOLO-DBG] mount proc exit=$?" + echo "[KSOLO-DBG] mount sysfs..." mount -t sysfs sysfs /sys 2>/dev/null || true + echo "[KSOLO-DBG] mount sysfs exit=$?" + echo "[KSOLO-DBG] mount devtmpfs..." mount -t devtmpfs devtmpfs /dev 2>/dev/null || true + echo "[KSOLO-DBG] mount devtmpfs exit=$?" + echo "[KSOLO-DBG] mkdir /mnt/newroot..." mkdir -p /mnt/newroot + echo "[KSOLO-DBG] mkdir /mnt/newroot exit=$?" + echo "[KSOLO-DBG] mount tmpfs /mnt/newroot..." mount -t tmpfs -o size=400M,mode=755 tmpfs /mnt/newroot + echo "[KSOLO-DBG] mount tmpfs exit=$?" echo "[init] Copying rootfs to tmpfs..." >&2 # Copy each top-level directory explicitly (BusyBox cp -ax on rootfs is broken) for d in bin sbin usr lib lib64 etc var opt; do