Hi,
[CC:-ing ntfs-dev ML since this is really a developer issue.]
On Thu, 2004-11-04 at 07:10, Ken MacFerrin wrote:
> I have a PC setup to dual boot Gentoo Linux & WinXP Pro SP2 and continue
> to have a segmentation fault when trying to mount one of my ntfs
> partitions under linux. I've tried this with several 2.6.8 and 2.6.9
> kernels (currently 2.6.9-gentoo-r1) and have had the same issue each
> time. I've also tried this with the ntfs kernel driver complied both
> monolithic and as a module (current).
>
> The issue is that I can mount one of my ntfs partitions without issue
> but when trying to mount the XP OS partition (/dev/hda1) I receive a
> "Segmentation Fault" error and the mount command exits. If I try to
> mount it a second time then the command line just hangs.
>
> The odd part is that Windows boots just fine off this partition and I've
> defragmented the drive and run chkdsk (with the 'fix errors' option)
> multiple times under Win with no issues.
>
> I've provided some snipped dmesg output below while trying to mount at
> boot with the following options in fstab:
> /dev/hda1 /mnt/winxp ntfs auto,ro,owner,user,nosuid,nodev,umask=0227 0 0
>
> Since the partition works fine natively and I can cleanly mount my other
> ntfs partition via linux I can't tell if there's genuinely an issue with
> the partition or if this is a buggy error from the driver. Any suggestions?
Yes! Thank you for the excellent bug report and error output. It is
nice to get such a good bug report!
There are two bugs. One that causes it to crash. (That one is just
stupid error handling.) And one that causes it to think there is
something corrupt and aborting the read even though the corruption is in
mft record 0x12 while it is actually reading 0x10. This is really
silly. Anyway, if you apply the attached patch, it will no longer
crash. Could you do it and verify that it now does not crash? Thanks a
lot!
To apply the patch just: cd /usr/src/linux [or wherever the kernel is]
and: patch -p1 < /path/to/ntfs-attr-fix1.diff
After you have done that could you run chkdsk /f on that partition from
windows and then try again mounting? Assuming it still fails it would
be really useful to have a copy of the beginning of your $MFT system
file so I can replicate the problem here. For this could you install
the ntfsprogs package (if not available in gentoo, get it from
http://linux-ntfs.sourceforge.net/downloads.html) and run:
ntfscat -fi 0 /dev/hda1 > /tmp/mymft.dat
(You can then compress the file with bzip2 -9 /tmpmymft.dat)
If you could send me that or put it somewhere for me to download it
would be great. If the file is too big for that than copy out the
beginning like so:
dd if=/tmp/mymft.dat of=/tmp/mymftbegin.dat bs=1024 count=32
(Again can compress with bzip2 -9 /tmp/mymftbegin.dat)
And this will be a very small file which if you could send me it would
be fantastic. I will then create a patch to fix this problem as well
and send it to you.
Thanks a lot for your help!
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/
|