From: Michael Prokop Date: Fri, 8 Jun 2012 13:31:01 +0000 (+0200) Subject: GRMLBASE/45-grub-images: calculate real disk size of bootx64.efi X-Git-Tag: v0.19.4~3 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=06021ae3a93b2e3a21058fdbf4d69d646dd83312 GRMLBASE/45-grub-images: calculate real disk size of bootx64.efi Fixes case where size of file is mis-detected due to transparent compression, resulting in "disk full" error when running 45-grub-images Thanks: Andras Korn for the patch --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/45-grub-images b/etc/grml/fai/config/scripts/GRMLBASE/45-grub-images index d6fdb5c..6024989 100755 --- a/etc/grml/fai/config/scripts/GRMLBASE/45-grub-images +++ b/etc/grml/fai/config/scripts/GRMLBASE/45-grub-images @@ -71,7 +71,7 @@ if ifclass AMD64 ; then exit 1 fi - SIZE=$(du -sk "${target}/${BOOTX64}" | awk -F" " '{print $1'}) + SIZE=$(du --apparent-size -sk "${target}/${BOOTX64}" | awk -F" " '{print $1'}) SIZE=$(((($SIZE / 32 )+2)*32)) dd if=/dev/zero of="${target}/${EFI_IMG}" bs=1k count="$SIZE" 2>/dev/null