I'm trying to copy a partition from one drive to another, with partimage (partimage.org). Source Disk (20Gb) /dev/hda1 /boot 150Mb /dev/hda2 linux swap 384Mb /dev/hda3 / 19 Gb Using Partimage I was able to clone the MBR and /dev/hda1, however there is a problem when trying to restore the image image of "/", since the source partition was 19Gb - and the destination disk was only 7Gb. I though this would be easy, use parted to resize the 19Gb partition to a few Gb (The / partition only has a 1.45Gb used). I tried 1.6.5 (over 1.6.3), but it simply produces an error of "not implemented ext2 filesystem has a rather strange layout". I think I've figured it- but need someone else to convince me that I'm doing the right thing (scapegoat would be better ;-). - Use resize2fs to ensure that the file-system is shrunk. - Delete the big partition with fdisk - recreate the big partition (smaller), MAKING SURE it starts at the same place, - write out fdisk changes reboot. I tried the above, but bailed out when on reboot it complains about the superblock differing from the physical partition size; this is where I wasn't sure what to do - so just deleted the resized partition to be safe. Any pointers, better software, or other way of thinking about the problem? I see the problem, as: i) parted won't resize the source partition, and ii) partimage won't resize the image as it writes it out from the image file. iii) should be able to resize with resize2fs and fdisk, but I'm a bit scared to do this on gut-instinct. -- Regards, Adam Allen. adam@dynamicinteraction.co.uk pgp http://search.keyserver.net:11371/pks/lookup?op=vindex&search=adam%40dynamicinteraction.co.uk
Attachment:
signature.asc
Description: This is a digitally signed message part