Date: Thu, 21 Aug 2003 13:42:57 -0500 From: Dan Nelson <dnelson@allantgroup.com> To: Brian Reichert <reichert@numachi.com> Cc: freebsd-hackers@freebsd.org Subject: Re: dd to floppies broken? Message-ID: <20030821184256.GA82969@dan.emsphone.com> In-Reply-To: <20030821183421.GN85538@numachi.com> References: <20030821183421.GN85538@numachi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Aug 21), Brian Reichert said: > % ls -ln memtest86-*/precomp.bin > -rw------- 1 1001 1001 84480 Feb 28 2002 memtest86-2.9/precomp.bin > -rwx--x--x 1 1001 1001 84420 May 21 2002 memtest86-3.0/precomp.bin > > When copying these to a floppy as root (using two different machines, > and several floppes for testing:) > > # dd bs=8192 of=/dev/fd0 if=memtest86-2.9/precomp.bin > 10+1 records in > 10+1 records out > 84480 bytes transferred in 3.775199 secs (22378 bytes/sec) > > # dd bs=8192 of=/dev/fd0 if=memtest86-3.0/precomp.bin > dd: /dev/fd0: Invalid argument > 10+1 records in > 10+0 records out > 81920 bytes transferred in 3.731600 secs (21953 bytes/sec) > > Got any quick clues, or should I just file a PR now? (I don't > even know what to report, really...) You can only write full blocks to raw devices. The first file is 84480/512 = 165 disk blocks on the dot. The second file is 164.8828125 blocks, and that last fragment is why the dd is failing. Try adding conv=osync to your dd line to tell it to pad the last block out. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030821184256.GA82969>
