Ok, Pegasus, it worked just fine. Thanks a lot.
I'm writing this as a small guide to help others who have the same
problem.
So, how to convert an NTFS partition on which windows (2K or XP) is
installed, but which has been formatted with a cluster size of 512
bytes, into an NTFS partition with a different cluster size (4096
bytes for example). Or more generally, How to change the cluster size
of an NTFS partition.
I tried to use Norton Ghost 2003 to backup, reformat with the proper
cluster size, then restore, but Ghost works on such a low level that
it also restored my old cluster size. So here's another way.
Please read fully before you proceed.
Quick summary:
1) Boot into another Win32 partition. (Install another temporary
Win2K/XP on your system in another parition, it's worth it: much
faster disk access while doing all the copying than working from the
BartPE CD or the Recovery Console).
2) From that other partition, backup the entire partition you want to
change, copying all files, including system and hidden files and
including all file security attributes, using the simple xcopy
command. You MUST copy the files to another NTFS partition in order to
preserve their NTFS attributes. Use the following xcopy switches:
/h/e/x/o/k
(Note: You can encounter some difficulties during the copy. See
below.)
3) Reformat the partition with the cluster size you want
4) Restore all files, using xcopy also
See
http://support.microsoft.com/kb/323007 on use of the xcopy
command.
So you need at least 2 NTFS partitions in your system: The one you
want to modify, and one in which you boot from while doing this, and
to which you backup the files. This 2nd partition should be big enough
to hold all that, or you can use a 3rd NTFS partition to copy the
files to.
Let's think a bit about risks of losing time or data:
1) This is not a "repair" situation where something is stopping you
from working. You just want to improve your working situation. If your
windows isn't working properly, this won't repair it. All this does is
change the NTFS cluster size, while everything else remains the same
(i.e. you do not add or remove disks, and you restore back to the same
partition).
2) You don't risk losing your data files, because you will copy all
files before your reformat. If you have doubts that your copy is not
identical to your original, you can always stop and not reformat.
Also, you can backup your data (work) files separately to tape, CD or
whatever you usually do.
3) All you risk is having to reinstall windows and your applications,
if the partition you want to change is the one on which you windows is
installed (which was my case). But since the only other way
(apparently) of changing the NFTS cluster size is to reformat and, in
this case, reinstall windows and all applications, you hopefully want
to change the cluster size badly enough to accept this risk and
possiblity. So be prepared. Make sure you have a windows install CD
ready (you'll most probably not need it).
Here's what I did:
A) I first booted into a different win2K install than the one I
wanted to back up, of course. (Didn't try booting to the Recovery
Console; should work too if it allows you to copy ALL folders and
files... bit more risky, so no, installing a temp windows is safer).
B) I backed up my whole NTFS drive E: (which is also where my windows
2000 is installed) to G:, also an NTFS partition (so as to preserve
all security settings), in a folder called ESAVE, by using the xcopy
command like so:
xcopy e:\*.* g:\esave\ /h /e /x /o /k
The one problem I encountered during the copy, was that it tried to
copy the "System Volume Information" folder, but failed (access
denied), so it aborted the copying, leaving the WINNT folder branch
uncopied.
One way to avoid this is to add the Administrators group to this
folder's security, giving them Full Control, before you start the
xcopy. That way xcopy will be able to copy it properly.
That folder mainly holds System Restore data in WinXP. I had Win2K,
and hadn't thought of giving the Admins authority on that folder, so
all I wanted was to finish my xcopy. Read this part if your case is
similar.
I had to find a ruse to make xcopy copy only the WINNT branch
*including* making it create the WINNT folder itself (to preserve
security attributes for that folder).
(For others who may be reading this and get the same problem:
The command: xcopy e:\winnt /h/e/x/o/k will not create a
destination folder called winnt, it'll copy the *contents* of winnt
into the current destination folder directly. If you specify the
destination folder on the command line (xcopy e:\winnt winnt\) a new
destination winnt folder will be created, but without the security
attributes of the original winnt folder. You're not *copying* the
original folder, you're creating a new one with default attributes.
So I created a dummy file "e:\winnttt.txt" and used the commands:
G:\ESAVE> xcopy e:\winnt*.* /h/e/x/o/k
G:\ESAVE> xcopy e:\winnt winnt /h/e/x/o/k
The first line created the destination winnt folder with the proper
attributes, and put some other stuff inside it, unimportant, since the
second line makes a perfect copy of the whole winnt folder. (Note, on
the first command, that I had moved (CD) into G:\ESAVE before
executing it)
C) xcopy also copied the hidden folder called RECYCLER, which was the
recycle bin of drive e:. I deleted that folder from my backup, since
windows automatically recreates it.
D) I then verified that the total number of files in the destination
was exactly equal to the total number of files in the source. I used a
tool called TreeSize to get the number of files, but there are other
ways: right click on a folder and click Properties, it will show you
the number of files in that folder and its subfolders. If you doing
this from the command prompt, you can use dir /s which also shows
the total files at the very end (dir e:\ /s then dir g:\esave /s )
E) I then used the *WinXP* format.exe command to reformat e:\ into an
NTFS volume with the new cluster size (the WinXP version organizes the
NTFS structures a bit more efficiently than the older Win2K format
command). I wanted a cluster size of 4096, so I used:
format e: /fs:ntfs /a:4096 /q
F) Finally, I copied back the files:
xcopy g:\esave\*.* e:\ /h/e/x/o/k
Then I rebooted into the "old" Windows, and everything worked
perfectly.
I'm quite sure the ntbackup.exe utility found in windows would have
done an equally good job. The only reason I didn't use it was that I
read this Microsoft article, which seems to say it is not enough to
just do a backup-format-restore:
http://support.microsoft.com/?id=249694
I also discovered the perfect way to fully defragment an NTFS
partition: Make a backup using Ghost 2003 (or Ghost 8), then restore
it right back. On restoring them, Ghost will defragment both the files
and the MFT, and will place the MFT (the part which can be moved) at
the recommended position in the partition (at the 3GB mark). At least
that's my experience. The nice thing is that it took only around 25
mins for the whole procedure (7.5 GB of data). And I have an old 1.7
GHz CPU. I'm quite positively certain that there is no defrag
software anywhere, which could have defragged 7.GB so thouroughly,
including MFT, in merely 30 min. Plus you get the added advantage of
having an image there, ready to be used if needed. Perfect.
As for the Oformat.exe/cvtarea.exe/convert.exe procedure I mentioned,
it's definitely not worth trying it: oformat.exe is a DOS 8 command
(you have to boot the DOS which came with WinME or WinXP, no earlier
version). Plus, given that the only advantage of this cvtarea
manoeuver was to place the MFT at the 3GB mark, which Ghost did
automatically without asking, the Ghost solution is defintely much
less hassle and gives better results.
Thanks very much for your help, Pegasus. I hope some others who read
this will be able to solve this problem quickly in the future.
Habib Debs