FAQ SearchLogin
Tuxera Home
View unanswered posts | View active topics It is currently Sat May 15, 2021 05:16



Post new topic Reply to topic  [ 6 posts ] 
debug option not working 
Author Message

Joined: Thu May 03, 2012 12:14
Posts: 4
Post debug option not working
Hi
I am trying to troubleshoot a NTFS partition with a corrupted MFT. I remember being able to use the debug option and getting a very detail sequence of events during the mount process that would help me determine where this partition is damaged. But, it would seem that passing the debug option to ntfs-3g is doing nothing. I tried on Fedora 16 and old Ubuntu 10 using pre-built packages.

Here is my output with and without the debug option. Identical. Am I doing something wrong? My man page lists this as the correct method for getting the debug output.

Quote:
[root@asdtest asd]# ntfs-3g -o ro,debug /dev/sdb1 /mnt/usb/
ntfs_mst_post_read_fixup: magic: 0x44414142 size: 1024 usa_ofs: 21333 usa_count: 21332: Invalid argument
Record 0 has no FILE magic (0x44414142)
Failed to load $MFT: Input/output error
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.


Quote:
[root@asdtest asd]# ntfs-3g -o ro /dev/sdb1 /mnt/usb/
ntfs_mst_post_read_fixup: magic: 0x44414142 size: 1024 usa_ofs: 21333 usa_count: 21332: Invalid argument
Record 0 has no FILE magic (0x44414142)
Failed to load $MFT: Input/output error
Failed to mount '/dev/sdb1': Input/output error
NTFS is either inconsistent, or there is a hardware fault, or it's a
SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows
then reboot into Windows twice. The usage of the /f parameter is very
important! If the device is a SoftRAID/FakeRAID then first activate
it and mount a different device under the /dev/mapper/ directory, (e.g.
/dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation
for more details.


I was expecting something more like this:
Quote:
ntfs_pread(): pos 0, count 512
Beginning bootsector check.
Checking OEMid, NTFS signature.
Checking bytes per sector.
Checking sectors per cluster.
Checking cluster size.
Checking reserved fields are zero.
Checking clusters per mft record.
Checking clusters per index block.
Bootsector check completed successfully.
SectorSize = 0x200
SectorSizeBits = 9
....etc


Thanks for your help.


Thu May 03, 2012 12:24
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: debug option not working
Hi,

Quote:
Here is my output with and without the debug option. Identical. Am I doing something wrong? My man page lists this as the correct method for getting the debug output.
Code:
[root@asdtest asd]# ntfs-3g -o ro,debug /dev/sdb1 /mnt/usb/

This is the correct way of getting debug output when accessing data from a user process, but in your situation, mounting failed and no data could be accessed.
Code:
ntfs_mst_post_read_fixup: magic: 0x44414142 size: 1024 usa_ofs: 21333 usa_count: 21332: Invalid argument
Record 0 has no FILE magic (0x44414142)
Failed to load $MFT: Input/output error

This is a severe error, which should only occur when a sector is partially written, but a usa_count of 21332 is wrong, so there must be another explanation such as bad partition table or bad boot sector, or software bug, or whatever. Did this occur after you acted on the partition table ?

For fixing this kind of error, I would recommend using chkdsk on a Windows box, provided the partition table is correct. Before doing that, it would be useful you got more information about the error, and post the result of :
Code:
ntfsfix -n /dev/sdb1

Please use a recent version of ntfsfix and do not forget the -n option.

Regards

Jean-Pierre


Fri May 04, 2012 10:10
Profile

Joined: Thu May 03, 2012 12:14
Posts: 4
Post Re: debug option not working
Here is the output from NTFS fix (ntfsfix v2012.1.15 (libntfs-3g))

Quote:
$ sudo ./ntfsfix -n /dev/sdb1

Mounting volume... ntfs_mst_post_read_fixup_warn: magic: 0x44414142 size: 1024 usa_ofs: 21333 usa_count: 21332: Invalid argument
Record 0 has no FILE magic (0x44414142)
Failed to load $MFT: Input/output error
FAILED
Attempting to correct errors... ntfs_mst_post_read_fixup_warn: magic: 0x44414142 size: 1024 usa_ofs: 21333 usa_count: 21332: Invalid argument
Record 0 has no FILE magic (0x44414142)
Failed to load $MFT: Input/output error
FAILED
Failed to startup volume: Input/output error
Checking for self-located MFT segment... ntfs_mst_post_read_fixup_warn: magic: 0x44414142 size: 1024 usa_ofs: 21333 usa_count: 21332: Invalid argument
OK
The startup data can be fixed, but no change was requested
Volume is corrupt. You should run chkdsk.
No change made


Chkdsk can't seem to resolve this one:

Quote:
The type of the file system is NTFS.
Corrupt master file table. Windows will attempt to recover
master file table from disk.
Windows cannot recover master file table. CHKDSK aborted.


So it's not looking good for this volume. Thanks for your help.


Sun May 06, 2012 05:36
Profile

Joined: Thu May 03, 2012 12:14
Posts: 4
Post Re: debug option not working
Also forgot to mention that I never used this volume under Linux and nothing special was done to it before the error started occuring. I just plugged it in one morning and Windows showed that the MFT was corrupted for some reason. It had been constantly asking to run chkdsk even though it ran everytime without error and the drive was always 'safely removed' and cacheing was disabled. This had been going on for months. There is nothing majorly important on it, just backup data really, so I'm not overly concerned. More curious as to if/how these problems can be repaired.


Sun May 06, 2012 06:27
Profile
NTFS-3G Lead Developer

Joined: Tue Sep 04, 2007 17:22
Posts: 1286
Post Re: debug option not working
Hi,

Quote:
More curious as to if/how these problems can be repaired.

I have not seen this kind of error before.

To identify the extent of the damage (and possibly repair something), you can make some essential data available to me. First, I need the boot sector, which will tell me where the MFT is located, then I will ask you to make it available.

To get the boot sector, just do
Code:
dd if=/dev/sdb1 of=bootsector bs=512 count=1
gzip bootsector

Then attach bootsector.gz to your reply (attachments must be compressed), or put it on a public server for me to download it.

Note : unless the fix is obvious, I will not be able to make a deep analysis until end May.

Regards

Jean-Pierre


Sun May 06, 2012 08:45
Profile

Joined: Thu May 03, 2012 12:14
Posts: 4
Post Re: debug option not working
I really appreciate the offer, but I wouldn't want to waste your time as there is another copy of all the data on this volume, and the damage most certainly was not done by NTFS-3G. I believe there is a hardware fault in the drive somewhere, or perhaps in the USB interface I am using. So unless analysing this issue may help you improve your software, I'll just leave it at that. When I have some free time I may even try to work it out myself just as a learning experience but I am way to busy at the moment unfortunately.
Thanks again.


Sun May 06, 2012 10:42
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Original forum style by Vjacheslav Trushkin.