booting XP with GRUB after moving filesystem to new partition

booting XP with GRUB after moving filesystem to new partition

Post by Joseph Harvel » Fri, 04 Apr 2003 03:51:33



My sister's machine has a single 6G disk with the following partitions:

1       Fat16   2G
2       extended
5       Fat16   2G
6       Fat16   2G

She had Windows 98 on partition 1, and Windows XP on 5.  She was using XP only and was out of disk space on the XP filesystem on partition 5.

My plan to remedy her problem is as follows:

1.      copy a raw image of the disk onto a backup disk
2.      copy the files from all three filesystems into a new filesystem on a backup disk with files going into directories /c, /d, and /e in the new filesystem
3.      repartition with a single 6G partition
4.      create a filesystem on the new partition
5.      copy all files in backup /d to root directory on new filesystem
6.      copy all files in backup /c to /oldC on new filesystem
7.      copy all files in backup /e to /oldE in new filesystem
8.      boot the new system

The system won't boot, however.  Even though I haven't touched the MBR of this disk, I know the old bootloader was booting off of partition 5.  So I figured I would try to use GRUB to boot XP from partition 1 as follows:

1.      boot from a GRUB boot floppy in a system with only the one disk in it
2.      enter 'rootnoverify (hd0,0)'
3.      enter 'makeactive'
4.      enter 'chainloader +1'
5.      enter 'boot'

I see long pauses (20 sec or so) after entering commands on steps 3 and 4 before getting a 'grub>' prompt again.  When I enter 'boot', I also see the long pause and then see 10 or 15 garbage characters on the console, then nothing happens.  When I press any key, another set of 10 or 15 garbage characters are echoed to the screen.

What's going on here?

Notes:

The original filesystems were mounted as vfat in Linux.
The new partition type I created was 'Win95 FAT32 (LBA)' (0xc).
The filesystem I created on the backup (copyout) was with mkdosfs as a FAT32 filesystem.
The filesystem I created on the repartitioned disk partition 1 (copyin) was with mkdosfs as a FAT32 filesystem.

I performed the copyout and copyin as follows:

cd <src>
find . -print0 |cpio -p0mv <dest>