Date: Fri, 11 Jan 2002 22:15:28 -0600 From: "Mike Meyer" <mwm-dated-1011240929.065a50@mired.org> To: Jochem Kossen <j.kossen@home.nl> Cc: freebsd-stable@FreeBSD.org Subject: Re: weird dd behaviour Message-ID: <15423.47200.554352.352575@guru.mired.org> In-Reply-To: <20020107163415.GA359@jochem.dyndns.org> References: <20020107163415.GA359@jochem.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Jochem Kossen <j.kossen@home.nl> types: > Hello, > > I was installing MINIX on an old laptop, and for that purpose i needed > to create a set of floppies. > > Here's what happened. Take a look at the last dd sequence. It transfers > 0 bytes. It comes with the weird /dev/fd0: invalid argument message. The > disk inside the drive is fine... > > (lisa)/home/jochem/downloads/minix# dd if=USR.TAZ of=/dev/fd0 bs=1440k > count=1 skip=0 > 1+0 records in > 1+0 records out > 1474560 bytes transferred in 49.090062 secs (30038 bytes/sec) > (lisa)/home/jochem/downloads/minix# dd if=USR.TAZ of=/dev/fd0 bs=1440k > count=1 skip=1 > 1+0 records in > 1+0 records out > 1474560 bytes transferred in 49.288477 secs (29917 bytes/sec) > (lisa)/home/jochem/downloads/minix# dd if=USR.TAZ of=/dev/fd0 bs=1440k > count=1 skip=2 > dd: /dev/fd0: Invalid argument > 0+1 records in > 0+0 records out > 0 bytes transferred in 37.641383 secs (0 bytes/sec) > (lisa)/home/jochem/downloads/minix# The file USR.TAZ presumably is 2+x floppies long, where x is not an even multiple of 512, which the floppy driver now insists upon. You need to use conv=opad to pad the final output block. Doing it with 1440k blocks will result in writing the complete final floppy. You can use any multiple of 512 as a block size, and do the arithmetic for count and skip to make it right the proper segments on each floppy. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15423.47200.554352.352575>