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 :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
@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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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:
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 :)
Please enter expert mode of Clonezilla live, and choose the options "-k1" and "-icds". Details about these options:
http://clonezilla.org/clonezilla-live/doc/02_Restore_disk_image/advanced/09-advanced-param.php
A FAQ about this:
http://drbl.org/faq/fine-print.php?path=./2_System/119_larger_to_smaller_disk_restore_clone.faq#119_larger_to_smaller_disk_restore_clone.faq
Steven
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?
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
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.
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
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.
Thanks for sharing that.
Steven
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.@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
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
@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
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.
@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
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
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
Thanks for reply!
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
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!
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
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