diff --git a/package/harvester-os/files/usr/sbin/harv-install b/package/harvester-os/files/usr/sbin/harv-install index bec8a1417..c085c1f88 100755 --- a/package/harvester-os/files/usr/sbin/harv-install +++ b/package/harvester-os/files/usr/sbin/harv-install @@ -154,6 +154,14 @@ do_mount() mount ${PERSISTENT} ${TARGET}/usr/local } +sparsify_passive_img() +{ + # See https://github.com/harvester/harvester/issues/7518 + echo "Ensuring passive.img is sparse..." + echo " was: $(du -h ${STATEDIR}/cOS/passive.img)" + fallocate --dig-holes ${STATEDIR}/cOS/passive.img + echo " now: $(du -h ${STATEDIR}/cOS/passive.img)" +} preload_rke2_images() { @@ -528,6 +536,7 @@ do_data_disk_format # Preload images do_detect do_mount +sparsify_passive_img get_iso # For PXE Boot save_configs save_wicked_state