From owner-freebsd-current Sun Nov 21 9:58:40 1999 Delivered-To: freebsd-current@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id B431314DB9 for ; Sun, 21 Nov 1999 09:58:33 -0800 (PST) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id JAA35922; Sun, 21 Nov 1999 09:57:57 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <199911211757.JAA35922@gndrsh.dnsmgr.net> Subject: Re: dd and gzip'd files In-Reply-To: <199911210942.BAA00370@dingo.cdrom.com> from Mike Smith at "Nov 21, 1999 01:42:38 am" To: mike@smith.net.au (Mike Smith) Date: Sun, 21 Nov 1999 09:57:57 -0800 (PST) Cc: dmmiller@cvzoom.net (Donn Miller), bright@wintelcom.net (Alfred Perlstein), current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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. Small technical correction, the value after the + is not bytes, but number of partial blocks: When finished, dd displays the number of complete and partial input and output blocks, truncated input records and odd-length byte-swapping blocks to the standard error output. A partial input block is one where less than the input block size was read. A partial output block is one where less than the output block size was written. -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message