From owner-freebsd-usb@FreeBSD.ORG Tue Feb 19 16:24:07 2008 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA5D016A417 for ; Tue, 19 Feb 2008 16:24:07 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe14.swip.net [212.247.155.161]) by mx1.freebsd.org (Postfix) with ESMTP id 7CC6613C45B for ; Tue, 19 Feb 2008 16:24:07 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [62.113.133.70] (account mc467741@c2i.net [62.113.133.70] verified) by mailfe14.swip.net (CommuniGate Pro SMTP 5.1.13) with ESMTPA id 74776967; Tue, 19 Feb 2008 17:24:05 +0100 From: Hans Petter Selasky To: "=?utf-8?q?=C5=81ukasz?= Sromek" User-Agent: KMail/1.9.7 References: <32f529bc0802180102m6fa12e32x1903e3a8b98a70b3@mail.gmail.com> <200802181730.17473.hselasky@c2i.net> <32f529bc0802181358n3ac34ec2saa23bc658507ba8f@mail.gmail.com> In-Reply-To: <32f529bc0802181358n3ac34ec2saa23bc658507ba8f@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Date: Tue, 19 Feb 2008 17:25:05 +0100 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <200802191725.06156.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org Subject: Re: Copying to usb flash drive corrupts files X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 16:24:08 -0000 On Monday 18 February 2008, =C5=81ukasz Sromek wrote: > > Maybe your memory stick is corrupted ? > > It works (tested today) under Windows. I have used it with several > linux distros in the past without problems. > > Things got even more weird today... Now copying with sync option > enabled don't help at all :( > > Besides, another strange problem appeared: > I copy some files to memory stick under FreeBSD > Reboot and read them under Windows (they contain errors, of course...) > Then I copy some files under Windows. > Another reboot into windows - I can see files that were copied under > FreeBSD (with errors) and Windows (no errors). > Reboot into FreeBSD. I mount memory stick ang guess what? I see only > files that were copied under FreeBSD :) Files copied during Windows > session disappeared... > > > What is the brand ? > > da0 at umass-sim0 bus 0 target 0 lun 0 > da0: Removable Direct Access SCSI-4 device > da0: 1.000MB/s transfers > da0: 494MB (1012992 512 byte sectors: 64H 32S/T 494C) Hi, Is this some kind of phone ? Have you tried to "fsck_msdosfs" the partition where the FAT filesystem=20 resides ? Maybe you could do like this: dd if=3D/dev/urandom of=3D/tmp/myrandomfile bs=3D65536 count=3D64 Then copy that file to the flash. "umount" and "mount". Then copy the file= =20 back to your disk again. After that you do a: cat /tmp/myrandomfile | hexdump > /tmp/myrandomfile.txt Then you compare the two .txt files using "diff". =2D-HPS