Merge pull request #4880 from jethome-iot/fix_create_size

Fix "No space left on device" while rsync root files to image
This commit is contained in:
Vyacheslav 2023-02-27 23:29:49 +03:00 committed by GitHub
commit cc98394aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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