I am trying to create a custom clonezilla installer, as a tool to refresh our standard machines from memory stick.
I can customise the start menu fine from syslinux/syslinux.cfg just fine, but I want the large memory stick to also contain the image to be restored. The image is in /lib/live/mount/medium/myImage and can be seen from the command line, but the installer seems to want to find it on /home/partimag
Is there a way to modify the ocs-live-run="ocs-sr ... " etc to point to the local path instead of having to mount /home/partimag ?
Thanks in advance - I am pulling my hair out.
script as per Michael below:
# mount the image where Clonezilla wants to find it
echo Mounting /lib/live/mount/medium/image on to /home/partimag/
mount --bind /lib/live/mount/medium/image /home/partimag/
RET=$?
if [ ${RET} -ne 0 ]
then
echo "FAILURE: Mount failed! Image missing?"
exit 2
fi
# now actually do the restore.
# -p true - exit with success
# -g auto - grub install in the right place
# -e* <whatever> - geometry
# -r – resize when restore done
# -j2 – clone hidden data
# -c – wait for confirm
# -p true – just exit
# -src – skip image check on restore
echo Now doing restore (disk)
ocs-sr -g auto -e1 auto -e2 -r -j2 -c -p true -scr restoredisk gen4image sda
#ocs-sr -g auto -e2 -c -r -j2 -k true restoreparts aks_user sda1
RET=$?
echo Returned $RET
if [ ${RET} -ne 0 ]
then
echo "FAILURE: Imaging failed! Bad image? Bad drive?"
exit 1
fi