Hi,
first of all I apologize for my poor programming skills.
I find useful to have a fully bootable clone of my primary Linux partition in another drive. No problems if I boot an ISO image of Clonezilla and follow the GUI, using partition to partition mode (of course I change the UUID of the copy).
To partially automate the process, I used a Grub entry (actually not in full batch mode, for the problem of random drive letters assigned at boot by newest kernels, but I am working on it). Here is a sample of the code:
menuentry "Clone Linux Mint SSD sda2 to HDD sdb5 and change UUID" {
set isofile="/isos/clonezilla-live-3.1.3-2-amd64.iso"
set root='hd0,2'
set source_UUID="16249b1f-2e94-4864-b13f-4a41d39ec7e6"
set target_UUID="4199463a-a4ab-48c2-b137-eb949116ec8c"
set source_DEV="/dev/sda2"
set target_DEV="/dev/sdb5"
loopback loop "(${root})${isofile}"
linux (loop)/live/vmlinuz boot=live union=overlay username=user config \
components noswap locales=en_US.UTF-8 edd=on nomodeset nodmraid \
keyboard-layouts=it \
ocs_live_run="ocs-onthefly -e1 auto -e2 -r -t -iui -ius -fsck-y -k -pa true \
-f $source_DEV -d $target_DEV" \
ocs_postrun1="sudo e2fsck -fky $target_DEV" \
ocs_postrun2="sudo tune2fs -U $target_UUID $target_DEV" \
ocs_live_batch="no" net.ifnames=0 nosplash noprompt ip=frommedia \
toram=filesystem.squashfs findiso=$isofile \
vga=795 use_dev_list_cache=no use_os_prober=no live_console_font_size=6x12
initrd (loop)/live/initrd.img
}
I ask for your advice since I get an error that I am not able to track.
Until version 2.8.2-5 everything worked as expected. But from the first 3.0.x-x up to the latest version, I get the following error:
Variable tgt_d is not assigned in function do_d2d_local_restore
It seems to me right before partclone is executed.
Luckily this error can be reproduced in an easier way. If I boot the ISO image (which executes ocs-live-general, tell me if I am wrong), exit from the GUI and enter the terminal, the following command:
is completed without errors in latest 2.x release 2.8.2-5, but in any 3.x release (I think I tried almost any release up to now), gives the error listed above. This makes me think that ocs-live-general at last sets variable tgt_d correctly, but this is only a guess, understanding this is far beyond my skills.
So I ask for your help, since I would not to get stuck with an old version as 2.8.2-5.
I attach the text output I could capture in terminal with a redirect (>) command, in both situations (correct and error).
Thanks for your feedback. It is a bug, and has been fixed in Clonezilla live >= 3.1.3-7 or 20240609-*: https://clonezilla.org/downloads.php
Please let us know the results. Thanks.
Steven
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
first of all I apologize for my poor programming skills.
I find useful to have a fully bootable clone of my primary Linux partition in another drive. No problems if I boot an ISO image of Clonezilla and follow the GUI, using partition to partition mode (of course I change the UUID of the copy).
To partially automate the process, I used a Grub entry (actually not in full batch mode, for the problem of random drive letters assigned at boot by newest kernels, but I am working on it). Here is a sample of the code:
menuentry "Clone Linux Mint SSD sda2 to HDD sdb5 and change UUID" {
set isofile="/isos/clonezilla-live-3.1.3-2-amd64.iso"
set root='hd0,2'
set source_UUID="16249b1f-2e94-4864-b13f-4a41d39ec7e6"
set target_UUID="4199463a-a4ab-48c2-b137-eb949116ec8c"
set source_DEV="/dev/sda2"
set target_DEV="/dev/sdb5"
loopback loop "(${root})${isofile}"
linux (loop)/live/vmlinuz boot=live union=overlay username=user config \
components noswap locales=en_US.UTF-8 edd=on nomodeset nodmraid \
keyboard-layouts=it \
ocs_live_run="ocs-onthefly -e1 auto -e2 -r -t -iui -ius -fsck-y -k -pa true \
-f $source_DEV -d $target_DEV" \
ocs_postrun1="sudo e2fsck -fky $target_DEV" \
ocs_postrun2="sudo tune2fs -U $target_UUID $target_DEV" \
ocs_live_batch="no" net.ifnames=0 nosplash noprompt ip=frommedia \
toram=filesystem.squashfs findiso=$isofile \
vga=795 use_dev_list_cache=no use_os_prober=no live_console_font_size=6x12
initrd (loop)/live/initrd.img
}
I ask for your advice since I get an error that I am not able to track.
Until version 2.8.2-5 everything worked as expected. But from the first 3.0.x-x up to the latest version, I get the following error:
Variable tgt_d is not assigned in function do_d2d_local_restore
It seems to me right before partclone is executed.
Luckily this error can be reproduced in an easier way. If I boot the ISO image (which executes ocs-live-general, tell me if I am wrong), exit from the GUI and enter the terminal, the following command:
sudo /usr/sbin/ocs-onthefly -e1 auto -e2 -r -t -t2 -ius -iui -fsck-y -k -p choose -f sda2 -d sdb5
is completed without errors in latest 2.x release 2.8.2-5, but in any 3.x release (I think I tried almost any release up to now), gives the error listed above. This makes me think that ocs-live-general at last sets variable tgt_d correctly, but this is only a guess, understanding this is far beyond my skills.
So I ask for your help, since I would not to get stuck with an old version as 2.8.2-5.
I attach the text output I could capture in terminal with a redirect (>) command, in both situations (correct and error).
Thank you very much,
Federico
Thanks for your feedback. It is a bug, and has been fixed in Clonezilla live >= 3.1.3-7 or 20240609-*:
https://clonezilla.org/downloads.php
Please let us know the results. Thanks.
Steven
Hi Steven!
I just tried latest release 3.1.3-7 and can tell you the issue is solved.
Thank you very much! Keep up the good work!
Federico
OK, great. Thanks for your feedback.
Steven