Date: Sat, 20 Nov 1999 02:26:41 -0500 From: Donn Miller <dmmiller@cvzoom.net> To: Alfred Perlstein <bright@wintelcom.net> Cc: current@FreeBSD.ORG Subject: Re: dd and gzip'd files Message-ID: <38364D31.F1AD476E@cvzoom.net> References: <Pine.BSF.4.05.9911192341290.12797-100000@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote: > > On Sat, 20 Nov 1999, Donn Miller wrote: > > > I recently tried using dd to transfer a binary image to floppy. > > It was the Linux root disk image, color.gz. Basically, dd works > > ok with non-gzipped files, but with files in gzip format, it > > chokes: > > > > root@lc186 floppies# dd if=color.gz of=/dev/rfd0 > > dd: /dev/rfd0: Invalid argument > > 2453+1 records in > > 2453+0 records out > > 1255936 bytes transferred in 42.665771 secs (29437 bytes/sec) > > > > Notice the line that says: > > > > 2453+1 records in > > ^^^^^^ > > > > For some reason, it is offsetting to 1 before writing to disk. > > Rawrite.exe does this correctly. I tried with net.i, and it gave > > me no problems: > > > > root@lc186 floppies# dd if=net.i of=/dev/rfd0 > > 2156+0 records in > > 2156+0 records out > > 1103872 bytes transferred in 39.172698 secs (28180 bytes/sec) > > > > I tried skip=0, but that didn't work. Apparently, dd has some > > limitations with what kinds of files you can transfer to > > floppies. I downloaded the files in binary format, so there's no > > problems there. > > no, you must write in block sized chunks when writing to raw > devices or it'll get mad at you, try figuring a way > to use a blocksize of 16k and padding it to a 16k boundry. > > if that doesn't work, then please tell us what you tried. Thanks. Here is what I tried: root@lc186 floppies# dd obs=16k conv=osync if=color.gz of=/dev/rfd0 2453+1 records in 77+0 records out 1261568 bytes transferred in 50.994527 secs (24739 bytes/sec) It appears to have worked. I guess the output block size of 16k is key for floppies, then. The conv=osync does the padding. -- - Donn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38364D31.F1AD476E>