> I to move my Windows from the partition number
> 2 to the partition number 0 (1st).
>
> My plan is the following.
> I will mount my Windows partition, then I will archive or copy
> the whole tree to the second disk.
> I will repartition my first hard disk and next
> I will format the first partition using Windows boot floppy
> and then I will boot to linux and 
> I will copy/restore my Windows data/tree/files from the second disk
> to the newly formatted partition.
>
> Will Windows 98 be usable after the plain copy? Do they have some magic
> files or tricks?
>
> What do you think? Is there a better way to move/copy Windows to the first
> partition?
>
> (The reason I need to do it is that my System Commander got corrupted.)
>
> Thankx in advance.
> Marcin Mankowski

IMHO, the problems you will get (in other words, the reason why it won't
work) depend on how you copy the partition:

If you "cp -a" all your files from the old partition to the new one, Windows
might be unable to find files with "long" names (> 8.3 chars) correctly.
This is because of how long filenames are implemented: every file has
actually TWO names. In addition to the long name, there is also a second 8.3
name for backward compatibility. For example, you might have the following
two files:

  FileWithFirstLongName.dat   FILEWI~1.DAT
  FileWithSecondLongName.dat  FILEWI~2.DAT

The short names are assigned in the order the files are created, i.e., if
you copy the above two files to another partition, there is no guarantee
that they will get the same short names as before. You might as well end up
with

  FileWithFirstLongName.dat   FILEWI~2.DAT
  FileWithSecondLongName.dat  FILEWI~1.DAT

Unfortunately, many applications (and I've been told even Windows itself)
continue to use the short names, so they will access the wrong files.

Another way is to copy the whole partition including filesystem and
everything (something like "dd if=/dev/hda2 of=/dev/hda1"). This will copy
all the long and short filenames perfectly. However, your new system will
probably not boot. In FAT filesystems, the partition's absolute starting
address is stored somewhere in the bootsector, and this information is
actually used by the operating system. Since the copied bootsector still
contains the address of the old partition, Windows won't address the new one
correctly. (Therefore, a possible way might be to format the new partition,
save the bootsector, "dd" the old partition to the new one and finally
restore the previously saved bootsector. However, I never tried this myself.
Also, remember that FAT-32 actually has more than one "bootsector". It has a
second copy of the bootsector and some other information stored in the
consecutive sectors, so you would have to replace those as well.)

Regards,

Joachim Noffke

Reply via email to