From 20660716b0273d82ccf456bf990451276472593a Mon Sep 17 00:00:00 2001 From: George Engelbrecht Date: Thu, 16 Sep 2021 17:41:01 -0600 Subject: strip_boot_from_image: use sfill instead of fstrim fstrim relies on the underlying device supporting it and on our instances we're on lvm devices. Since we're fstrim'ing a mounted loopback the ability to call fstrim is inherited by the parent device. Something has changed in the kernel (see bug) that stopped us from making the trim call on the loopback partition. sfill with these options should accomplish the same thing (single write with all zeros) as well as cleaning up inode space. BRANCH=main BUG=b:200038130 TEST=signer full tests with this commit. Signed-off-by: engeg Change-Id: I8c71adfd59c11b5142aa367fb20222fc4b03a2ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3167191 Tested-by: George Engelbrecht Auto-Submit: George Engelbrecht Reviewed-by: Jason Clinton Reviewed-by: Jared Loucks Reviewed-by: Greg Edelston Commit-Queue: George Engelbrecht Commit-Queue: Greg Edelston --- scripts/image_signing/strip_boot_from_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/image_signing/strip_boot_from_image.sh b/scripts/image_signing/strip_boot_from_image.sh index 2971b087..0f363902 100755 --- a/scripts/image_signing/strip_boot_from_image.sh +++ b/scripts/image_signing/strip_boot_from_image.sh @@ -27,7 +27,7 @@ zero_free_space() { local rootfs="$1" info "Zeroing freespace in ${rootfs}" - sudo fstrim -v "${rootfs}" + sudo sfill -llz "${rootfs}" } -- cgit v1.2.1