#101 UI does not allow to restoreparts into a blank drive

closed
5
2014-08-26
2011-03-18
No

Clonezilla live allows restoring partitions using restoreparts onto a blank drive, but only when ocs-sr is invoked from the command line. The UI does not allow this, because it looks for the partition list on the target drive, rather than in the source image, as would be logical in this case. Not finding any partitions, the UI exists with an error. Since images made with saveparts can only be restored by restoreparts (at least in the UI), this renders such images unusable, unless one uses the command line or extra steps as described below.

Versions affected: all tested, including the current stable and testing releases:
1.2.6-59-i686 (stable)
20110113-maverick (stable)
1.2.8-15-i686 (testing)
20110317-maverick (testing)
20110309-natty (testing)

Steps to reproduce the problem:

Assume that we have an external hard drive that contains an image made by saveparts, located in the root directory. Let's assume also that the image contains three partitions sda1, sda2 and sda3. We are attempting to restore this image onto a blank hard drive that does not contain any partitions. It is not relevant whether the partition table is missing or empty. The rationale of this scenario is that the image might contain system partitions, while other partitions (data) were backed up by other means. We want to recreate the partition table on the blank drive, restore the system partitions, and leave data partitions empty, to be restored later by other means.

1. Connect the external hard drive (source of the image) and the blank hard drive (target). The machine does not have any other drives.
2. Boot Clonezilla live CD, select English US keyboard.
3. Select "Start Clonezilla"
4. Select "device-image"
5. Select "local_dev"
6. Select the external drive containing the image
7. Select root directory
8. Select "Expert" mode
9. Select "restoreparts"
An error appears in red color:
Error! No existing partition(s) or no unmounted partition(s) are found! To use Clonezilla to save or clone a partition, the source partition must exist or be unmounted! If you are sure the partition exists in this machine, maybe the kernel is too old?
10. Press Enter until presented with the choice of poweroff / reboot / enter command line prompt / start over.
11. Select "Enter command line prompt"
12. Issue the command: cd /home/partimag
13. Issue the command: sudo /opt/drbl/sbin/ocs-sr -g auto -e1 auto -e2 -c -r -j2 -p true restoreparts image-file sda1 sda2 sda3
After this, the partition table and the partition contents is restored correctly.
(Note: The options given to ocs-sr are the defaults that would be generated by the UI, if it handled this scenario correctly, with the exception that the non-default option "Use the partition table from the image" is chosen. This command line was copied from UI's output when a workaround was applied as described below.)

Expected behavior:
After step 9 the program asks for the target drive and then presents the list of partitions obtained from the image, and then proceeds with the restore in the same way as after step 13.

Workaround:
If the user does not wish to use the command line, perhaps because he/she is not able to guess its correct syntax, it is still possible to restore the image using Clonezilla's UI, with a simple trick. The problem is that UI tries to obtain the list of partitions from the target, rather than from the source. We can then provide that list by creating dummy partitions on the target drive. The size of these partitions is not important, and neither is their contents. They can be left unformatted, or formatted to any filesystem (except swap). It is necessary to create as many partitions as many we want to restore complete with contents. For example, if the image contains partitions sda1, sda2, sda3 and sda4, but we only want to restore sda1-3, then we need to create 3 partitions. The fourth one will also be recreated by Clonezilla, but will be left empty. Note that the purpose of creating these dummy partitions is only to populate the list in the UI, the contents of the disk will be completely overwritten during the restore operation.

In addition I would like to point out that the wording of the error message displayed after step 9 is confusing. It appears to refer to the save operation, while it is displayed during a restore.

Discussion

  • Steven Shiau

    Steven Shiau - 2011-03-20

    Thanks for open this issue.
    So your point is that the default settings of TUI do not match that of the command ocs-sr?
    Or?
    Since in your steps:
    "8. Select "Expert" mode"
    If you remove the "-k" related option, then Clonezilla will create the partition table on the destination disk for you.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2011-03-20
    • assigned_to: nobody --> steven_shiau
     
  • Maciej Puzio

    Maciej Puzio - 2011-03-21

    The problem is that in the TUI I can't even get to the screen with -k and other options, because the process fails well before that. It fails because it performs a check that would be sensible if I were saving the contents of the drive, rather than restoring it.

     
  • Steven Shiau

    Steven Shiau - 2011-03-25

    "the process fails well before that. It fails because it performs a check that would be sensible if I were saving the contents of the drive, rather than restoring it." -> Sorry, we never encounter such an issue here. I'd like to reproduce the problem here. Could you please describe more how I can reproduce the problem?
    Thanks.

    Steven.

     
  • Maciej Puzio

    Maciej Puzio - 2011-03-25

    "Could you please describe more how I can reproduce the problem?"

    Gladly, but I am not sure what to add. Did you follow the steps that I listed in the report, making sure that your drives satisfy the prerequisites as I described? If so, does the error message listed after step 9 appear, or does the program behave differently in your tests?

    Just to be precise, I'd like to add that it is not important whether the source drive is external or not, but it is important that it has only one partition (that gets mounted as /home/partimag). If the source drive has more partitions, then the error message in step 9 does not appear, but but then Clonezilla would only allow restoring to the unmounted partitions of the source drive, which is not what we want.

     
  • RudyD

    RudyD - 2011-05-24

    Greetings!
    Almost same issue here. (Others beside but will post them in a specific place if I find one.)

    i, Prepared a machine, than backed up with saveparts.
    ii, Then blanked the disk with gparted - create new partition table (created an empty msdos partition table)
    iii, Could not restore to the blank - empty disk with restoreparts becouse clonezilla does exit after the error.

    Suggestions for solution:

    - To allow to continue for the next step in the UI with a warning.
    - Call the partitioning questions at this point in case of this situation (before the .
    - Re-tailor the process and take care of the partitioning before image selection.
    - probably re-check the situation right before the restore.

    used these versions (downloadable drbl live usb image):
    drbl-live-xfce-1.0.5-6-i486
    DRBL: 1.9.17-1drbl
    Clonezilla: 2.3.17-1drb1

    (other notes for the above, additional info:
    i, I wanted to restore the image with several other machines but there are some with a slighter smaller hd and restore fails with restoredisk - this is OT here, just mentioned.
    ii, It was an OEM w7 install and I wanted to keep all 3 partitions, but shrinked the 2nd system one becouse of the above to being able to restore to a bit smaller disk in case. Just created the backup with an earlier version: drbl-live-xfce-1.0.2-46-i486, DRBL: 1.9.8-20, Clonezilla: 2.3.7-64
    But it messed up the partitioning and missed the empty space between the 2nd and the 3rd partition. This is why I did wiped the partitions.
    )

    So the case - clonezilla ui exits when it sees only a blank disk with no partitions but I want to restore partitions even to an empty disk.

     
  • Maciej Puzio

    Maciej Puzio - 2011-05-25

    Rudyd, thanks for posting your comment. I hope that you were able to restore your data by using the command line or the dummy partition trick that I described.

     
  • Steven Shiau

    Steven Shiau - 2011-05-26

    Yes, by default in the beginner mode, if you use the "restoreparts" menu, Clonezilla won't re-create the partition table on the destination hard drive. It will use the existing partition table on that disk. Therefore if you want, you can enter expert mode, and choose appropriate options, like remove the option "-k", or use "-k1"...

    Steven.

     
  • Maciej Puzio

    Maciej Puzio - 2011-05-26

    "Therefore if you want, you can enter expert mode, and choose appropriate options, like
    remove the option "-k", or use "-k1"..."

    No, I cannot do this. Your suggestion works with "restoredisk", but not with "restoreparts". In the latter case the TUI exits with an error well before the screen with -k and -k1 options, if partitions are missing on the destination drive. This happens because early in the process the TUI does an erroneous check to see if there are any partitions to save, even though this is a restore operation.

     
  • Steven Shiau

    Steven Shiau - 2011-06-01

    OK, I think I realized that.
    However, could you please tell me the actions you have done, step by step, so it's easier for me to reproduce the problem here?
    Thanks.

    Steven.

     
  • Maciej Puzio

    Maciej Puzio - 2011-06-01

    Steven, I included steps necessary to duplicate the problem in the original bug report. Please forgive me if I am wrong, but your current and past replies seem to indicate that you did not read it thoroughly. I would appreciate if you do so, and if you try to duplicate the problem following the steps that I described. If you find my description unclear, can you be more precise as to which fragment would you like me to clarify?

    Note that I posted one clarification already. The bug report contains a prerequisite: "assume that we have an external hard drive that contains an image made by saveparts, located in the root directory". To clarify, "it is not important whether the
    source drive is external or not, but it is important that it has only one partition (that gets mounted as /home/partimag). If the source drive has more partitions, then the error message in step 9 does not appear, but then Clonezilla would only allow restoring to the unmounted partitions of the source drive, which is not what we want."

     
  • Steven Shiau

    Steven Shiau - 2011-06-02

    Oops... My bad. Yes, I missed your original post. I was reading all the comments, and forgot to check the original one. I will follow your original post to reproduce the problem and to see how to improve that.
    Thanks again.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2012-04-19

    This issue has been fixed in Clonezilla live 1.2.12-51.
    Although it's not perfect, but at least now it allows you to enter command line prompt to create a partition table then resume.
    Please test it and if any problem, please report again.
    Thanks.

    Steven.

     
  • Steven Shiau

    Steven Shiau - 2012-04-19
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks