Problem with ntfs and media sector size 1024

Guido van Rooij guido at gvr.org
Sun Dec 6 20:15:47 UTC 2009


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


More information about the freebsd-fs mailing list