This is now working as a fully unattended restore. The menu entry is below in the hopes that it may help someome tyring to accomplish this task.
The Default, recordfail and save_env recordfail are only required for my specfic needs not required for the restore functionality. Also this syntax is specific for use directly in the Grub.cfg file.
Hello,
I am running:
Ubuntu LTS 14.04.03
Clonezilla-live-2.4.2-61-amd64.iso
Grub2
Using Clonezilla I have created an image of a partition and stored it on another partition of the same disk.
I need a solution that requires no user input that will restore the saved image to the original partition via the Grub menu.
Currently I receive a generic error message with no details in the logs and am left at the Clonezilla GUI menu to select the command line option.
Here is my current Grub2 menu item:
menuentry 'Unattended Image Restore for Primary Boot' --class ubuntu --class gnu-linux --class gnu $menuentry_id_option 'gnulinux-simple-45f2cba8-3870-42df-84fe-1f195cde3f84' {
set iso='clonezilla-live-2.4.2-61-amd64.iso'
loopback loop (hd0,6)/$iso
linux (loop)/live/vmlinuz boot=live config union=overlay username=user noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=$iso quiet splash ocs_pre_run='sudo mount --bind /dev/sda7 /home/partimag/' ocs_live_run='sudo ocs-sr auto -e1 auto -e2 -t -r -j2 -k --batch -p reboot restoreparts 2016-02-22-21-img sda1' ocs_live_extra_param='' keyboard-layouts='NONE' locales='en_US.UTF-8' ocs_live_batch='yes'
initrd (loop)/live/initrd.img
}
Please let me know if more information is needed, and thanks for the help.
Brian
This is now working as a fully unattended restore. The menu entry is below in the hopes that it may help someome tyring to accomplish this task.
The Default, recordfail and save_env recordfail are only required for my specfic needs not required for the restore functionality. Also this syntax is specific for use directly in the Grub.cfg file.
menuentry 'Unattended Image Restore for Primary Boot' --class ubuntu --class gnu-linux --class gnu $menuentry_id_option 'gnulinux-simple-45f2cba8-3870-42df-84fe-1f195cde3$
Default=0
set recordfail=0
save_env recordfail
set iso='clonezilla-live-2.4.2-61-amd64.iso'
loopback loop (hd0,6)/$iso
linux (loop)/live/vmlinuz boot=live config union=overlay username=user noswap noprompt ip=frommedia toram=filesystem.squashfs findiso=$iso quiet splash \ ocs_prerun='mount /dev/sda7 /home/partimag' \ ocs_prerun1='sleep 5' \ ocs_live_run='ocs-sr -e1 auto -e2 -batch -t -r -j2 -k -p reboot -f sda1 restoreparts 2016-02-22-21-img sda1' \ ocs_live_extra_param='' \ keyboard-layouts=NONE \ ocs_live_batch=yes \ locales=en_US.UTF-8
initrd (loop)/live/initrd.img
}
Cool. Thanks for sharing that.
Steven.