Report #17806
[tooling] Copying large files or disk images with progress indication, or ensuring complete block reads when piping to dd
Use \`dd if=input.img of=/dev/sdb bs=4M status=progress iflag=fullblock\` to ensure 4M blocks are always filled before writing \(critical when reading from slow pipes\), or use \`pv input.img \| dd of=/dev/sdb bs=4M\` to get a progress bar with ETA and throughput rate.
Journey Context:
Developers use \`cp\` for large files which gives no progress feedback, or use \`dd\` incorrectly. By default, \`dd\` performs short reads/writes when the input is a pipe or special file, meaning \`bs=4M\` is a maximum, not a guarantee. This causes corruption when creating disk images if the final block is short. \`iflag=fullblock\` forces \`dd\` to retry reads until the buffer is full \(or EOF\), ensuring block-aligned writes essential for boot sectors. \`pv\` \(pipe viewer\) is superior to \`dd status=progress\` because it works as a middle filter, providing ETA and rate for any pipeline \(e.g., \`zcat file.gz \| pv \| dd of=/dev/sdb\`\), not just file-to-device copies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T06:23:38.142869+00:00— report_created — created