diff --git a/crates/openshell-driver-vm/scripts/openshell-vm-sandbox-init.sh b/crates/openshell-driver-vm/scripts/openshell-vm-sandbox-init.sh index 2166e06177..08c8d69c77 100644 --- a/crates/openshell-driver-vm/scripts/openshell-vm-sandbox-init.sh +++ b/crates/openshell-driver-vm/scripts/openshell-vm-sandbox-init.sh @@ -243,6 +243,10 @@ setup_overlay_root() { if [ "${OPENSHELL_VM_INIT_MODE:-sandbox}" = "image-prep" ]; then prepare_guest_image_rootfs sync + if ! umount /overlay; then + ts "FATAL: failed to unmount /overlay cleanly after image-prep; refusing to produce a dirty image-cache disk" + exit 1 + fi ts "image-prep complete" exit 0 fi @@ -252,7 +256,7 @@ setup_overlay_root() { local lower_root="/lower" if [ -b /dev/vdc ]; then - mount -t ext4 -o ro /dev/vdc /image-cache + mount -t ext4 -o ro,noload /dev/vdc /image-cache if [ -d /image-cache/image-rootfs ]; then lower_root="/image-cache/image-rootfs" ts "using prepared image rootfs lowerdir"