Hi!

Using dd on Ubuntu 16.04.2 LTS (64 bit) I discovered this behavior
that was (for me) unexpected.

There is a bad sector on /dev/sda which on read attempt returns an i/o error.
Suppose it is sector number 50.

So: dd if=/dev/sda bs=512 count=1 skip=50
result: I/O error printed on stderr, exit status code is 1 (non zero,
don't remember the exact value)

But this: dd if=/dev/sda bs=2048 count=1 skip=12
returns exit code 0 and no error. It reads 1024 bytes (up to the
erroring sector)

Is this by design? I would expect an I/O error to be reported (in exit code).

Regards,
David

Reply via email to