I think that you are going to a lot of trouble for a negligible amount of disk space. If you really wanted to do this then this is what I would have done, and which you could still do.
On the original hard disk install Norton Ghost on Windows.
Make a full backup of Windows onto an external or extra internal disk using Norton Ghost.
Use tar under Linux to back up the Linux partitions onto an external or extra internal disk.
You don't really need to back up the partition table since you want to create new partition sizes. If you did want to backup the MBR and extended partitions then you could use the dd command on Linux to back up the MBR, and use sfdisk on Linux to back up the extended partitions in the partition table.
Code:
dd if=hda of=mbr.dd bs=512 count=1 conv=notrunc,noerror
sfdisk -d /dev/hda > mbr.sfdisk
But the important thing is that you don't need to do that because you are going to create the partitions on the new disk the size that you want them to be.
Then on the new disk use the bootable Norton Ghost CD to restore the backup of Windows onto the new disk. The should be bootable at this point. You then boot Windows and run chkdsk /R to find the bad blocks.
Then boot a live Linux CD and use fdisk to create your extra partitions any size that you want.
Under Linux use the tar command to restore the data to the partitions.
Then you have to use chroot to recreate the LILO or GRUB boot sector. This is how. If your Linux root partition is on /dev/hda2 and you have GRUB boot loader then do this:
Code:
mkdir /mnt/new
mount /dev/hda2 /mnt/new
mount --bind /dev /mnt/new/dev
mount --bind /proc /mnt/new/proc
chroot /mnt/new /bin/bash
. /etc/profile
. /etc/bash.bashrc
grub-install /dev/hda
If you use LILO then I believe that running the lilo executable will do the job. I haven't used LILO for a long time.
You might also want to format your swap partition while you're in there. If it is /dev/hda3 then do this:
Code:
mkswap /dev/hda3
exit
sync
umount /mnt/new
Then you reboot the machine. You should see the LILO or GRUB menu at the appropriate time during the reboot.
That's how I would have done it.
The problem with using the dd or partimage utilities is that they have to be restored back into a partition of the same size as the original. Using Norton Ghost in Windows and tar in Linux avoids this problem. Since you can restore your LILO or GRUB boot sector using a live Linux CD and the chroot utility then that appears to me to be the most flexible way to do backups.