Menu

"disable size checking with -C command"

Help
2016-05-04
2019-03-26
  • Enrico Barsanti

    Enrico Barsanti - 2016-05-04

    hi to everyone,
    i've a partition image created using clonezilla and now i have to restore it into a smaller partition (the actual data can fit the new partition).
    i can't skip the error "disable size checking". i've found on the internet this solution:

    Go to the command prompt and edit ocs-sr (vi ocs-sr) and go to line 490. You should see 
    
    PARTCLONE_RESTORE_OPT="$PARTCLONE_RESTORE_OPT_INIT -N"
    Just add the -C there
    PARTCLONE_RESTORE_OPT="$PARTCLONE_RESTORE_OPT_INIT -C -N"
    
    save and exit, exit out of the command line back to the gui, and run through the wizard again
    

    But i don't understand how to edit the ocs-sr, i put in the command "vi ocs-sr", but all i get is an empty screen with a column of thi symbol ~
    from there i can't do anything, like it's freezed
    hope someone could help me, thanks to all :)

     
  • Suncatcher

    Suncatcher - 2017-06-25

    I of course chose the options -K1 and -ICDS, but it throws this error anyway.
    My source partition is 500Gb, target is 60Gb. Used size on source is 3Gb.Partition table is GPT.
    What can I do?

     
  • Steven Shiau

    Steven Shiau - 2017-07-05

    WIth the options "-k1" and "-icds", it's only possible to restore the image to smaller disk. However, it's not always working. The key is, the used blocks must be within the boundary of the destination partition. In your case, it seems that 500 GB -> 60 GB has few chance to work unless you try to move the used blocks to be within the boundary.

    Steven

     
  • Caleb

    Caleb - 2018-01-18

    I know this is an old thread but it's worth reviving since much of the information about this issue -- the issue of restoring a larger clone to a smaller partition when used space is known to not be an issue -- is wrong. Enrico's information is correct: it can be done if one follows the given instructions.

    So what was Enrico doing wrong? Well, what does one's running "vi ocs-sr" do when one is in the wrong directory? It opens up the text editor with a new, blank file called ocs-sr. What Enrico needed to do was simply navigate to the folder in which ocs-sr is stored, edit that and insert the -C switch, and then the -icds switch will work (it has for me, anyway).

    He also needed to know a few vi commands for navigation, insertion, saving, etc. Without that knowledge, he should have used another text editor (assuming Clonezilla has another installed) like Pico, which is more like what most people are used to.

     
  • Steven Shiau

    Steven Shiau - 2018-01-22

    If the option "-icds" is enabled for ocs-sr, actually the option "-C" will be added for partclone to run.
    This is written in /usr/share/drbl/sbin/ocs-functions. Just search "-icds" and you will find that.
    Does that have any problem when running?

    Steven

     
  • Brett Waldo

    Brett Waldo - 2018-03-29

    Since the thread was resurrected, and it helped me, I'll add my two cents. I was trying to do just as the poster described and was getting the same error. His solution somewhat worked for me. I was not using '-k1' option however, because that just destroyed the entire partition table and crashed clonezilla, so instead I created the smaller partition myself. Then modified (using vi) the file @

    /etc/drb1/drb1-ocs.conf

    Searched for INIT and added the '-C' to both
    PARTCLONE_RESTORE_OPT_INIT
    PARTCLONE_RESTORE_ONTHEFLY_OPT_INIT

    e.g.
    PARTCLONE_RESTORE_ONTHEFLY_OPT_INIT="-C -z 10485760"

    There is actually a comment on the file suggesting to do that, so it appears a sane place to make the modification.

    Note, the clone was then successful but the post clone steps failed, have to figure that one out now.

     
  • Steven Shiau

    Steven Shiau - 2018-04-01

    Thanks for sharing that.

    Steven

     
  • Suncatcher

    Suncatcher - 2018-04-15

    Confirm the solution by @BrettWaldo. -icds and -C options are NOT the same. However, Brett made a typo and the path should be not drb1 but drbl.
    Steven, you should add -C option to GUI in order users not to dig into conf-files manually.

     
  • Steven Shiau

    Steven Shiau - 2018-04-16

    @Suncatcher,
    Thanks for your comment. When "-icds" is used for ocs-sr, actually "-C" will be appended to "PARTCLONE_RESTORE_OPT". You can check /usr/share/drbl/sbin/ocs-functions for that. This is the same for ocs-onthefly.

    Steven

     
    • Suncatcher

      Suncatcher - 2018-04-16

      You can check /usr/share/drbl/sbin/ocs-functions for that. This is the same for ocs-onthefly.

      I believe it should be so, but now it is not working like that. Something goes wrong and this ocs-function doesn't work as intended. Tested just yesterday on latest alternative build 20180329-artful.

       

      Last edit: Suncatcher 2018-04-16
  • Steven Shiau

    Steven Shiau - 2018-04-16

    @Suncatcher,
    In that case, could you please describe your procedure in detail, step-by-step so that we can try to reproduce this issue here. If it's reproducible, then it can be fixed. Thanks.

    Steven

     
    • Suncatcher

      Suncatcher - 2018-04-21

      Just usual use-case, like everybody here has:
      I am cloning bigger partition (90Gb) to smaller (78Gb) and it fails with exactly this message: "target partition is smaller blablabla, disable size checking with -C command".
      -icds option didn't help, whereas manual config editing with -C did.
      Tried both in beginner and expert mode, it doesn't matter.
      What other info do you need? Several persons before me confirmed the problem with these symptoms in this thread.

       
  • Steven Shiau

    Steven Shiau - 2018-04-22

    @Suncatcher,
    You can not say "just say uual use-case, like everybody here", it's too vague.
    We do not know if you use "-k1" and "-icds" together, or just use "-icds". Besides, we have no idea if you use "restoredisk" or "restoreparts"... Too many possibilities...
    So please, step by step, in detail. That would be easier for us to reproduce this issue. Or maybe it's just the way how to use it, not the issue about the Clonezilla program.

    Steven

     
  • Suncatcher

    Suncatcher - 2018-05-04

    Of course if I say I am cloning bigger partition (90Gb) to smaller (78Gb) I am speaking about cloning partitions (aka "restoreparts"), not the whole disk.
    Of course I don't use -k1 (proportional table) because of the same reason as above: when restoring partitions we simply don't have that parttable dialog.
    What steps do you need? Clonezilla wizard is standardized, no variations here.
    1. We selected source partition.
    2. Selected device-image mode
    3. Selected partimg directory
    4. Selected -icds mode (optional). It does not change anything, error is thrown anyway.
    5. Press start.
    6. Bump! Error!

     

    Last edit: Suncatcher 2018-05-04
  • Steven Shiau

    Steven Shiau - 2018-05-11

    OK, got it. You are talking about cloning partition only, not the whole disk.
    Man, you should emphasize that in the beginning.
    We will try to improve this in the future.
    Thanks.

    Steven

     
  • Suncatcher

    Suncatcher - 2018-06-10

    Thanks for reply!

     
  • Steven Shiau

    Steven Shiau - 2018-07-15

    This issue should have been fixed. Please give testing Clonezilla live >= 2.5.6-12 or 20180712-* a try:
    https://clonezilla.org/downloads.php

    Steven

     
  • DARKGuy

    DARKGuy - 2019-02-22

    Steven, I'm afraid the issue is still happening in 2.6.0-37 and 20190108-cosmic. To clone a large image to a smaller disk, I had to edit the ocs-sr file (thanks Enrico!!!) and apply the aforementioned changes. At the end, it kind of crashed, but it kept going and my image is working correctly (I assume because it tried to write more zeroes than available in the smaller drive).

    So, it'd be great if you guys can fix this. Thanks!

     
  • Steven Shiau

    Steven Shiau - 2019-03-26

    This is weird. How did you reproduce this issue? Have you checked the option "-k1" and "-icds"?
    Please show the steps in detail to reproduce this issue so that we can fix it if it's reproducible. Thanks.

    Steven

     
  • DARKGuy

    DARKGuy - 2019-03-26

    Of course it is reproducible, just try it. Yeah, those options don't do anything. I repeat, I had to edit the ocs-sr file to make it work. This was some time ago, I already moved my servers... but basically, just create an image of a 60 GB HDD or something, then try to restore it into a 40GB HDD (of course, defrag it if it's windows or do some punchzero-ing prior to it) and you'll see what I mean. I don't remember all the details, but I recall I chose those options and they didn't do anything. Editing the ocs-sr file was the solution.

     

    Last edit: DARKGuy 2019-03-26

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.