From owner-freebsd-usb@FreeBSD.ORG Fri Nov 19 18:39:06 2010 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 2C330106564A for ; Fri, 19 Nov 2010 18:39:06 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id DE1518FC0A for ; Fri, 19 Nov 2010 18:39:05 +0000 (UTC) Received: from [109.41.253.170] (helo=tiny.Sisis.de.) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PJVrT-0007Mw-Ac; Fri, 19 Nov 2010 19:39:04 +0100 Received: from tiny.Sisis.de. (localhost [127.0.0.1]) by tiny.Sisis.de. (8.14.3/8.14.3) with ESMTP id oAJId2IK001230; Fri, 19 Nov 2010 19:39:02 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by tiny.Sisis.de. (8.14.3/8.14.3/Submit) id oAJId1Os001229; Fri, 19 Nov 2010 19:39:01 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: tiny.Sisis.de.: guru set sender to guru@unixarea.de using -f Date: Fri, 19 Nov 2010 19:39:00 +0100 From: Matthias Apitz To: Hans Petter Selasky Message-ID: <20101119183900.GA1221@tiny.Sisis.de> References: <20101119143337.GA3023@current.Sisis.de> <201011191821.09308.hselasky@c2i.net> <20101119173519.GA3933@current.Sisis.de> <201011191916.53655.hselasky@c2i.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <201011191916.53655.hselasky@c2i.net> X-Operating-System: FreeBSD 8.0-CURRENT (i386) User-Agent: Mutt/1.5.19 (2009-01-05) X-Con-Id: 51246 X-Originating-IP: 109.41.253.170 Cc: freebsd-usb@freebsd.org Subject: Re: copying /dev/da0 with dd(1) to file: output differs X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2010 18:39:06 -0000 El día Friday, November 19, 2010 a las 07:16:53PM +0100, Hans Petter Selasky escribió: > > I was thinking in a tool just reading each file block by block, > > comparing the blocks and noting the 1st diff with block offset number. > > (some 10 lines of C code :-)) > > > > matthias > > Maybe you need to write a small C-program to do that. > > You can use bcmp() to compare two buffers. Will do that tomorrow. Just an idea: The USB key in question was new and I only created the file system on it the usual way (fdisk, bsdlabel, newfs). Then I restored the dump on it (which took 26 hours for 3.1 GByte dump file). The USB key boots fine, btw. Could it be that unwritten/unformatted blocks are read as random data from that USB key? Should I overwrite the full USB key from /dev/zero? matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.unixarea.de/