From owner-freebsd-fs@FreeBSD.ORG Sun Dec 6 20:15:47 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA151106566C for ; Sun, 6 Dec 2009 20:15:47 +0000 (UTC) (envelope-from guido@gvr.org) Received: from gvr.gvr.org (gvr-gw.gvr.org [82.95.154.195]) by mx1.freebsd.org (Postfix) with ESMTP id 9AC168FC18 for ; Sun, 6 Dec 2009 20:15:47 +0000 (UTC) Received: by gvr.gvr.org (Postfix, from userid 657) id D578442D816; Sun, 6 Dec 2009 21:15:46 +0100 (CET) Date: Sun, 6 Dec 2009 21:15:46 +0100 From: Guido van Rooij To: freebsd-fs@freebsd.org Message-ID: <20091206201546.GA30476@gvr.gvr.org> References: <20091206125547.GA24918@gvr.gvr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091206125547.GA24918@gvr.gvr.org> Subject: Re: Problem with ntfs and media sector size 1024 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Dec 2009 20:15:47 -0000 On Sun, Dec 06, 2009 at 01:55:47PM +0100, Guido van Rooij wrote: > > When I try to mount the ntfs, I get: > ntfs_mountfs(): bps: 1024, spc: 4, media: f8, mftrecsz: 246 (1 sects) > ntfs_mountfs(): mftcn: 0xc0000|0x3a380d0 > ntfs_mountfs(): case-sens., uid: 0, gid: 0, mode: 755 > ntfs_vgetex: ino: 0, attr: 0x80:, lkf: 0x2, f: 0x0 > ntfs_ntlookup: looking for ntnode 0 > ntfs_ntget: get ntnode 0: 0xc7bdc500, usecount: 0 > ntfs_ntlookup: ntnode 0: 0xc7bdc500, usecount: 1 > ntfs_loadntnode: loading ino: 0 > ntfs_loadntnode: read system node > ntfs_loadntnode: bn: 3145728 > ntfs_procfixups: magic doesn't match: 421f128f != 454c4946 > ntfs_loadntnode: BAD MFT RECORD 0 > ntfs_vget: CAN'T LOAD ATTRIBUTES FOR INO: 0 > ntfs_ntput: rele ntnode 0: 0xc7bdc500, usecount: 1 > ntfs_ntput: deallocating ntnode: 0 > > Note: bn: 3145728 is an additional debug printf I inserted just before the > first bread in ntfs_loadntnode(). > > When I dd this block (using a bs=1k), I get a block with the correct ntfs magic: > > dd if=/dev/da1s1 bs=1k skip=3145728 count=1 of=/tmp/1 > 1+0 records in > 1+0 records out > 1024 bytes transferred in 0.000735 secs (1393113 bytes/sec) > > hexdump /tmp/1 | head -2 > 0000000 4946 454c 0030 0003 0ef9 0200 0000 0000 > 0000010 0001 0001 0038 0001 0198 0000 0400 0000 > > However: > > dd if=/dev/da1s1 bs=1k skip=1572864 count=1 of=/tmp/2 > 1+0 records in > 1+0 records out > 1024 bytes transferred in 0.000732 secs (1399012 bytes/sec) > > hexdump /tmp/2 | head -2 > 0000000 128f 421f 0b99 36e7 5e54 4062 cb2c ddd0 > 0000010 bdba 6c0e d690 aa5a d22e 2a30 cea2 b08e > > Note that this is exactly the wrong magic reported in the line: > ntfs_procfixups: magic doesn't match: 421f128f != 454c4946 > > Note also the 1572864 * 2 = 3145728 > Some additional info: When I force reading the correct blocknr (I just assign bn *= 2), ntfs_procfixups() complains: ntfs_procfixups: bad fixups number: 3 for 1024 bytes block -Guido