Subject: Re: gunzip|dd causes dd to fail w/ new gzip
To: tech-userlevel@NetBSD.org, Hubert Feyrer <email@example.com>
From: Ben Collver <firstname.lastname@example.org>
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 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.''
``... the following command should work:
gzip -dc image.gz | dd of=/dev/rwd0d obs=16k''
With the above command, the default is ibs=512. Do pipes guarantee that
at least 512 bytes will be read?