CZ 2.6.7: "-j2" does not restore saved the 1 MB hidden data after MBR
A partition and disk imaging/cloning program
Brought to you by:
steven_shiau
Clonezilla Version: 2.6.7-28 amd64
Problem: When restoring partitions from an image, the saved 1 MB hidden data is not restored. In other words, CZ forgets to restore the contents of the "sda-hidden-data-after-mbr" file to "/dev/sda".
After several lost hours I have discovered this issue also.
Do we know when the bug appeared, or perhaps more importantly (for me at least) in what version was this last known to work?
Somehow I did not receive this bug notification via email, so this one was ignored for a few months.
I can not reproduce this issue using the latest Clonezilla live, i.e., 2.7.2-39.
When restoring an image to a disk, this green command was run:
/usr/sbin/ocs-sr -g auto -e1 auto -e2 -nogui -c -r -j2 -scr -p choose restoredisk 2021-07-01-03-img-j2 sdc
It did run this command and was shown on the screen:
dd if=/home/partimag/2021-07-01-03-img-j2/sdc-hidden-data-after-mbr of=/dev/sdc seek=1 bs=512 count=2047
Which version of Clonezilla live did you use? What's the green command you have?
Steven
This bug does not affect "full disk" restoration, only the "restore partitions" (restoreparts) mode in which the user manually chooses the partitions to be restored.
(If you can now easily reproduce and fix this bug, could you backport the fix to a new CZ 2.6 release? I do not want to upgrade to CZ 2.7 due to poor hardware performance.)
I am hesitating to implementing this, because not all of the vendors will use this, and the 1st partition might not have enough space between itself and MBR. Hence if we implement this, and people use it in some disk which only 2nd or 3rd partition is restored using the restoreparts mode, the data in the 1st partition might be destroyed. That's why this function is turned on when it's in restoredisk mode only in Clonezilla.
Steven
I wish you would implement this feature, considering the following guidelines:
1. Trust the user
If the user selects
-j2
in the Expert menu, then trust that they know what they want.2. Do not lie to the user
If the user selected
-j2
, then the action for-j2
must not be silently skipped.3. Use sane defaults
If you have concerns that
-j2
will bring problems inrestoreparts
mode, simply disable it by default so the user must select it manually.Anyway, whatever your decision will be, thank you for your time.
Absolutely. The bug in the TUI, since we should not show the choice "-j2" when it's in restoreparts mode.
This issue has been fixed in Clonezilla live >= 2.7.3-7 and 20210706-*:
https://clonezilla.org/downloads.php
Please give it a try and let us know the results.
Thanks again.
Steven