delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/13/18:58:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <39C00759.5D713801@veritas.com>
Date: Wed, 13 Sep 2000 16:01:45 -0700
From: Bob McGowan <rmcgowan AT veritas DOT com>
Organization: VERITAS Software
X-Mailer: Mozilla 4.73 [en] (WinNT; U)
X-Accept-Language: en
MIME-Version: 1.0
To: cygwin <cygwin AT sources DOT redhat DOT com>
Subject: Re: dd if=/cygdrive/a of=foo.img doesn't work
References: <000913093111C2 DOT 21827 AT weba8 DOT iname DOT net> <39BFA889 DOT 4ECC07E2 AT veritas DOT com> <39BFDCED DOT 6B3165E9 AT cygnus DOT com>

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:cygwin AT sources DOT redhat DOT com
> Red Hat, Inc.
> mailto:vinschen AT cygnus DOT com
> 
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

-- 
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan AT veritas DOT com

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019