Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: robust USB mount with retry loop (5 attempts, 1s delay)

USB devices may not appear immediately on boot. Retry mounting
up to 5 times with 1s delay between attempts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+14 -9
+14 -9
fedac/native/initramfs/init
··· 52 52 export HOME="/tmp" 53 53 54 54 # ── Mount USB EFI partition (for config.json, wifi_creds.json, logs) ── 55 - # WiFi auto-connect is handled by the C binary's wifi module, not init. 56 - for p in /dev/sda1 /dev/sdb1 /dev/nvme0n1p1; do 57 - if [ -b "$p" ]; then 58 - mkdir -p /mnt 59 - mount -t vfat "$p" /mnt 2>/dev/null && { 60 - if [ -f /mnt/EFI/BOOT/BOOTX64.EFI ]; then break; fi 61 - umount /mnt 2>/dev/null 62 - } 63 - fi 55 + # Retry a few times — USB devices may take a moment to appear 56 + USB_MOUNTED=0 57 + for attempt in 1 2 3 4 5; do 58 + for p in /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/nvme0n1p1; do 59 + if [ -b "$p" ]; then 60 + mkdir -p /mnt 61 + mount -t vfat "$p" /mnt 2>/dev/null && { 62 + if [ -f /mnt/EFI/BOOT/BOOTX64.EFI ]; then USB_MOUNTED=1; break 2; fi 63 + umount /mnt 2>/dev/null 64 + } 65 + fi 66 + done 67 + [ "$USB_MOUNTED" = "1" ] && break 68 + sleep 1 64 69 done 65 70 66 71 # Run ac-native in a loop — if it crashes, restart; if clean exit, shutdown