Subject: Re: Tapeboot problem SOLUTION
To: None <eichin@kitten.gen.ma.us>
From: Ian Dall <dall@HFRD.DSTO.GOV.AU>
List: port-sun3
Date: 12/11/1995 16:03:11
"Mark W. Eichin" <eichin@kitten.gen.ma.us> writes:

  >> gunzip < netbsd-rd.gz | dd bs=8k of=$T
  >> due to the pipe, dd will get short reads, which it copies quite

  > I don't think the pipe causes the short reads,

The unix semantics only guarantee that you can read at least one byte
from a pipe unless it is EOF, in which case you read zero bytes. In
practice the bsd socket code transfers data in chunks.

  > The practical fix (since it applies to basically all unix systems) is
  > to use ibs and obs seperately; something like
  >   gunzip < netbsd-rd.gz | dd ibs=512 obs=8k of=$T conv=sync

The ibs is redundant because it is the default. The last block
being shorter than the block size could cause problems on devices
with variable block sizes (exabytes and dat tapes for example) but
otherwise should work in practice.

  > (This has gotten a bit afield from the sun3 port in particular, I'm afraid...)

I'd have said making how to make a boot tape is directly relevant!

Ian