From owner-freebsd-bugs@FreeBSD.ORG Fri Jan 23 03:30:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 793FF106566C for ; Fri, 23 Jan 2009 03:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4D3498FC0C for ; Fri, 23 Jan 2009 03:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n0N3U2QI006491 for ; Fri, 23 Jan 2009 03:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n0N3U2E6006486; Fri, 23 Jan 2009 03:30:02 GMT (envelope-from gnats) Date: Fri, 23 Jan 2009 03:30:02 GMT Message-Id: <200901230330.n0N3U2E6006486@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Giorgos Keramidas Cc: Subject: Re: bin/130857: /bin/dd if=/dev/acd0 returned error "invalid parameter" X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Giorgos Keramidas List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2009 03:30:03 -0000 The following reply was made to PR bin/130857; it has been noted by GNATS. From: Giorgos Keramidas To: Tri Brotoharsono Cc: bug-followup@freebsd.org Subject: Re: bin/130857: /bin/dd if=/dev/acd0 returned error "invalid parameter" Date: Fri, 23 Jan 2009 05:24:45 +0200 On Fri, 23 Jan 2009 09:45:46 +0700, Tri Brotoharsono wrote: > Giorgos Keramidas wrote: > : So, if you use the patched dd version with open(in.name, O_RDONLY, 0) > : then the bs=2048 is not needed, and dd works with your CD-ROM disk? > > No > > : That would be a bit odd. > : > : Note: Sorry replying with this address, but my original address denied > : by mx1.freebsd.org due misconfiguration at my mail server. > : > : That's fine, don't worry about it. As long as the subject is there and > : we can correlate the message with the original bug, all is well. > : > : * If you still think we should patch dd with the change, let me know. > : > : * If you think it's ok to leave it unmodified, and use bs=2048 should > : be recommended, we can document this in the manpage and close the > : problem report. > : > : How should we proceed with this? > > leave unmodified, recommend bs=2048 in the manpage Does the following patch to the EXAMPLES section look ok? I can commit it to the manpage when we shape it to look acceptable. After the patch is applied, the example looks like this: EXAMPLES Check that a disk drive contains no bad blocks: [...] To create an image of a Mode-1 CD-ROM, which is commonly used for data CD-ROM disks, use a block size of 2048 bytes: dd if=/dev/acd0 of=filename.iso bs=2048 SEE ALSO [...] Here's the patch and the proposed commit log... ----- 20090123T031913+0000-dd-cdrom.diff patch starts here ----- Add an example of using bs=2048 to duplicate data CD-ROMs. This should be a bit useful for users who look at the manpage and then try to copy data CD-ROM disks using dd. A lot of us know that bs=2048 is required, but it still manages to cause a bit of grief to those who haven't heard about it. PR: bin/130857 Submitted by: Tri Brotoharsono < mail at tribrotoharsono.net > diff -r ce5936bddb83 -r dfbd83a06fcf bin/dd/dd.1 --- a/bin/dd/dd.1 Fri Jan 23 01:34:58 2009 +0200 +++ b/bin/dd/dd.1 Fri Jan 23 05:18:11 2009 +0200 @@ -392,6 +392,11 @@ Check for (even) parity errors on a file: .Pp .Dl "dd if=file conv=pareven | cmp -x - file" +.Pp +To create an image of a Mode-1 CD-ROM, which is a commonly used format +for data CD-ROM disks, use a block size of 2048 bytes: +.Pp +.Dl "dd if=/dev/acd0 of=filename.iso bs=2048" .Sh SEE ALSO .Xr cp 1 , .Xr mt 1 , ----- 20090123T031913+0000-dd-cdrom.diff patch ends here -----