Restoring images to different hard disk sizes fails
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
Devices images created with the option "-j2" could not be restored to hard disks that size is unequal to that from the image. Restore options are: -j2 -icds -k1
In version "20140114-saucy" everything works fine. But with the last versions "20140331-saucy" and "20140415-saucy" the problem exists.
In the attachments you can find a screenshot showing the restoring warnings and errors.
So how about
20140428-trusty
or
20140415-saucy?
Steven.
Last edit: Steven Shiau 2014-05-03
The problem still exists in both versions you mentioned.
Recently we do not do any modification about options -j2 -icds -k1. Therefore I guess maybe this might be triggered by new Linux kernel or something else.
Please keep testing the new testing releases, which we put every week.
Steven.
Hi Steven,
today I found the problem. The affected script is "/usr/sbin/ocs-expand-mbr-pt".
The error message is: line 276: printf 209680128.0000000000 invalid number
In version "20131125-saucy" this line contains:
size_no="$(echo "scale=0; ${size_no/,/}*$ratio/1 + $append_to_next" | bc -l)"
In later versions it changed to:
size_no="$(printf "%.0f" "$(echo "${size_no/,/}*$ratio + $append_to_next" | bc -l)")"
If I copy the old script into the new releases, everything is working fine.
Hi LeMerP,
Thanks for finding the issue. However, it's weird that printf has an issue about the number "209680128.0000000000".
I guess maybe the issue is on the locales.
When you encountered such an issue, which language did you choose to run Clonezilla live?
Steven.
Hi Steven,
I chose "German". You are right. If I use English as language then this issue does not exist. So the locales indeed seem to be the problem.
Regards,
Patrick
Hi LeMerP,
I put locales "LC_ALL=C" when running printf in Clonezilla live 20140624-trusty, 20140624-utopic, and 2.2.3-23.
Could you please give it a try with "German" language and options "-j2 -icds -k1"?
Thanks.
Steven.
Hi Steven,
I tested 20140624-trusty (i386, amd64), 20140624-utopic (i386) and 2.2.3-23 (i686) with options "-j2 -icds -k1" and German language. Everything worked fine :)
Thank you very much.
Patrick
Great! Finally this is fixed.
Thanks for all the help.
Steven.