How can I restore an image of a partition to different partition, e.g. restore the image of /dev/sda5 to /dev/sda6? |
Normally Clonezilla only allows you to restore the image to the same partition, i.e. if it's saved from /dev/sda5, you can only restore that to /dev/sda5. If you really want to restore it to different partition, e.g. /dev/sda6, you can:
- Create the partition /dev/sda6, and make sure the size is equal or larger than the /dev/sda5 which you save the source image.
- Make a copy of image dir, here we use the image "my-image" as an example, e.g.
cp -a /home/partimag/my-image /home/partimage/my-image-new
- Now we have to change some files in /home/partimage/my-image-new,
- //Hint// In the above steps, if you want to save time and disk space, you can create the dir /home/partimage/my-image-new, copy the small files from /home/partimag/my-image, and use symbolic link (ln -fs) to link the sda5* files as sda6*.
- Now you can use the menu "restoreparts" to restore the image of partition "sda6" from my-image-new to /dev/sda6, i.e. to use the new created image "my-image-new" instead of original "my-image".
|
|