From owner-freebsd-stable Fri Jan 11 20:15:44 2002 Delivered-To: freebsd-stable@freebsd.org Received: from guru.mired.org (okc-65-31-201-166.mmcable.com [65.31.201.166]) by hub.freebsd.org (Postfix) with SMTP id 7694537B41D for ; Fri, 11 Jan 2002 20:15:36 -0800 (PST) Received: (qmail 37473 invoked by uid 100); 12 Jan 2002 04:15:29 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15423.47200.554352.352575@guru.mired.org> Date: Fri, 11 Jan 2002 22:15:28 -0600 To: Jochem Kossen Cc: freebsd-stable@FreeBSD.org Subject: Re: weird dd behaviour In-Reply-To: <20020107163415.GA359@jochem.dyndns.org> References: <20020107163415.GA359@jochem.dyndns.org> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.43 (Python 2.1.1; freebsd-4.4-STABLE-i386) Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jochem Kossen 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. 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