Fix "No space left on device" while rsync root files to image

This commit is contained in:
Vyacheslav Bocharov 2023-02-27 22:16:00 +03:00
parent a131413971
commit fad48ac670
No known key found for this signature in database
GPG Key ID: 476858332E6951A5
2 changed files with 2 additions and 2 deletions

View File

@ -103,7 +103,7 @@ function prepare_partitions() {
# stage: calculate rootfs size
declare -g -i rootfs_size
rootfs_size=$(du -sm "${SDCARD}"/ | cut -f1) # MiB
rootfs_size=$(du --apparent-size -sm "${SDCARD}"/ | cut -f1) # MiB
display_alert "Current rootfs size" "$rootfs_size MiB" "info"
call_extension_method "prepare_image_size" "config_prepare_image_size" <<- 'PREPARE_IMAGE_SIZE'

View File

@ -45,7 +45,7 @@ function build_rootfs_and_image() {
# obtain the size, in MiB, of "${SDCARD}" at this point.
declare -i rootfs_size_mib
rootfs_size_mib=$(du -sm "${SDCARD}" | awk '{print $1}')
rootfs_size_mib=$(du --apparent-size -sm "${SDCARD}" | awk '{print $1}')
display_alert "Actual rootfs size" "${rootfs_size_mib}MiB" ""
# warn if rootfs_size_mib is higher than the tmpfs_estimated_size