From owner-freebsd-current Sun Nov 21 1:52: 5 1999 Delivered-To: freebsd-current@freebsd.org Received: from dingo.cdrom.com (castles519.castles.com [208.214.165.83]) by hub.freebsd.org (Postfix) with ESMTP id 8CF1D14DFD for ; Sun, 21 Nov 1999 01:52:00 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.3/8.8.8) with ESMTP id BAA00370; Sun, 21 Nov 1999 01:42:39 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199911210942.BAA00370@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Donn Miller Cc: Alfred Perlstein , current@FreeBSD.ORG Subject: Re: dd and gzip'd files In-reply-to: Your message of "Sat, 20 Nov 1999 02:26:41 EST." <38364D31.F1AD476E@cvzoom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 21 Nov 1999 01:42:38 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > I recently tried using dd to transfer a binary image to floppy. > > > It was the Linux root disk image, color.gz. Basically, dd works > > > ok with non-gzipped files, but with files in gzip format, it > > > chokes: > > > > > > root@lc186 floppies# dd if=color.gz of=/dev/rfd0 > > > dd: /dev/rfd0: Invalid argument > > > 2453+1 records in > > > 2453+0 records out > > > 1255936 bytes transferred in 42.665771 secs (29437 bytes/sec) > > > > > > Notice the line that says: > > > > > > 2453+1 records in > > > ^^^^^^ > > > > > > For some reason, it is offsetting to 1 before writing to disk. No, that's not what it means. You are ignoring the error message on the preceeding line. "2453+1" means that it has read 2453 complete records and one extra byte. The 'fd' driver has (correctly) refused to write the single trailing byte. > It appears to have worked. I guess the output block size of 16k > is key for floppies, then. The conv=osync does the padding. No, the block size requirement for floppies is 512 bytes, as it is for almost any device. conv=osync is correct if you insist on using the raw device. Note that the optimal block size for 1.44MB floppies is 9k (one track). -- \\ Give a man a fish, and you feed him for a day. \\ Mike Smith \\ Tell him he should learn how to fish himself, \\ msmith@freebsd.org \\ and he'll hate you for a lifetime. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message