On Mon, 27 Nov 2006, Frans Pop wrote:
> On Monday 27 November 2006 21:44, you wrote:
> > ntfsresize
> > ntfsfix             ***1
> > ntfsfix             ***2
> > boot vista  <- will fail
> > ntfsfix             ***3
> > boot vista  <- will work
> >
> > Note ***1 is what you did before, it will mark the volume dirty thus
> > when you do ***2 it will fail to mount and do EXACTLY the same thing as
> > ***3.
> 
> Nope. After resize:
> # ntfsfix /dev/sda1
> Mounting volume... OK
> Processing of $MFT and $MFTMirr completed successfully.
> Setting required flags on partition... OK
> Going to empty the journal ($Logfile)... OK
> NTFS volume version is 3.1.
> NTFS partition /dev/sda1 was processed successfully.
> # ntfsfix /dev/sda1
> Mounting volume... OK
> Processing of $MFT and $MFTMirr completed successfully.
> Setting required flags on partition... OK
> Going to empty the journal ($Logfile)... OK
> NTFS volume version is 3.1.
> NTFS partition /dev/sda1 was processed successfully.
> 
> (Note: I just see that I failed to include one line last time: 
> the "Processing of..." one.)
> 
> So ***2 is not the same as ***3; it remains the same as ***1.
> Again, I'm not saying you are wrong, but you've got to appreciate that I'm 
> seeing this from a user's perspective. I see different output from 
> ntfsfix, and so logically assume that if it's not showing some steps, 
> it's not executing those steps.

Now I am confused why you see this like that.  Would you mind checking out 
ntfsprogs from CVS?  The needed commands/repositories are in detail to be 
found at (includes build instructions):

http://wiki.linux-ntfs.org/doku.php?id=howto:cvs

Could you run the ntfsfix from there and see if that makes a difference?

If it still gives you the same output as above then simply edit 
ntfsprogs/ntfsprogs/ntfsfix.c at line 538 where it says:

        /* Attempt a full mount first. */
        ntfs_log_info("Mounting volume... ");
        vol = ntfs_mount(opt.volume, 0);

and change that last line to say:

        //vol = ntfs_mount(opt.volume, 0);
        vol = NULL;

This will force the second code path to be taken which is what happens 
when the mount fails which is what you get after vista crashes...

> Are you really saying that the following lines are just empty and 
> meaningless output?
> Attempting to correct errors...
> Processing $FMT and $MFTMirr...
> Reading $MFT... OK
> Reading $MFTMirr... OK
> Comparing $MFTMirr to $MFT... OK

Yes they are.  (-:  If they actually did any changes to the volume, for 
each change you would get a line like this:

Correcting differences in $MFT record %d...
or
Correcting differences in $MFTMirr record %d...

Where %d would be the mft/mftmirror record number being corrected.

As you do not see any such lines it means that the verification is a 
success and no changes are made.

> At the very least the mount check gives a different result. And if I 
> understand you and the results above correctly, the volume being "dirty" 
> and "unmountable" may be two different things. How does ntfsfix check if 
> the volume is mountable or not?

It tries to mount it!  And if it fails, it does it by hand...

> > The explanation why vista is fixed the second time round I assume is
> > along the lines of "first time round vista makes some modifications to
> > itself then crashes", and second time round "the modifications from
> > last boot together with the set chkdsk flag cause vista to work this
> > time round".
> 
> I'm happy to accept this. So, let's concentrate on trying to find out what 
> those changes are...
> 
> I don't know what Vista does exactly to make it unmountable or what other 
> things it may do at the same time but ntfsfix definitely does do 
> *something* after Vista has made the volume unmountable that results in 
> Vista being happy again.
> After all, if I try booting Vista a second time after it has failed the 
> first time, it will just fail in exactly the same way as the first time.
> 
> I'll also be happy to provide additional images or whatever if needed, but 
> IMO this still is the most concrete pointer we've gotten so far. As a 
> user I _do_ need your expertise and guidance for the next step. I can 
> only tell you what I'm seeing.

Try the ntfsfix from CVS and then edit the ntfsfix.c source and recompile 
so it forces it to fail the mount and do it by hand.  Then run the 
modified ntfsfix after ntfsresize and boot Vista.  I am betting that Vista 
will still fail to boot even though ntfsfix did exactly the same thing as 
it does after Vista fails to boot.

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, http://www.linux-ntfs.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to