From f1c166a2833950a7c44fe19b01780723635a7aa3 Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 29 Apr 2024 14:34:52 +0100 Subject: [PATCH] export-image: run du with -x to avoid crossing filesystem boundaries Fixes #537 --- export-image/prerun.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/export-image/prerun.sh b/export-image/prerun.sh index d9778d1db3..6a5309a0a4 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -10,7 +10,7 @@ rm -rf "${ROOTFS_DIR}" mkdir -p "${ROOTFS_DIR}" BOOT_SIZE="$((512 * 1024 * 1024))" -ROOT_SIZE=$(du --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) +ROOT_SIZE=$(du -x --apparent-size -s "${EXPORT_ROOTFS_DIR}" --exclude var/cache/apt/archives --exclude boot/firmware --block-size=1 | cut -f 1) # All partition sizes and starts will be aligned to this size ALIGN="$((4 * 1024 * 1024))"