Commit 6c485623920c

Vincent Demeester <vincent@sbr.pm>
2026-08-12 10:31:17
fix(alpine): use mv for boot backups to avoid full disk
Replaced cp with mv so the old .prev is freed before uploading the new image. The 256MB boot partition can't hold two full copies plus the new upload.
1 parent 6275554
Changed files (1)
alpine/deploy.sh
@@ -24,9 +24,10 @@ case "$ACTION" in
         # Mount boot partition (diskless Alpine doesn't mount it by default)
         ssh "root@${HOST}.vpn" "mkdir -p /boot && mount /dev/mmcblk0p1 /boot 2>/dev/null || true"
 
-        # Backup current files (A/B rollback)
-        ssh "root@${HOST}.vpn" "cp /boot/initramfs /boot/initramfs.prev 2>/dev/null || true"
-        ssh "root@${HOST}.vpn" "cp /boot/vmlinuz-rpi /boot/vmlinuz-rpi.prev 2>/dev/null || true"
+        # Backup current files (A/B rollback) — move instead of copy to
+        # free space before uploading the new image
+        ssh "root@${HOST}.vpn" "mv /boot/initramfs /boot/initramfs.prev 2>/dev/null || true"
+        ssh "root@${HOST}.vpn" "mv /boot/vmlinuz-rpi /boot/vmlinuz-rpi.prev 2>/dev/null || true"
 
         # Deploy new files
         rsync -Pv "$IMAGE_DIR/boot/initramfs" "root@${HOST}.vpn:/boot/initramfs"