Debian Bug report logs - #410209
conv=noerror poorly documented

version graph

Package: coreutils; Maintainer for coreutils is Michael Stone <[email protected]>; Source for coreutils is src:coreutils (PTS, buildd, popcon).

Reported by: Jiri Baum <[email protected]>

Date: Thu, 8 Feb 2007 16:03:09 UTC

Severity: minor

Found in version coreutils/5.97-5

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Michael Stone <[email protected]>:
Bug#410209; Package coreutils. (full text, mbox, link).


Acknowledgement sent to Jiri Baum <[email protected]>:
New Bug report received and forwarded. Copy sent to Michael Stone <[email protected]>. (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Jiri Baum <[email protected]>
To: [email protected]
Subject: conv=noerror poorly documented
Date: Fri, 9 Feb 2007 02:42:11 +1100
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



Information forwarded to [email protected]:
Bug#410209; Package coreutils. (full text, mbox, link).


Acknowledgement sent to Michael Stone <[email protected]>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Michael Stone <[email protected]>
To: [email protected]
Subject: Re: conv=noerror poorly documented
Date: Sat, 26 Jan 2008 20:15:41 -0500
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




Information forwarded to [email protected], Michael Stone <[email protected]>:
Bug#410209; Package coreutils. (full text, mbox, link).


Acknowledgement sent to Lucas Nussbaum <[email protected]>:
Extra info received and forwarded to list. Copy sent to Michael Stone <[email protected]>. (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Lucas Nussbaum <[email protected]>
To: [email protected], Jim Meyering <[email protected]>
Subject: Re: Bug#410209: conv=noerror poorly documented
Date: Fri, 23 May 2008 23:43:48 +0200
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 |




Severity set to `minor' from `normal' Request was from Lucas Nussbaum <[email protected]> to [email protected]. (Fri, 23 May 2008 22:04:36 GMT) (full text, mbox, link).


Information forwarded to [email protected], Michael Stone <[email protected]>:
Bug#410209; Package coreutils. (full text, mbox, link).


Acknowledgement sent to Jim Meyering <[email protected]>:
Extra info received and forwarded to list. Copy sent to Michael Stone <[email protected]>. (full text, mbox, link).


Message #22 received at [email protected] (full text, mbox, reply):

From: Jim Meyering <[email protected]>
To: Lucas Nussbaum <[email protected]>, [email protected]
Cc: [email protected]
Subject: Re: Bug#410209: conv=noerror poorly documented
Date: Sat, 24 May 2008 08:25:09 +0200
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>?




Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 09:17:39 2025; Machine Name: bembo

Debian Bug tracking system

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/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.