我正在尝试创建一个自定义的 clonezilla 安装程序,作为从记忆棒刷新我们的标准机器的工具。
我可以从 syslinux/syslinux.cfg 自定义开始菜单就好了,但我希望大记忆棒也包含要恢复的图像。该图像在 /lib/live/mount/medium/myImage 中,可以从命令行中看到,但安装程序似乎想在 /home/partimag 上找到它
有没有办法修改 ocs-live-run="ocs-sr ..." 等以指向本地路径,而不必挂载 /home/partimag ?
在此先感谢-我正在拔头发。
如下迈克尔的脚本:
# 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