From: Bob McGowan on
On 06/30/2010 10:07 AM, peasthope(a)shaw.ca wrote:
> Given
> root(a)dalton:/home/peter# dd if=disk2 of=/dev/fd0 bs=36k
> dd: writing `/dev/fd0': No space left on device
> 41+0 records in
> 40+0 records out
> 1474560 bytes (1.5 MB) copied, 40.9183 s, 36.0 kB/s

^^^^^^^ standard 1.44 Mb floppy disk

> root(a)dalton:/home/peter#
> can anyone explain the remark "No space left" and the difference
> between records in and records out?

There are 80 tracks on a 1.44 Mb floppy, each is 18k, so you told dd to
read 2 tracks at a time, for a total of 40 records.

But you did not tell how many records to write, so dd has to get that
dynamically.

The last track actually written fit exactly in the remaining space and
so did not trigger an "EOF" condition. So 40 records were written
successfully.

The first byte of the 41st record written triggers the EOF condition and
the write fails. The file 'disk2' is therefore larger than a standard
1.44 Mb floppy by at least one full record, since the in is "1+0" more
than the output.

If you added 'count=40' to your dd command, the in/out numbers would
match, but then you wouldn't know that the input was larger than the
output can hold.

>
> Thanks, ... Peter E.

You're welcome ;')

--
Bob McGowan


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4C2D00BB.9030304(a)symantec.com