[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to copy the binary image of a dos floppy ?



on Sat, May 05, 2001 at 02:14:20PM -0500, Nathan E Norman (nnorman@micromuse.com) wrote:
> On Fri, May 04, 2001 at 10:17:13PM -0700, Karsten M. Self wrote:
> > on Fri, May 04, 2001 at 04:30:50PM -0400, Jonathan D. Proulx (jon@ai.mit.edu) wrote:
> > > On Fri, May 04, 2001 at 02:48:35PM -0500, B Thomas wrote:
> > > :Hi,
> > > :I have dos and debian installed on my system . I would like to backup the ddevice drivers that came on dos floppies with my system. I know I need to use the dd command to make a binary image of the floppy. But I do not know the exact parameter to pass . Could you please show me a sample command line .
> > > :sincerely
> > > :b.thomas
> > > 
> > > 
> > > root@localhost$ dd if=/dev/fd0 of=floppy.img bs=72k
> > 
> > I'm not sure where you're getting your bs= value.
> > 
> > I tend to use:
> > 
> >     $ dd if=/dev/fd0 of=floppy.img bs=1024 count=1440
> > 
> > ...though you may not want to set a count if you aren't sure of the size
> > of the image.  Though most 3.5" floppies are 1.4MB, other sizes are
> > possible.
> 
> I was always taught to use a block size of 512 when {read,writ}ing to
> floppies, and double the kByte size of the floppy to obtain the count
> e.g.
> 
>   dd if=/dev/fd0 of=floppy.img bs=512 count=2880
> 
> I'll poke around to see if I can discover _why_ I've been doing it
> this way for the last 5 years ... I believe the physical block size of
> a floppy is 512 however.

The only place I've found blocksize _really_ matters is in writing to
tape.  I've had endless problems in my former existence as a data
analyst, usually working with data sourced from mainframes, in which
blocking factors were critical.  Also more recently when I'd managed to
change the blocking factor while producing some backups to SCSI tape
(DDS), but hadn't changed them for the following read/restore attempt.

I don't quite understand the whole thing myself.  For dd, AFAICT,
blocking really only matters to the extent that you want to scale your
'count=' value to the blocksize, and the speed and buffering resulting. 

512 was the traditional blocksize on a wide range of systems:  DOS, VMS,
and many old Unix systems (OpenBSD still reports 'df' output in 512K
blocks).

It probably doesn't matter that you're reading in 512 byte increments so
long as whatever you're doing is in increments of 512 bytes, hence 1024,
2048, 4096, 8192, etc.  The block factoring of a floppy is handled by
the filesystem itself -- when you're imaging the disk you're bypassing
this entirely.  Sweet spot is probably determined by kernel disk
buffering, head speed, and memory.

Any hardware boffins here?

-- 
Karsten M. Self <kmself@ix.netcom.com>    http://kmself.home.netcom.com/
 What part of "Gestalt" don't you understand?       There is no K5 cabal
  http://gestalt-system.sourceforge.net/         http://www.kuro5hin.org

Attachment: pgpg7gjicbeTs.pgp
Description: PGP signature


Reply to: