Package: coreutils
Version: 5.97-5
The documentation for the dd(1) 'noerror' keyword does not make it clear what
happens to the blocks in which read errors occurred (or that this depends on
the apparently-unrelated 'sync' keyword).
I would suggest that the current text "continue after read errors" (in the man
and info pages) be expanded to indicate that without 'sync', input blocks
with errors are dropped; with 'sync', whatever was read of input blocks with
errors is padded to ibs and written.
(If I understand the source correctly...)
For example, to read data off a failing disk, one should use:
dd if=/dev/hdXY of=/filename.disk conv=noerror,sync
Omitting the 'sync' is a problem, since all offsets will be off from the first
read error onwards and the size of the disk image will not match the size
recorded in the superblock. This will lead to the following message from fsck
when attempting to repair the disk image:
The filesystem size (according to the superblock) is X blocks
The physical size of the device is Y blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>?
Jiri
--
Jiri Baum <[email protected]> http://www.baum.com.au/~jiri
Seems reasonable to add something to the dd info page. Maybe something
like "(Note that this is often used with 'sync'; without the 'sync'
option the output will be smaller than the input by the number of
unreadable blocks.)" at the end of the 'noerror' description?
Mike Stone
Hi Jim,
Debian bug #410209 sounds like a sensible request for a doc (info page)
improvement.
Could you take a quick look?
Lucas
On 09/02/07 at 02:42 +1100, Jiri Baum wrote:
> Package: coreutils
> Version: 5.97-5
>
> The documentation for the dd(1) 'noerror' keyword does not make it clear what
> happens to the blocks in which read errors occurred (or that this depends on
> the apparently-unrelated 'sync' keyword).
>
> I would suggest that the current text "continue after read errors" (in the man
> and info pages) be expanded to indicate that without 'sync', input blocks
> with errors are dropped; with 'sync', whatever was read of input blocks with
> errors is padded to ibs and written.
>
> (If I understand the source correctly...)
>
> For example, to read data off a failing disk, one should use:
> dd if=/dev/hdXY of=/filename.disk conv=noerror,sync
>
> Omitting the 'sync' is a problem, since all offsets will be off from the first
> read error onwards and the size of the disk image will not match the size
> recorded in the superblock. This will lead to the following message from fsck
> when attempting to repair the disk image:
>
> The filesystem size (according to the superblock) is X blocks
> The physical size of the device is Y blocks
> Either the superblock or the partition table is likely to be corrupt!
> Abort<y>?
>
>
> Jiri
> --
> Jiri Baum <[email protected]> http://www.baum.com.au/~jiri
--
| Lucas Nussbaum
| [email protected]http://www.lucas-nussbaum.net/ |
| jabber: [email protected] GPG: 1024D/023B3F4F |
Lucas Nussbaum <[email protected]> wrote:
> Debian bug #410209 sounds like a sensible request for a doc (info page)
> improvement.
>
> Could you take a quick look?
Hi Lucas,
Thanks for the heads-up.
And thanks to Jiri for the report!
Yes, that will make a fine improvement.
Jiri, do you feel like preparing a patch?
It'd be good to include the note about, and sample output from fsck, too.
If so, instructions for contributing are here:
http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob;f=HACKING;hb=HEAD
If not, maybe Lucas will.
You may want to consider using ddrescue next time:
http://www.gnu.org/software/ddrescue/ddrescue.html
> On 09/02/07 at 02:42 +1100, Jiri Baum wrote:
>> Package: coreutils
>> Version: 5.97-5
>>
>> The documentation for the dd(1) 'noerror' keyword does not make it clear what
>> happens to the blocks in which read errors occurred (or that this depends on
>> the apparently-unrelated 'sync' keyword).
>>
>> I would suggest that the current text "continue after read errors" (in the man
>> and info pages) be expanded to indicate that without 'sync', input blocks
>> with errors are dropped; with 'sync', whatever was read of input blocks with
>> errors is padded to ibs and written.
>>
>> (If I understand the source correctly...)
>>
>> For example, to read data off a failing disk, one should use:
>> dd if=/dev/hdXY of=/filename.disk conv=noerror,sync
>>
>> Omitting the 'sync' is a problem, since all offsets will be off from the first
>> read error onwards and the size of the disk image will not match the size
>> recorded in the superblock. This will lead to the following message from fsck
>> when attempting to repair the disk image:
>>
>> The filesystem size (according to the superblock) is X blocks
>> The physical size of the device is Y blocks
>> Either the superblock or the partition table is likely to be corrupt!
>> Abort<y>?
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.