Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Delivered-To: mailing list cygwin@sources.redhat.com Message-ID: <39BFDCED.6B3165E9@cygnus.com> Date: Wed, 13 Sep 2000 22:00:45 +0200 From: Corinna Vinschen Reply-To: cygwin X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16 i686) X-Accept-Language: de, en MIME-Version: 1.0 To: cygwin list Subject: Re: dd if=/cygdrive/a of=foo.img doesn't work References: <000913093111C2.21827@weba8.iname.net> <39BFA889.4ECC07E2@veritas.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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@sources.redhat.com Red Hat, Inc. mailto:vinschen@cygnus.com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe@sourceware.cygnus.com