Add iflag=fullblock to dd rust-coreutils’ dd implementation tends to perform partial writes, which leads to partial reads and data loss as a result. Strictly speaking, without the fullblock option there is no guarantee that full blocks will be read. Even with GNU dd, partial reads and writes can occur, although they hardly ever happen.
diff --git a/makeself-header.sh b/makeself-header.sh index a07b44b..e9c982d 100755 --- a/makeself-header.sh +++ b/makeself-header.sh
@@ -105,10 +105,10 @@ { blocks=\`expr \$3 / 1024\` bytes=\`expr \$3 % 1024\` - # Test for ibs, obs and conv feature - if dd if=/dev/zero of=/dev/null count=1 ibs=512 obs=512 conv=sync 2> /dev/null; then + # Test for ibs, obs, fullblock and conv feature + if dd if=/dev/zero of=/dev/null count=1 ibs=512 obs=512 iflag=fullblock conv=sync 2> /dev/null; then dd if="\$1" ibs=\$2 skip=1 obs=1024 conv=sync 2> /dev/null | \\ - { test \$blocks -gt 0 && dd ibs=1024 obs=1024 count=\$blocks ; \\ + { test \$blocks -gt 0 && dd ibs=1024 iflag=fullblock obs=1024 count=\$blocks ; \\ test \$bytes -gt 0 && dd ibs=1 obs=1024 count=\$bytes ; } 2> /dev/null else dd if="\$1" bs=\$2 skip=1 2> /dev/null