2

I created an image of my entire disk, just after purchasing my laptop, using CloneZilla. The disk image was created with the graphical version of CloneZilla, but in the logfile clonezilla-img, it says that it can be done over with the command:

ocs-sr -q2 -c -j2 -z1p -i 2000 -p true savedisk 2013-11-05-21-img sda

List of files:

total 25G
1.1K    blkdev.list
 13K    clonezilla-img
   4    disk
9.5K    Info-dmi.txt
 19K    Info-lshw.txt
2.5K    Info-lspci.txt
 169    Info-packages.txt
  80    Info-saved-by-cmd.txt
  30    parts
 26M    sda1.vfat-ptcl-img.gz.aa
303M    sda2.ntfs-ptcl-img.gz.aa
 92M    sda3.dd-img.aa
2.0G    sda4.ntfs-ptcl-img.gz.aa
2.0G    sda4.ntfs-ptcl-img.gz.ab
2.0G    sda4.ntfs-ptcl-img.gz.ac
2.0G    sda4.ntfs-ptcl-img.gz.ad
2.0G    sda4.ntfs-ptcl-img.gz.ae
2.0G    sda4.ntfs-ptcl-img.gz.af
1.7G    sda4.ntfs-ptcl-img.gz.ag
1.3M    sda5.ntfs-ptcl-img.gz.aa
2.0G    sda6.ntfs-ptcl-img.gz.aa
2.0G    sda6.ntfs-ptcl-img.gz.ab
2.0G    sda6.ntfs-ptcl-img.gz.ac
2.0G    sda6.ntfs-ptcl-img.gz.ad
2.0G    sda6.ntfs-ptcl-img.gz.ae
1.2G    sda6.ntfs-ptcl-img.gz.af
  37    sda-chs.sf
 17K    sda-gpt-1st
 16K    sda-gpt-2nd
 18K    sda-gpt.gdisk
 868    sda-gpt.sgdisk
 512    sda-mbr
 799    sda-pt.parted
 710    sda-pt.parted.compact
 250    sda-pt.sf

Now I am trying to restore the whole thing, onto the same disk as I cloned from, using CloneZilla Live. I used the beginners mode, and somehow I got it to delete all partitions, but without restoring the partition table from the image. I'm not sure if I made a mistake, or if it really can't handle that and just expect the partitions to be in place.

So now it throws me into command line, asking me to restore the partition table, to prepare for restoring CloneZilla to restore the actual partition content.

No partition is found in this machine. To restore an image of 
partition, partition(s) must exist on the destination disk. 

Now enter another shell to allow you to create partition table on 
the destination disk. You may use fdisk, cfdisk, sfdisk or parted 
to do that. When everything is done, run "exit" to go back to the 
original program. 

Do I need to do this manually, or can I make one of these partition tools read the desired partition table from the image?

4
  • Clonezilla has the capability to restore the partition table, but the image has to contain it, which your image does not. You will have to create the partitions manually since your image doesn't have the information.
    – Ramhound
    Commented Oct 29, 2014 at 15:42
  • Are you sure? The image folder does contain the following human readable files: sda-gpt.sgdisk, sda-pt.parted, sda-pt.parted.compact and sda-pt.sf, which all describe the partition table. Commented Oct 29, 2014 at 15:51
  • How would it have looked if the image did have that information? Commented Oct 29, 2014 at 16:03
  • I have ran into the same trouble. After RTFM -j2 suggests me that the partition table and all hidden sectors were saved into the image. I can even read all that info manually. Still, restoredisk does not restore the GPT partition table used by my Win8.1 installation.
    – wigy
    Commented May 16, 2015 at 19:32

1 Answer 1

0

sfdisk /dev/sda < /mnt/.../sda-pt.sf or sgdisk -l /mnt/.../sda-gpt-1st will do the job

But keep in mind that if you restore to a larger drive, you have to manually invoke gdisk in order to use the full disk space (or maybe edit the .sf file last-lba value and restore again...).

the following interactive sequence worked for me:

gdisk > x (extra functionality) > e (relocate data backup structures to the end of the disk)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .