Subject: Re: dd if=/cygdrive/a of=foo.img doesn't work
From: Bob McGowan <[email-masked]>
To: cygwin <[email-masked]>
Date: Wed, 13 Sep 2000 16:01:45 -0700

Thanks for the info.  I doubt there is any reason to change the buffer
size from the default 60k.  The issue, on UNIX systems I have used in
the past, is that dd would use a 512 byte buffer size by default,
resulting in horrible performance if you forgot to use bs=size.

Nice to know I don't have to worry about it under Cygwin;-)

Bob

Corinna Vinschen wrote:
> 
> Bob McGowan wrote:
> > First, you need access to the Windows physical device, second it needs
> > to be mounted:
> >
> >   mount -b //./a: /dev/fd0
> >
> > then:
> >
> >   dd if=/dev/fd0 of=file
> >
> > I'm not sure if the -b option of mount is required, I use it to be
> > safe.
> 
> It is required. The raw device handler implements only the raw
> read/write access which is explicitely binary. The next layer
> (read(2)/write(2) calls) uses text and binmode as usual, though.
> 
> > I also use -s with mount to make it a system wide mount so other
> > users (if any) will see it also.  And I tend to use the dd option bs=18k
> > which will do track at a time read/write of a 1.44MB floppy (80
> > tracks).  This makes a difference on standard UNIX systems.  I don't
> > know if it impacts performance for Cygwin.
> 
> It won't noticably. The primary performance factor is the
> internally used buffer. Each file descriptor of an raw device has
> an internal buffer associated which is by default 60K. I chose
> that value to have a large common multiplier for typical cpio and
> tar buffering.
> 
> To change the performance the application would need to change
> that internal buffer after opening the file. There's a ioctl()
> call for that. The appropriate header for that ioctl() call is
> /usr/include/cygwin/rdevio.h.
> 
> Corinna
> 
> --
> Corinna Vinschen                  Please, send mails regarding Cygwin to
> Cygwin Developer                        mailto:[email-masked]
> Red Hat, Inc.
> mailto:[email-masked]
> 
> --
> Want to unsubscribe from this list?
> Send a message to [email-masked]

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
[email-masked]

--
Want to unsubscribe from this list?
Send a message to [email-masked]