Subject: Re: gunzip|dd causes dd to fail w/ new gzip
To: tech-userlevel@NetBSD.org, Hubert Feyrer <hubert@feyrer.de>
From: Ben Collver <collver1@comcast.net>
List: tech-userlevel
Date: 07/08/2004 14:24:36
On Thu, Jul 08, 2004 at 10:38:06PM +0200, Jukka Salmi wrote:
> I encountered the same problem[1] while writing image file to CF disks.
> The short answer probably is "use obs=n instead of bs=n".


``Just because the writer issues a 16k write does not guarantee that the
  reader will receive all the data in one read call.  Changing gzip may
  improve the probability that it will work, but to be certain, the
  proper arguments to dd should be specified.''

  http://mail-index.netbsd.org/current-users/2004/06/20/0013.html


``... the following command should work:
	gzip -dc image.gz | dd of=/dev/rwd0d obs=16k''

  http://mail-index.netbsd.org/current-users/2004/06/21/0001.html


With the above command, the default is ibs=512.  Do pipes guarantee that
at least 512 bytes will be read?

Ben